Overview

Namespaces

  • None
  • WPGMZA
    • Integration
    • Selector

Classes

  • AutoLoader
  • Crud
  • DOMDocument
  • DOMElement
  • Factory
  • GDPRCompliance
  • GoogleGeocoder
  • GoogleMap
  • GoogleMapsAPILoader
  • GoogleMapsLoader
  • LatLng
  • Map
  • MapsEngineDialog
  • Marker
  • ModalDialog
  • NominatimGeocodeCache
  • OLLoader
  • Plugin
  • RestAPI
  • ScriptLoader
  • Strings

Functions

  • create_marker_instance_delegate
  • create_plugin_instance
  • query_nominatim_cache
  • store_nominatim_cache
  • Overview
  • Namespace
  • Class

Class GoogleGeocoder

Server side Google Maps geocoding.

Namespace: WPGMZA
Located at google-maps/class.google-geocoder.php
Methods summary
public
# __construct( string $apiKey )

Constructor.

Constructor.

Parameters

$apiKey
The Google Maps API key to use for geocoding
public object
# getLatLngFromAddress( string $address )

Converts an address to a latitude longitude pair.

Converts an address to a latitude longitude pair.

Parameters

$address
The address to geocode

Returns

object
An object with the lat and lng of the first coordinate pair returned by Google

Throws

Exception
cURL must be enabled to use this feature
Exception
Failed to parse JSON response
Exception
Failed to geocode address for reason given by Google
Properties summary
public The $apiKey

Google API key to be used for geocoding

Google API key to be used for geocoding

#
API documentation generated by ApiGen