GpsGate Server JavaScript API

Map  1.0.0

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

static Class Franson.Map

namespace

Methods

disablePageScrollOnMouseWheel

void disablePageScrollOnMouseWheel(map)
workaround to not scroll entire page when scrolling over map (no longer needed for current versions of GMap) todo: verify if it works in Opera and Safari also
Parameters:
map <Franson.Map.IMap>
Returns: void

enableCrosshair

void enableCrosshair(map, [options])
todo: turn into control class?
Parameters:
map <Franson.Map.IMap>
[options] <literal>
Returns: void

injectCommonMethods

MapType injectCommonMethods(mapType)
adds many of the "convenience" methods to mapType (mixin-style)
Parameters:
mapType <MapType> note: a class Not an object instance.
Returns: MapType
mapType with injected layer methods (allow chaining)
Chainable: This method is chainable.

injectLayerManagerInterface

MapType injectLayerManagerInterface(mapType)
auguments a Map class with the methods and events from the "layerManager" in MapSurface. mixin-style. Mostly for convenience. Typically call this right after your class definition. Requires that the mapType exposes getSurface() (part of IMap interface). todo: we should be able to add more functionality like this..
Parameters:
mapType <MapType> note: a class Not an object instance.
Returns: MapType
mapType with injected layer methods (allow chaining)
Chainable: This method is chainable.

isOverlayLike

boolean isOverlayLike(obj)
used to validate overlays added to MapSurface (& maps), mostly for debugging/testing (since the interface is the same it could be used to verify GMap::GOverlay interfaces also)
Parameters:
obj <object> object to test
Returns: boolean
true if obj fulfils the Franson.Map.IOverlay interface

restoreMapState

void restoreMapState(map, state)
Parameters:
map <Franson.Map.IMap>
state <object> obtained from saveMapState() (JSON-serializable)
Returns: void

saveMapState

object saveMapState(map)
note that we don't document the return value, treat it as a black-box. todo: this should rather be a function the different low-level maps should provide (and we should only manage the command queue)
Parameters:
map <Franson.Map.IMap>
Returns: object
(JSON-serializable)

zoomToFit

void zoomToFit(map, bounds)
Parameters:
map <Franson.Map.IMap>
bounds <Franson.Geo.Bounds>
Returns: void


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