You are here: JavaScript API > Parameters > ArcWeb Explorer JavaScript AWMarker description

ArcWeb Explorer JavaScript AWMarker description

The AWMarker class contains marker information. For ArcWeb Explorer JavaScript, a marker is an icon used to represent a point location on a map and can be in raster (.jpg, .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 Reference.

AWMarker uses the following parameters:

Data parameter

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, or no values (see the Add marker sample in the Quick-Start Guide). If you enter an invalid value, ArcWeb Explorer JavaScript API replaces it with the default value.

markerDefaults

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

 

styleSheet

These parameters set the style for elements in the marker.

ParameterTypeDescriptionRequired/OptionalDefault Value
styleSheetString(URL)Sets styles for text regions. Must be a valid hard-coded URL.OptionalBuilt in default: textDefault.

 

label

These parameters set what is visible in the marker before it is clicked. If no parameter is set, ArcWeb Explorer JavaScript API uses a blank string.

ParameterTypeDescriptionRequired/OptionalDefault Value
textTextAdds textual label for the default marker state.OptionalBuilt in default: label.icon.
iconString(URL)Adds graphic label for the default marker state: .jpg, .gif, .png, or .swf.OptionalBuilt in default: label.text.

 

title

These parameters set the text visible in the marker when it expands after a click. This functionality is similar to a ToolTip.

ParameterTypeDescriptionRequired/OptionalDefault Value
textTextAdds text for the elongated marker state.OptionalN/A. No rollover state.

 

elements[ ]

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.

 ParameterTypeDescriptionRequired/OptionalDefault Value
texttypeString="text"Sets text to include in the marker.RequiredDeletes element from array
textStringContains text for the marker. Text string can include a hyperlink to a URL, JavaScript, and formatting, such as bold and italic.RequiredDeletes element from array
multilineBooleanDetermines if text is more than one line. OptionalFALSE
maxWidthNumberDetermines multiline-text width. For multiline text only. Optional200
borderBooleanDetermines if text has a border. OptionalFALSE
urlStringContains URL for the text.OptionalNone
targetStringSets URL target: _parent, _blank, _self, _top, and so on. Optional_blank
imagetypeString="image"Sets image to include in the marker.RequiredDeletes element from array
srcString(URL)Contains image file location (local or a URL): .jpg, .gif, or .png.RequiredDeletes element from array
urlString(URL)Contains URL to which image is linked.OptionalNone
imageHeightNumberSets height of the image.OptionalImage height
imageWidthNumberSets width of the image.OptionalImage width
targetStringSets URL target: _parent, _blank, _self, _top, and so on. Optional_blank
videotypeString="video"Sets video to include in the marker.RequiredDeletes element from array
srcString(URL)Contains video file location (local or URL). It must be an FLV file.RequiredDeletes element from array
videoHeightNumberSets height of the video.Optional150
videoWidthNumberSets width of the video.Optional200
SWF filetypeString="swf"Sets SWF (Flash) file to include in the marker.RequiredDeletes element from array
srcString(URL)Contains SWF file location (local or URL). RequiredDeletes element from array
swfHeightNumberSets height of the SWF file.OptionalSWF height
swfWidthNumberSets width of the SWF file.OptionalSWF width
swfOffsetXNumberSets x-offset of the SWF file (if not registered to 0,0).Optional0
swfOffsetYNumberSets y-offset of the SWF file (if not registered to 0,0).Optional0
audiotypeString="audio"Sets audio file to include in the marker: .mp3 or .wav.RequiredDeletes element from array
srcString(URL)Contains location of the audio file (local or URL). RequiredDeletes element from array
clickEventBooleanDetermines if audio file has a click event audio. OptionalFALSE

ArcWeb site | ArcWeb support | Discussion Forum

Copyright © ESRI