-
Notifications
You must be signed in to change notification settings - Fork 2
System Settings
The Gmarker extra includes the following MODX System Settings
This is the API Key needed to access various Google services. During testing, an API key was not required, but the AddOn has been written to support its use (presumably, omitting the API key is frowned upon by Google).
Log into https://code.google.com/apis/console using your Google account, activate the Google Maps API v3 and the Static Maps API, then click on the API Access and copy your key here. See https://developers.google.com/maps/documentation/javascript/tutorial#api_key for more info.
Assemble placeholders corresponding to available the default page variables or Template Variables so that when they are parsed they will contain a valid address that you could conceivably type into a Google Maps search field. For example, if your location pages contain TVs named "address", "city", and "state", then your formatting string might look like this:
[[+address]], [[+city]], [[+state]]
If you store an entire address in a single TV named "fulladdress", then your formatting string would look like this:
[[+fulladdress]]
Note that built-in page fields are also supported, e.g.
[[+pagetitle]],[[+alias]]
All placeholders should use the "+" notation used for Chunks (do not use the "*" notation).
Affects: Geocoding Plugin, Gmap Snippet, Gmarker Snippet, Glocation Snippet
Geocoding will be conducted when saving any page that uses one of these templates. Include a comma-separated list of template ids, e.g.
1,2,5
If left empty, no automatic geocoding will take place.
Make sure that the TVs named by gmarker.lat_tv and gmarker.lng_tv have been assigned to these templates.
Affects: Geocoding Plugin.
Used for Geocoding, you can pass additional hard filters to the Google Maps query to force the lookup to return address results restricted to a specific area.
The components that can be filtered include:
-
route matches long or short name of a route.
-
locality matches against both locality and sublocality types.
-
administrative_area matches all the administrative_area levels.
-
postal_code matches postal_code and postal_code_prefix.
-
country matches a country name or a two letter ISO 3166-1 country code.
For example, to restrict Geocoding to results within New Zealand, you might do something like this:
country:NZL
Affects: Geocoding Plugin, Gmap Snippet, Gmarker Snippet, Glocation Snippet
Used for Geocoding, you can pass additional soft filters to the Google Maps query so you can weight results that are in a given geographical boundary, limited by a latitude/longitude rectangle. The gmarker.bounds parameter defines the latitude/longitude coordinates of the southwest and northeast corners of this bounding box using a pipe (|) character to separate the coordinates, e.g.
34.172684,-118.604794|34.236144,-118.500938
See https://developers.google.com/maps/documentation/geocoding/index#Viewports for more info.
Affects: Geocoding Plugin, Gmap Snippet, Gmarker Snippet, Glocation Snippet.
This is the name of a Template Variable where Gmarker will store latitude information. E.g.
longitude_tv
Affects: Geocoding Plugin.
This is the name of a Template Variable where Gmarker will store longitude information. E.g.
latitude_tv
Affects: Geocoding Plugin.
The default here is "Yes": the Google Maps API will be accessed over an HTTPS connection.
If secure is "No", the standard HTTP URLs are used:
http://maps.googleapis.com/maps/api/geocode/output
If secure is "Yes", the HTTPS URL is used for lookups:
https://maps.googleapis.com/maps/api/geocode/output
Affects: Geocoding Plugin, Gmap Snippet, Gmarker Snippet, Glocation Snippet.
The default height of any map in pixels. This is used if &height is not specified in the Snippet call.
Affects: Gmap Snippet, Gmarker Snippet.
The default width of any map in pixels. This is used if &width is not specified in the Snippet call.
Affects: Gmap Snippet, Gmarker Snippet.