An individual marker in a Map Marker Group control. The marker's location is specified using its latitude
and longitude
property values or using the marker's initialAddress
property when the latitude
and longitude
are both set to 0. You can format the address as a natural-language address with multiple lines concatenated into a single line with spaces, for example, 123 Main Street, Bellevue, WA 98004 USA. You can specify a two-letter SO-3166 country code using the initialCountry
property as a country/locale hint.
You can specify the marker's icon using properties such as the icon
property. Use the standard Composite Application Framework marker icons by configuring the marker's icon
property with the icon name such as red, orange, or yellow. You can also use a custom icon by configuring the icon
property with the URL of the icon such as http://maps.google.com/mapfiles/arrow.png. You can configure the marker's selected icon similarly using the selectedImage
property.
The content of the marker is used to render the marker's information (bubble) window. A user can click a marker to display its information window, and also to select the marker, if the marker's clickable
property is set to true. A user can drag the marker to a new location if the marker's draggable
property is set to true.
Scripting
The Google Maps API is a full-featured, client-side JavaScript API, and is fully accessible for use with the CAF Google Maps controls. For more information, refer to Google documenation about Google Maps API.
To access the GMarker object (the Google Maps API marker object) associated with this control, use the getOverlay()
method of the control's CAF client-side model object. The following example looks up the GMarker object of the Map Marker control model with an ID of "myMarker", and uses the Google Maps API to hide the marker:
var marker = CAF.model("#{activePageBean.clientIds["myMarker"]}")
.getOverlay();
marker.hide();
Client-Side Model
The CAF client-side model object for this control extends from the CAF.Table.Row.Model object. For more information, see information about the client-side model in the webMethods CAF Development Help.
The object's value is the marker's ID. You can get the coordinates of the marker's location, in string form (for example, 37.0625;-95.677068) by using the getCoords()
method of the client-side model. The following script gets the coordinates of the marker with an ID of "myMarker":
var coords = CAF.model("#{activePageBean.clientIds["myMarker"]}").getCoords();
The CAF.GMap.stringToGLatLng()
and CAF.GMap.gLatLngToString()
functions convert string coordinates to and from a GLatLng object (the Google Maps API coordinates object). To set the coordinates, you must change the marker model's coordinates setting using the model's setCoords()
method and then update the marker group with the changed marker model using the marker group model's set()
method. The following script sets the marker with an ID of "myMarker" in a marker group with an ID of "myMarkerGroup":
CAF.model("#{activePageBean.clientIds["myMarkerGroup"]}")
.set(CAF.model("#{activePageBean.clientIds["myMarker"]}")
.setCoords("37.0625;-95.677068"));
You can use the CAF client-side model to set a marker's location with a natural-language address. The following script sets the location of the marker with an ID of "myMap":
CAF.model("#{activePageBean.clientIds["myMarkerGroup"]}")
.set(CAF.model("#{activePageBean.clientIds["myMarker"]}")
.setAddress("600 108th Ave NE,
Bellevue, WA 98004"));
Script Controls
You can use the standard script-type controls like Return Value Script or Invoke Script to manipulate the marker a marker with the standard client-side actions such as getValue
. You can also use the custom Return Map Value Script and Invoke Map Script controls to access special map-only properties and actions such as getLatitude
or setAddress
. Additionally, the Return Map Coords Script control enables specifying the latitude and longitude coordinates when invoking the setValue
or setCoords
action.
Children
Any. Composite Application Framework renders children as the content of the marker's information, bubble, window.
Info | Value |
---|---|
Component Type | com.webmethods.caf.faces.gmap.GMarker |
Handler Class | None |
Renderer Type | None |
Description | Individual map marker of a map marker group |
Palette Location | CAF Html/Control/Map/Map Marker |
Name | Required | Type | Description |
---|---|---|---|
autoPan | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
True to auto-pan map if user drags marker near map's edge
If not specified, the default value is "true". |
bounceGravity | false | javax.el.ValueExpression
(must evaluate to java.lang.Double )
|
Acceleration rate of marker when bouncing
If not specified, the default value is "1". |
bouncy | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
True to make marker bounce up and down after user finishes dragging it
If not specified, the default value is "true". |
clickable | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
True to allow user to click marker to select it or open the info window
If not specified, the default value is "false". |
dragCrossAnchorX | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Horizontal offset of cross image from Icon Anchor in pixels (for example, 10) |
dragCrossAnchorY | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Vertical offset of cross image from Icon Anchor in pixels (for example, 10) |
dragCrossImage | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| URL of cross image to display over exact marker location when marker is dragged |
dragCrossMove | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
True to keep marker under cursor when dragging; false to keep cross under cursor when dragging
If not specified, the default value is "false". |
dragCrossSizeHeight | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Height of cross image in pixels (for example, 16) |
dragCrossSizeWidth | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Width of cross image in pixels (for example, 16) |
draggable | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
True to allow user to drag marker to a different location
If not specified, the default value is "false". |
icon | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
URL of marker icon or pre-defined icon name
If not specified, the default value is "red". Valid values are:
|
iconAnchorX | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Horizontal offset of left edge of icon from marker location in pixels (for example, 10) |
iconAnchorY | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Vertical offset of top edge of icon from marker location in pixels (for example, 10) |
iconSizeHeight | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Height of icon in pixels (for example, 16) |
iconSizeWidth | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Width of icon in pixels (for example, 16) |
id | false | java.lang.String | Control identifier |
imageMap | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Comma-separated list of integers representing the x/y coordinates of the image map to use to specify the clickable part of the icon image in browsers other than Internet Explorer |
infoWindowAnchorX | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Horizontal offset of the pointy tip of the info window from the left edge of the icon in pixels (for example, 10) |
infoWindowAnchorY | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Vertical offset of the pointy tip of the info window from the left edge of the icon in pixels (for example, 10) |
initialAddress | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Initial marker location if latitude=0 and longitude=0 (for example, "600 108th Ave NE, Bellevue, WA 98004") |
initialCountry | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Two-letter country code (ISO 3166) hint for initial address (for example, "US") |
latitude | false | javax.el.ValueExpression
(must evaluate to java.lang.Double )
| Marker latitude in degrees (for example, 37.0625) |
longitude | false | javax.el.ValueExpression
(must evaluate to java.lang.Double )
| Marker longitude in dgrees (for example, -95.677068) |
maxHeight | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Height in pixels for marker to rise when dragged (for example, 10) |
mozPrintImage | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| URL of icon to use for printing in Firefox |
printImage | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| URL of icon to use for printing in browsers other than Firefox |
printShadow | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| URL of image to use for marker's shadow when printing |
rendered | false | javax.el.ValueExpression
(must evaluate to boolean )
|
True to render control; false to ignore it
If not specified, the default value is "true". |
selected | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
True if marker is selected
If not specified, the default value is "false". |
selectedImage | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
URL of icon to use when marker is selected
If not specified, the default value is "yellow". Valid values are:
|
shadow | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| URL of image to use for marker's shadow |
shadowSizeHeight | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Height of shadow in pixels (for example, 16) |
shadowSizeWidth | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Width of shadow in pixels (for example, 16) |
title | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Marker title |
transparent | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| URL of a virtually transparent version of the foreground icon image used to capture click events in Internet Explorer |
Output generated by Vdldoc View Declaration Language Documentation Generator.