Marker Class
Constructor
-
MapView
-
options
Parameters:
-
MapView
ObjectmapView The MapView this Marker will be added to.
-
options
ObjectObject
-
html
The body of the Marker. You can put any HTML in here you like.
-
position
Where on the map the Marker should be anchored. You need to use one of the MapView.getPositionX functions to get a position.
-
[class]
optionalThe name of the CSS class the Marker should inherit.
-
[map=mapView.currentMap]
optionalThe map the Marker is attached to.
-
[MarkerBuffer=2]
optionalKeep this much space between this Marker and other nearby Markers.
-
[lockToAnchor=false]
optionalMake the Marker stay firmly attached to its anchor and not get pushed away by other Markers or camera movement. Still hits other Markers.
-
[ignoreCollisions=false]
optionalAllow other Markers to overlap this Marker. Combine with
lockToAnchor=true
to completely opt out of the physics engine for this Marker. -
[rotateWithCamera=false]
optionalMake the Marker rotate with the rotation of the camera.
-
[rotation=0]
optionalSet the initial rotation of the Marker. Use this, combined with
rotateWithCamera=true
to create turn indicators that always point the right direction.
-
A Marker is a div with whatever HTML you provide, anchored it to a position
in 3D space. It will always maintain the same size on the screen.
Make your own and add it directly to the map with createMarker, or use the constructor and add it when you want.
You will need to specify at least options.html
and options.position
to have a useful Marker.