The AWMarker class contains marker information. For AWX JavaScript, a marker is an icon used to represent a point location on a map and can be in raster (jpeg, gif, png) or vector (swf) format. You can create an AWMarker instance based on a location, a marker style ID, or user defined data. For more information on markers, see the ArcWeb Explorer JavaScript API (JSdoc).
AWMarker uses the following parameters:
The "data" object can take all the parameters listed in the tables below. All of these parameters have default values, so you can specify all values, some values (see the Flash Markers sample in the Quick-Start Plus Guide), or no values (see the Add Marker sample in the Quick-Start Guide). If you enter an invalid value, AWX JavaScript API replaces it with the default value.
These parameters set various visual properties of the marker.
| Parameter | Type | Description | Required/Optional | Default Value |
|---|---|---|---|---|
| color | Hexadecimal | Sets dynamic marker color. | Optional | Default color |
| textColor | Hexadecimal | Sets default text color; used only if stylesheets are not present. | Optional | Default color (black) |
| dropShadow | Boolean | Adds a drop shadow on the marker. | Optional | FALSE |
| contentOffset_y | Number | Sets vertical offset of the content from the (0,0) position. | Optional | 0 |
| marginTop | Number | Sets marker top margin. | Optional | 5 |
| marginBottom | Number | Sets marker bottom margin (within content area, not contentOffset). | Optional | 5 |
| marginLeft | Number | Sets marker left margin. | Optional | 10 |
| marginRight | Number | Sets marker right margin. | Optional | 10 |
| vPadding | Number | Sets vertical padding between content elements. | Optional | 5 |
| align | String | Justifies objects: left, right, or center. | Optional | center |
| tweenSpeed | Number | Sets the speed (in milliseconds) at which the marker tweens occur. | Optional | 250 |
These parameters set the style for elements in the marker.
| Parameter | Type | Description | Required/Optional | Default Value |
|---|---|---|---|---|
| styleSheet | String(URL) | Sets styles for text regions. Must be a valid hardcoded URL. | Optional | Built in default: textDefault. |
These parameters set what is visible in the marker before it is clicked. If no parameter is set, AWX JavaScript API uses a blank string.
| Parameter | Type | Description | Required/Optional | Default Value |
|---|---|---|---|---|
| text | Text | Adds textual label for the default marker state. | Optional | Built in default: label.icon. |
| icon | String(URL) | Adds graphical label for the default marker state: .jpg, .gif, .png, or .swf. | Optional | Built in default: label.text. |
These parameters set the text visible in the marker when it expands after a click. This functionality is similar to a ToolTip.
| Parameter | Type | Description | Required/Optional | Default Value |
|---|---|---|---|---|
| text | Text | Adds text for the elongated marker state. | Optional | N/A. No rollover state. |
This is an array of the content that can go into a marker: text, image, video, SWF file, and audio. They are placed in the non-clickable marker based on their position in the array.
Visit the Feedback page to give comments or suggestions about the ArcWeb Developer's Guide.