Description
Marker symbols are used to draw points and multipoints on the graphics layer. PictureMarkerSymbol uses an image as a marker.
Class hierarchy
esri.symbol.Symbol
|_ esri.symbol.MarkerSymbol
|_ esri.symbol.PictureMarkerSymbol
Constructor
Properties
| height |
Number
|
Height of the image in pixels. |
| url |
String
|
URL of the image. |
| width |
Number
|
Width of the image in pixels. |
Methods
Constructor Detail
esri.symbol.PictureMarkerSymbol(json)
Creates a new PictureMarkerSymbol object using a JSON object.
Parameters:
|
<Object>
json |
Required |
JSON object representing the PictureMarkerSymbol.
|
esri.symbol.PictureMarkerSymbol(url, width, height)
Creates a new PictureMarkerSymbol object.
Parameters:
|
<String>
url |
Required |
URL of the image.
|
|
<Number>
width |
Required |
Width of the image in pixels. The default value is the actual width of the image.
|
|
<Number>
height |
Required |
Height of the image in pixels. The default value is the actual height of the image.
|
Code snippets:
Example 1
new esri.symbol.PictureMarkerSymbol('http://www.esri.com/graphics/aexicon.jpg', 51, 51);
Example 2
new esri.symbol.PictureMarkerSymbol('/images/diamond.png', 25, 25);
Properties Detail
Height of the image in pixels.
Width of the image in pixels.
Methods Detail
Sets the height of the image for display. The height can be larger or smaller than the actual width of the image. As the image gets larger, it will become more pixellated.
Input Parameters:
|
<Number> height |
Required |
Height of marker in pixels. |
Sets the URL where the image is located.
Input Parameters:
|
<String> url |
Required |
URL location of marker image. |
Sets the width of the image for display. The width can be larger or smaller than the actual width of the image. As the image gets larger, it will become more pixellated.
Input Parameters:
|
<Number> width |
Required |
Width of marker in pixels. |