GpsGate Server JavaScript API

Map  1.0.0

GpsGate Server JavaScript API > Map > Franson.Map.Marker
Search:
 
Filters

Class Franson.Map.Marker - extends Franson.Map.IOverlay

basic marker, interface similar to GMarker
(todo: could actually mimic almost all of GMarker interface for convenience) todo: make this into a baseclass for inheritance? todo: create an isMarkerLike validator? (decide on minimal interface (and create a BaseMarker or IMarker?))

Constructor

Franson.Map.Marker(latlng, [options])
Parameters:
latlng <LatLng>
[options] <Franson.Map.Marker.options> see default options

Properties

_clickHandler - private object


_dragHandlers - private object


_hidden - private boolean


_icon - private dojox.gfx.Shape


_latlng - private LatLng


_layer - private Franson.Map.ILayer


Methods

destroy

void destroy()
destructor
Returns: void

getIcon

dojox.gfx.Shape getIcon()
Returns: dojox.gfx.Shape

getLatLng

LatLng getLatLng()
get the position
Returns: LatLng

getTitle

string getTitle()
Returns: string

hide

void hide()
Returns: void

initialize

protected void initialize(layer)
Parameters:
layer <Franson.Map.ILayer>
Returns: void

isHidden

boolean isHidden()
Returns: boolean

redraw

protected void redraw([force=false])
Parameters:
[force=false] <boolean>
Returns: void

remove

protected void remove()
note that you should(must) not call this directly, rather use map.removeOverlay(marker) (which will call this) see GOverlay.remove()
Returns: void

setLatLng

void setLatLng(latlng)
set the position
Parameters:
latlng <LatLng>
Returns: void

show

void show()
Returns: void

Events

onclick

onclick ( latlng )
(if options.clickable)
Parameters:
latlng <LatLng>

ondrag

ondrag ( latlng )
(if options.draggable)
Parameters:
latlng <LatLng>

ondragend

ondragend ( latlng )
(if options.draggable)
Parameters:
latlng <LatLng>

ondragstart

ondragstart ( latlng )
(if options.draggable)
Parameters:
latlng <LatLng>

onremove

onremove ( )
fired in remove()

onvisibilitychanged

onvisibilitychanged ( visible )
Parameters:
visible <boolean>


Copyright © 2009 Franson Technology AB, Sweden. All rights reserved.