Google Map Method

Description

The Google map method action calls a method to perform some action on a Google Map. The map could be the Search Part, or in an Alternate View, for example. actions that you can perform include: Clearing markers, opening or closing an info box, adding a marker to the map, centering the map on an address, and setting the map zoom factor.

Used with the Grid component

 Geocode Settings Properties

Map Id

Specify the ID of the map you want to operate on. Choices include.

Action

Specify the action you want to perform. Choices include.

Marker types to delete

Specify which markers to delete. 'All markers' includes the markes that the user placed on the map to mark a search polygon. Choices include All markers, Exclude polygon markers.

Address fields

Enter a comma delimited list of fields that should be used for the address. You do not need a complete address. For example, you might just specify the 'city' field. You can also enter a literal value by enclosing the value in single quotes. The literal value must be properly javascript escaped. e.g. 'Land\s end road'.

Zoom factor

0 shows the whole world; 20 shows a few square yards.

Open an infobox

Specify which infobox to open. 'CurrentRow' opens the infobox for the current row. You can also enter an explicit row number. e.g. 3.

Add marker(s) method

If you select 'AjaxCallback', you can add multiple markers to the map at once. The location for each marker is computed by an Xbaisc function that you write. If you select 'LocalData' you can add one marker using data that a Javascript function computes. Choices include AjaxCallback, LocalData.

Xbasic function

Specify the name of the Xbasic function to call. This function will compute the data for each marker you want to place on the map. Click the 'Show function prototype' hyperlink below to see the function prototype of the Xbasic function.

Method

If you select 'Simple', then you can fill in prompts for the marker data. If you select 'JavascriptFunction' then you can define a Javascript function that will be called to gather the information necessary to place the marker on the map. Choices include Simple, JavascriptFunction.

Javascript function

Specify the name of the Javascript function to call. This function will compute the data for the marker you want to place on the map. Click the 'Show function prototype' hyperlink below to see the function prototype of the Javascript function.

Marker data type

Specify if the marker location is specified by a latitude and longitude value, or by an address. Choices include Latitude/Longitude, Address.

Latitude

Specify the latitude. You can specify a field in the current grid row that contains the value, or a literal value by enclosing the value in single quotes.

Longitude

Specify the longitude. You can specify a field in the current grid row that contains the value, or a literal value by enclosing the value in single quotes.

Address

Specify the address. You can specify a field, or a comma delimited list of fields, in the current grid row that contains the value, or a literal value by enclosing the value in single quotes.

Title

Specify the marker title. You can specify a field, or a comma delimited list of fields, in the current grid row that contains the value, or a literal value by enclosing the value in single quotes.

Infobox

Specify the text to show in the Infobox. You can specify a field, or a comma delimited list of fields, in the current grid row that contains the value, or a literal value by enclosing the value in single quotes.

Icon

(Optional) Specify the icon for the marker. If you leave this blank, a default icon will be used. You can specify a field in the current grid row that contains the value, or a literal value by enclosing the value in single quotes.

Layer

(Optional) Specify the 'layer' on which the marker should be placed. Enter any arbitrary string for the layer name. You can specify a field in the current grid row that contains the value, or a literal value by enclosing the value in single quotes.

Animation

Animation property. Choices include None, Bounce, Drop.

Animation duration

Animation duration property.

Callback function

Specify the name of the Javascript function to call after the marker has been added. You must define this function in Javascript Function Declarations. The function prototype has a single argument 'm' - the Google Maps 'Marker' object. See 'http://code.google.com/apis/maps/documentation/javascript/reference.html#Marker' for more information.

Draw circle around marker

Specify if a circle should be drawn around the marker.

Radius

Specify the circle radius. If you do not specify units, 'meters' are assumed. You can use the following units: m, km, mi, y (meters, kilometers, miles, yards). Example: '3mi'. You can read the radius from a field in the current record, or you can specify a literal value by enclosing the value in single quotes. e.g. '10mi'.

Circle stroke color

Circle stroke color property.

Circle stroke opacity

Circle stroke opacity property.

Circle stroke weight

Circle stroke weight property.

Circle fill color

Circle fill color property.

Circle fill opacity

Circle fill opacity property.

Layer name

Specify the name of the layer to show or hide. Marker layers are created by commands that add markers to the map and place then in specific layers. IMPORTANT: Layer names are case sensitive!

Marker layer to bounce

Cause the markers on a specific layer to bounce up and down for a specified duration (to draw the user's attention to the markers).

Duration

Specify how long the marker(s) should bounce. Enter the value in seconds.

Marker index

Specify the index (row number) of the marker that you want to bounce up and down (to draw the user's attention to the marker). Use 'CurrentRow' for the marker for the current Grid row.

Bounce type

Specify the animation effect. Choices include Bounce, Drop.

See Also