Classes
class TMarker
A TMarker marks a position on the map. Use TMap.addMarker() method to add a marker on the map. A marker's geographical position on the map is represented by a TLatLon object. After it is added to a map, the info window of that map can be opened through the marker.
| Contructor | Description |
|---|---|
| TMarker(position: TLatLon, options?: TMarkerOptions) |
Constructs a new TMarker object. |
Methods
| Method | Return Value | Description |
|---|---|---|
| getPosition() | TLatLon | Returns the lat lon position of the marker. |
| setPosition(position : TLatLon) | None | Set the lat lon position of the marker. |
| getSize() | TSize | Returns the size of the marker. |
| setSize(size: TSize) | None | Set the size of the marker. |
| getZIndex() | Integer | Returns the z-index value of the marker. |
| setZIndex(zindex: Integer) | None | Set the z-index value of the marker. |
| getTitle() | String | Get the title of the marker. |
| setTitle(title: String) | None | Set the title of the marker. |
| getVisibleRange() | TVisibleRange | Returns the visible range of the marker. |
| setVisibleRange(visibleRange: TVisibleRange) | None | Set the visible range of the marker. |
| show() | None | Show the marker. |
| hide() | None | Hide the marker. |
| isVisible() | Boolean | Returns true if the marker is visible. |
| enableDragging(isDraggable: Boolean) | None | Set the marker as draggable or not. |
| isDraggingEnabled() | Boolean | Returns true if the marker is draggable. |
| getIcon() | TIcon | Get the icon of the marker. |
| setIcon(icon: TIcon) | None | Set the icon of the marker. |
| getTMap() | TMap | Returns the map of the marker added. |
| setTMap(map: TMap) | None | Set the marker add to the map. If given null, the marker will be removed from the original map. |
| getAnchor() | TSize | Returns the anchor of the marker. |
| setAnchor(anchor : TSize) | None | Set the anchor of the marker. |
| bringToTop() | None | Bring the marker to the topmost of all the markers visible. |
Events
| Event | Description |
|---|---|
| click(marker: TMarker) | Fired when user clicked on the marker. |
| doubleclick(marker: TMarker) | Fired when user double clicked on the marker. |
| mouseover(marker: TMarker) | Fired when mouseover the marker. |
| mouseout(marker: TMarker) | Fired when mouseout the marker. |
| dragstart(marker: TMarker) | Fired when start draggable marker. |
| drag(marker: TMarker) | Fired when dragging a draggable marker. |
| dragend(marker: TMarker) | Fired when the dragging end for a draggable marker. |