GpsGate Server JavaScript API

Map  1.0.0

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

Class Franson.Map.Layer - extends Franson.Map.ILayer

Layer is essentially an overlay but with grouping and ordering etc.
note that based on this interface you could create more specialized domain-specific layers (DS interface, automatic conversion from DS types to markers etc)
todo: should we try to abstract more? so we can create layers not using actual SVG/VML nodes.. (to wrap map-native overlays for example, traffic-info etc) todo: more events..

Constructor

Franson.Map.Layer(id, name, [options])
Parameters:
id <string> used to identity the layer (map.getLayer('layerId'))
name <string> what will typically (probably) be displayed in the GUI
[options] <literal>

Properties

_hidden - private boolean


_map - private Franson.Map.IMap


_mapSurface - private Franson.Map.MapSurface


_name - private object


_overlays - private Franson.Map.IOverlay[]


_root - private dojox.gfx.Group


id - string


Properties inherited from Franson.Map.ILayer:

Methods

addOverlay

void addOverlay(overlay)
Parameters:
overlay <Franson.Map.IOverlay>
Returns: void

clearOverlays

void clearOverlays()
Returns: void

destroy

void destroy([deep=false])
destructor
Parameters:
[deep=false] <boolean> true to destroy layers also
Returns: void

getMap

Franson.Map.IMap getMap()
ok? remove?
Returns: Franson.Map.IMap

getName

string getName()
Returns: string

getProjection

Projection getProjection()
normally (but not necessarily) same as map's projection
Returns: Projection

getRooot

dojox.gfx.Group getRooot()
Returns: dojox.gfx.Group

getSurface

Franson.Map.MapSurface getSurface()
Returns: Franson.Map.MapSurface

hide

void hide()
Returns: void

initialize

void initialize()
IOverlay (+ root) root is the "handle" we get from mapSurface to attach to
Returns: void

isHidden

boolean isHidden()
Returns: boolean

redraw

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

remove

protected void remove()
part of IOverlay
Returns: void

removeOverlay

void removeOverlay(overlay)
Parameters:
overlay <Franson.Map.IOverlay>
Returns: void

setName

void setName(name)
Parameters:
name <string>
Returns: void

show

void show()
Returns: void


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