cgxp.api.Map

Public Methods

Public methods.

Map.adaptConfigForViewer()
Parameters:configObject the map config
Returns:Object The new config to be used for the map option of the viewer

Convenience method to add some required options to mapConfig before using it to create a viewer.

Map.addCustomLayer()
Parameters:
  • layerTypeString A text description of the layer format (either “text” or “gpx”)
  • layerNameString A text description for the layer
  • layerUrlString The url the file to load
  • optionsObject Optional (only if layerType=”gpx”) styling properties (ie. strokeColor, strokeWidth, strokeOpacity)
Map.addMarker()
Parameters:optionsObject List of marker options
Map.initMap()
Parameters:configObject

Is intended to be overriden in inheriting classes.

Map.initMapFromConfig()
Parameters:configObject

Convenience method to create a map from a config.

Map.onViewerReady()
Parameters:viewerGXP.widgets.Viewer the viewer

Method to be called as GXP.widgets.Viewer ready event callback.

Map.recenter()
Parameters:
  • centerArray(Number) Center coordinates
  • zoomNumber
Map.recenterOnObjects()
Parameters:
  • layerString The layer name
  • idsArray(String) The ids of the feature to recenter on.
  • highlightBoolean Tells whether to hilight the features or not. Defaults to false.

Table Of Contents

Previous topic

cgxp.api.Click

Next topic

Plugins

This Page