# Module: WPGMZA

### Methods

#### (static) assertInstanceOf(instance, instanceName) → {void}

This function is for checking inheritence has been setup correctly. For objects that have engine and Pro specific classes, it will automatically add the engine and pro prefix to the supplied string and if such an object exists it will test against that name rather than the un-prefix argument supplied. For example, if we are running the Pro addon with Google maps as the engine, if you supply Marker as the instance name the function will check to see if instance is an instance of GoogleProMarker

##### Parameters:

Name | Type | Description
--- | --- | ---
`instance` | object | The object to check
`instanceName` | string | The class name as a string which this object should be an instance of

Source:
  - core.js, line 251

##### Returns:

Type
  void

#### (static) assertInstanceOf(instance, instanceName) → {void}

This function is for checking inheritence has been setup correctly. For objects that have engine and Pro specific classes, it will automatically add the engine and pro prefix to the supplied string and if such an object exists it will test against that name rather than the un-prefix argument supplied. For example, if we are running the Pro addon with Google maps as the engine, if you supply Marker as the instance name the function will check to see if instance is an instance of GoogleProMarker

##### Parameters:

Name | Type | Description
--- | --- | ---
`instance` | object | The object to check
`instanceName` | string | The class name as a string which this object should be an instance of

Source:
  - wp-google-maps.combined.js, line 253

##### Returns:

Type
  void

#### (static) getCurrentPosition() → {object}

This function will get the users position, it first attempts to get high accuracy position (mobile with GPS sensors etc.), if that fails (desktops will time out) then it tries again without high accuracy enabled

Source:
  - core.js, line 188

##### Returns:

The users position as a LatLng literal

Type
  object

#### (static) getCurrentPosition() → {object}

This function will get the users position, it first attempts to get high accuracy position (mobile with GPS sensors etc.), if that fails (desktops will time out) then it tries again without high accuracy enabled

Source:
  - wp-google-maps.combined.js, line 190

##### Returns:

The users position as a LatLng literal

Type
  object

#### (static) getImageDimensions(src, callback) → {void}

Utility function to get the dimensions of an image, caches results for best performance

##### Parameters:

Name | Type | Description
--- | --- | ---
`src` | string | Image source URL
`callback` | function | Callback to recieve image dimensions

Source:
  - wp-google-maps.combined.js, line 98

##### Returns:

Type
  void

#### (static) getImageDimensions(src, callback) → {void}

Utility function to get the dimensions of an image, caches results for best performance

##### Parameters:

Name | Type | Description
--- | --- | ---
`src` | string | Image source URL
`callback` | function | Callback to recieve image dimensions

Source:
  - core.js, line 96

##### Returns:

Type
  void

#### (static) getMapByID(id) → {object}

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | mixed | The ID of the map to retrieve

Source:
  - wp-google-maps.combined.js, line 300

##### Returns:

The map object, or null if no such map exists

Type
  object

#### (static) getMapByID(id) → {object}

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | mixed | The ID of the map to retrieve

Source:
  - core.js, line 298

##### Returns:

The map object, or null if no such map exists

Type
  object

#### (static) guid() → {string}

Utility function returns a GUID

Source:
  - core.js, line 13

##### Returns:

The GUID

Type
  string

#### (static) guid() → {string}

Utility function returns a GUID

Source:
  - wp-google-maps.combined.js, line 15

##### Returns:

The GUID

Type
  string

#### (static) hexOpacityToRGBA(colour, opacity) → {array}

Takes a hex string and opacity value and converts it to Openlayers RGBA format

##### Parameters:

Name | Type | Description
--- | --- | ---
`colour` | string | The hex color string
`opacity` | number | The opacity from 0.0 - 1.0

Source:
  - core.js, line 31

##### Returns:

RGBA where color components are 0 - 255 and opacity is 0.0 - 1.0

Type
  array

#### (static) hexOpacityToRGBA(colour, opacity) → {array}

Takes a hex string and opacity value and converts it to Openlayers RGBA format

##### Parameters:

Name | Type | Description
--- | --- | ---
`colour` | string | The hex color string
`opacity` | number | The opacity from 0.0 - 1.0

Source:
  - wp-google-maps.combined.js, line 33

##### Returns:

RGBA where color components are 0 - 255 and opacity is 0.0 - 1.0

Type
  array

#### (static) isDeveloperMode() → {boolean}

Returns true if developer mode is set

Source:
  - wp-google-maps.combined.js, line 127

##### Returns:

True if developer mode is on

Type
  boolean

#### (static) isDeveloperMode() → {boolean}

Returns true if developer mode is set

Source:
  - core.js, line 125

##### Returns:

True if developer mode is on

Type
  boolean

#### (static) isGoogleAutocompleteSupported() → {boolean}

Shorthand function to determine if the Places Autocomplete is available

Source:
  - core.js, line 313

##### Returns:

Type
  boolean

#### (static) isGoogleAutocompleteSupported() → {boolean}

Shorthand function to determine if the Places Autocomplete is available

Source:
  - wp-google-maps.combined.js, line 315

##### Returns:

Type
  boolean

#### (static) isLatLngString(str) → {array}

Utility function returns true is string is a latitude and longitude

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - wp-google-maps.combined.js, line 54

##### Returns:

the matched latitude and longitude or null if no match

Type
  array

#### (static) isLatLngString(str) → {array}

Utility function returns true is string is a latitude and longitude

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - core.js, line 52

##### Returns:

the matched latitude and longitude or null if no match

Type
  array

#### (static) isProVersion() → {boolean}

Returns true if the Pro add-on is active

Source:
  - wp-google-maps.combined.js, line 138

##### Returns:

True if the Pro add-on is active

Type
  boolean

#### (static) isProVersion() → {boolean}

Returns true if the Pro add-on is active

Source:
  - core.js, line 136

##### Returns:

True if the Pro add-on is active

Type
  boolean

#### (static) openMediaDialog(callback) → {void}

Opens the WP media dialog and returns the result to a callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | Callback to recieve the attachment ID as the first parameter and URL as the second

Source:
  - core.js, line 147

##### Returns:

Type
  void

#### (static) openMediaDialog(callback) → {void}

Opens the WP media dialog and returns the result to a callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | Callback to recieve the attachment ID as the first parameter and URL as the second

Source:
  - wp-google-maps.combined.js, line 149

##### Returns:

Type
  void

#### (static) runCatchableTask(callback, friendlyErrorContainer) → {void}

Runs a catchable task and displays a friendly error if the function throws an error

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | The function to run
`friendlyErrorContainer` | HTMLElement | The container element to hold the error

Source:
  - wp-google-maps.combined.js, line 230

##### Returns:

Type
  void

#### (static) runCatchableTask(callback, friendlyErrorContainer) → {void}

Runs a catchable task and displays a friendly error if the function throws an error

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | The function to run
`friendlyErrorContainer` | HTMLElement | The container element to hold the error

Source:
  - core.js, line 228

##### Returns:

Type
  void

#### (static) stringToLatLng(str) → {object}

Utility function returns a latLng literal given a valid latLng string

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - core.js, line 79

##### Returns:

LatLng literal

Type
  object

#### (static) stringToLatLng(str) → {object}

Utility function returns a latLng literal given a valid latLng string

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - wp-google-maps.combined.js, line 81

##### Returns:

LatLng literal

Type
  object

### Methods

#### (static) assertInstanceOf(instance, instanceName) → {void}

This function is for checking inheritence has been setup correctly. For objects that have engine and Pro specific classes, it will automatically add the engine and pro prefix to the supplied string and if such an object exists it will test against that name rather than the un-prefix argument supplied. For example, if we are running the Pro addon with Google maps as the engine, if you supply Marker as the instance name the function will check to see if instance is an instance of GoogleProMarker

##### Parameters:

Name | Type | Description
--- | --- | ---
`instance` | object | The object to check
`instanceName` | string | The class name as a string which this object should be an instance of

Source:
  - core.js, line 251

##### Returns:

Type
  void

#### (static) assertInstanceOf(instance, instanceName) → {void}

This function is for checking inheritence has been setup correctly. For objects that have engine and Pro specific classes, it will automatically add the engine and pro prefix to the supplied string and if such an object exists it will test against that name rather than the un-prefix argument supplied. For example, if we are running the Pro addon with Google maps as the engine, if you supply Marker as the instance name the function will check to see if instance is an instance of GoogleProMarker

##### Parameters:

Name | Type | Description
--- | --- | ---
`instance` | object | The object to check
`instanceName` | string | The class name as a string which this object should be an instance of

Source:
  - wp-google-maps.combined.js, line 253

##### Returns:

Type
  void

#### (static) getCurrentPosition() → {object}

This function will get the users position, it first attempts to get high accuracy position (mobile with GPS sensors etc.), if that fails (desktops will time out) then it tries again without high accuracy enabled

Source:
  - core.js, line 188

##### Returns:

The users position as a LatLng literal

Type
  object

#### (static) getCurrentPosition() → {object}

This function will get the users position, it first attempts to get high accuracy position (mobile with GPS sensors etc.), if that fails (desktops will time out) then it tries again without high accuracy enabled

Source:
  - wp-google-maps.combined.js, line 190

##### Returns:

The users position as a LatLng literal

Type
  object

#### (static) getImageDimensions(src, callback) → {void}

Utility function to get the dimensions of an image, caches results for best performance

##### Parameters:

Name | Type | Description
--- | --- | ---
`src` | string | Image source URL
`callback` | function | Callback to recieve image dimensions

Source:
  - wp-google-maps.combined.js, line 98

##### Returns:

Type
  void

#### (static) getImageDimensions(src, callback) → {void}

Utility function to get the dimensions of an image, caches results for best performance

##### Parameters:

Name | Type | Description
--- | --- | ---
`src` | string | Image source URL
`callback` | function | Callback to recieve image dimensions

Source:
  - core.js, line 96

##### Returns:

Type
  void

#### (static) getMapByID(id) → {object}

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | mixed | The ID of the map to retrieve

Source:
  - wp-google-maps.combined.js, line 300

##### Returns:

The map object, or null if no such map exists

Type
  object

#### (static) getMapByID(id) → {object}

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | mixed | The ID of the map to retrieve

Source:
  - core.js, line 298

##### Returns:

The map object, or null if no such map exists

Type
  object

#### (static) guid() → {string}

Utility function returns a GUID

Source:
  - core.js, line 13

##### Returns:

The GUID

Type
  string

#### (static) guid() → {string}

Utility function returns a GUID

Source:
  - wp-google-maps.combined.js, line 15

##### Returns:

The GUID

Type
  string

#### (static) hexOpacityToRGBA(colour, opacity) → {array}

Takes a hex string and opacity value and converts it to Openlayers RGBA format

##### Parameters:

Name | Type | Description
--- | --- | ---
`colour` | string | The hex color string
`opacity` | number | The opacity from 0.0 - 1.0

Source:
  - core.js, line 31

##### Returns:

RGBA where color components are 0 - 255 and opacity is 0.0 - 1.0

Type
  array

#### (static) hexOpacityToRGBA(colour, opacity) → {array}

Takes a hex string and opacity value and converts it to Openlayers RGBA format

##### Parameters:

Name | Type | Description
--- | --- | ---
`colour` | string | The hex color string
`opacity` | number | The opacity from 0.0 - 1.0

Source:
  - wp-google-maps.combined.js, line 33

##### Returns:

RGBA where color components are 0 - 255 and opacity is 0.0 - 1.0

Type
  array

#### (static) isDeveloperMode() → {boolean}

Returns true if developer mode is set

Source:
  - wp-google-maps.combined.js, line 127

##### Returns:

True if developer mode is on

Type
  boolean

#### (static) isDeveloperMode() → {boolean}

Returns true if developer mode is set

Source:
  - core.js, line 125

##### Returns:

True if developer mode is on

Type
  boolean

#### (static) isGoogleAutocompleteSupported() → {boolean}

Shorthand function to determine if the Places Autocomplete is available

Source:
  - core.js, line 313

##### Returns:

Type
  boolean

#### (static) isGoogleAutocompleteSupported() → {boolean}

Shorthand function to determine if the Places Autocomplete is available

Source:
  - wp-google-maps.combined.js, line 315

##### Returns:

Type
  boolean

#### (static) isLatLngString(str) → {array}

Utility function returns true is string is a latitude and longitude

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - wp-google-maps.combined.js, line 54

##### Returns:

the matched latitude and longitude or null if no match

Type
  array

#### (static) isLatLngString(str) → {array}

Utility function returns true is string is a latitude and longitude

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - core.js, line 52

##### Returns:

the matched latitude and longitude or null if no match

Type
  array

#### (static) isProVersion() → {boolean}

Returns true if the Pro add-on is active

Source:
  - wp-google-maps.combined.js, line 138

##### Returns:

True if the Pro add-on is active

Type
  boolean

#### (static) isProVersion() → {boolean}

Returns true if the Pro add-on is active

Source:
  - core.js, line 136

##### Returns:

True if the Pro add-on is active

Type
  boolean

#### (static) openMediaDialog(callback) → {void}

Opens the WP media dialog and returns the result to a callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | Callback to recieve the attachment ID as the first parameter and URL as the second

Source:
  - core.js, line 147

##### Returns:

Type
  void

#### (static) openMediaDialog(callback) → {void}

Opens the WP media dialog and returns the result to a callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | Callback to recieve the attachment ID as the first parameter and URL as the second

Source:
  - wp-google-maps.combined.js, line 149

##### Returns:

Type
  void

#### (static) runCatchableTask(callback, friendlyErrorContainer) → {void}

Runs a catchable task and displays a friendly error if the function throws an error

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | The function to run
`friendlyErrorContainer` | HTMLElement | The container element to hold the error

Source:
  - wp-google-maps.combined.js, line 230

##### Returns:

Type
  void

#### (static) runCatchableTask(callback, friendlyErrorContainer) → {void}

Runs a catchable task and displays a friendly error if the function throws an error

##### Parameters:

Name | Type | Description
--- | --- | ---
`callback` | function | The function to run
`friendlyErrorContainer` | HTMLElement | The container element to hold the error

Source:
  - core.js, line 228

##### Returns:

Type
  void

#### (static) stringToLatLng(str) → {object}

Utility function returns a latLng literal given a valid latLng string

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - core.js, line 79

##### Returns:

LatLng literal

Type
  object

#### (static) stringToLatLng(str) → {object}

Utility function returns a latLng literal given a valid latLng string

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | string | The string to attempt to parse as coordinates

Source:
  - wp-google-maps.combined.js, line 81

##### Returns:

LatLng literal

Type
  object