Classes
Members
-
oOpenLayersLocationStyle_{ol.style.Style}
-
Location style
-
oOpenLayersSelectionStyle_{ol.style.Style}
-
Selections style
Methods
-
addCustomProjections()
vmap/map/map.js, line 298 -
Add projections
-
addDrawInteraction(opt_options, currentAction){ol.interaction.Draw|Number}
vmap/map/map.js, line 527 -
Add a draw event on the map.
Name Type Description optionsName Type Description clickTolerancenumber | undefined The maximum distance in pixels between "down" and "up" for a "up" event to be considered a "click" event and actually add a point/vertex to the geometry being drawn. Default is 6 pixels. That value was chosen for the draw interaction to behave correctly on mouse as well as on touch devices.
featuresol.Collection.<ol.Feature> | undefined Destination collection for the drawn features.
sourceol.source.Vector | undefined Destination source for the drawn features.
snapTolerancenumber | undefined Pixel distance for snapping to the drawing finish. Default is 12.
typeol.geom.GeometryType Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon' or 'Circle'). Required.
maxPointsnumber | undefined The number of points that can be drawn before a polygon ring or line string is finished. The default is no restriction.
minPointsnumber | undefined The number of points that must be drawn before a polygon ring or line string can be finished. Default is 3 for polygon rings and 2 for line strings.
styleol.style.Style | Array.<ol.style.Style> | ol.style.StyleFunction | undefined Style for sketch features.
geometryFunctionol.interaction.DrawGeometryFunctionType | undefined Function that is called when a geometry's coordinates are updated.
geometryNamestring | undefined Geometry name to use for features created by the draw interaction.
conditionol.events.ConditionType | undefined A function that takes an ol.MapBrowserEvent and returns a boolean to indicate whether that event should be handled. By default ol.events.condition.noModifierKeys, i.e. a click, adds a vertex or deactivates freehand drawing.
freehandConditionol.events.ConditionType | undefined Condition that activates freehand drawing for lines and polygons. This function takes an ol.MapBrowserEvent and returns a boolean to indicate whether that event should be handled. The default is ol.events.condition.shiftKeyOnly, meaning that the Shift key activates freehand drawing.
wrapXboolean | undefined Wrap the world horizontally on the sketch overlay. Default is false.
currentActionstring | undefined name of the current action
-
addEventOnMap(type, listener, opt_this, currentAction){goog.events.Key}
vmap/map/map.js, line 447 -
Add a certain type of event on the map.
Name Type Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject The object to use as
thisinlistener.currentActionstring | undefined name of the current action
Returns:
Unique key for the listener.
-
addInteraction(interaction, currentAction){ol.interaction.Interaction}
vmap/map/map.js, line 590 -
Add a interaction
Name Type Description interactionol.interaction.Interaction currentActionstring | undefined name of the current action
-
addOverlay(overlay){undefined}
vmap/map/map.js, line 634 -
Add an overlay witch will be remove when using removeActionsAndTooltips
Name Type Description overlayol.Overlay -
addTextOverlayFeature(text, coordinates){undefined}
vmap/map/map.js, line 706 -
Add a text feature
Name Type Description textstring coordinatesarray -
addVectorLayer(opt_options){undefined}
vmap/map/map.js, line 749 -
Use this function to add a new vector layer
Name Type Description optionsName Type Description styleobject extentobject minResolutionobject maxResolutionobject opacityobject propertiesobject visibleobject zIndexobject -
getCurrentAction(){string}
vmap/map/map.js, line 1043 -
currentAction getter
Returns:
currentAction
-
getLayersToTransform(){nsVmap.Map.layersToTransform_}
vmap/map/map.js, line 1083 -
layersToTransform_ getter
-
getLocationOverlay(){ol.layer.Vector} experimental
vmap/map/map.js, line 996 -
nsVmap.Map.oOpenLayersLocationOverlay_ getter
Returns:
Location overlay
-
getLocationOverlayFeatures(){ol.Collection.<ol.Feature>} experimental
vmap/map/map.js, line 1006 -
nsVmap.Map.oOpenLayersLocationOverlayFeatures_ getter
Returns:
Location overlay features
-
getMapTooltip(){nsVmap.Map.MapTooltip}
vmap/map/map.js, line 1034 -
vmapTooltip_ getter
-
getOpenLayersLayers(){Array.<ol.layer>} experimental
vmap/map/map.js, line 914 -
nsVmap.Map.olLayers_ getter
Returns:
Layers array
-
getOpenLayersMap(){ol.map} experimental
vmap/map/map.js, line 956 -
nsVmap.Map.oOpenLayersMap_ getter
Returns:
Used map
-
getOpenLayersView(){ol.View} experimental
vmap/map/map.js, line 935 -
nsVmap.Map.olView_ getter
Returns:
Used view
-
getPrettyScale(scale){String}
vmap/map/map.js, line 258 -
Get the scale like (1:25,000)
Name Type Description scalenumber Returns:
scale (pretty)
-
getScale(opt_options){Number|String}
vmap/map/map.js, line 224 -
Get the current scale
Name Type Description optionsName Type Description prettyboolean | undefined true for pretty format (ex: 1:25,000)
-
getSelectionOverlay(){ol.layer.Vector} experimental
vmap/map/map.js, line 976 -
nsVmap.Map.oOpenLayersSelectionOverlay_ getter
Returns:
Selection overlay
-
getSelectionOverlayFeatures(){ol.Collection.<ol.Feature>} experimental
vmap/map/map.js, line 986 -
nsVmap.Map.oOpenLayersSelectionOverlayFeatures_ getter
Returns:
Selection overlay features
-
getSelectionStyle(){ol.style.Style} experimental
vmap/map/map.js, line 1016 -
nsVmap.Map.oOpenLayersSelectionStyle_ getter
Returns:
Selection overlay
-
getTextOverlay(){ol.layer.Vector}
vmap/map/map.js, line 1065 -
vmapTextOverlay_ getter
-
getTextOverlayFeatures(){nsVmap.Map.vmapTextOverlayFeatures__}
vmap/map/map.js, line 1074 -
vmapTextOverlayFeatures_ getter
-
initMapTooltip(){undefined}
vmap/map/map.js, line 798 -
Initialize the vmapTooltip_
-
lambertToWGS(coordinates){ol.coordinates}
vmap/map/map.js, line 373 -
Tansform Lambert93 coordinates to WGS83
Name Type Description coordinatesol.coordinates Lambert93 coordinates to transform
Returns:
WGS84 coordinates
-
removeActionsAndTooltips(){undefined}
vmap/map/map.js, line 644 -
Remove the mapTooltip and the actions added by addEventOnMap, setEventOnMap, addDrawInteraction or setDrawInteraction
-
removeActionsOnMap(){undefined}
vmap/map/map.js, line 607 -
Remove the events and draw interactions added by addEventOnMap, setEventOnMap, addDrawInteraction or setDrawInteraction
-
reprojectFeatures(oldProjection, newProjection){undefined}
vmap/map/map.js, line 658 -
Transform the layers contained in layersToTransform to the new projection
Name Type Description oldProjectionol.proj.ProjectionLike newProjectionol.proj.ProjectionLike -
setCurrentAction(currentAction)
vmap/map/map.js, line 1052 -
currentAction setter
Name Type Description currentActionstring -
setDrawInteraction(opt_options, currentAction){ol.interaction.Draw|Number}
vmap/map/map.js, line 490 -
Add a draw event on the map and remove the others.
Name Type Description optionsName Type Description clickTolerancenumber | undefined The maximum distance in pixels between "down" and "up" for a "up" event to be considered a "click" event and actually add a point/vertex to the geometry being drawn. Default is 6 pixels. That value was chosen for the draw interaction to behave correctly on mouse as well as on touch devices.
featuresol.Collection.<ol.Feature> | undefined Destination collection for the drawn features.
sourceol.source.Vector | undefined Destination source for the drawn features.
snapTolerancenumber | undefined Pixel distance for snapping to the drawing finish. Default is 12.
typeol.geom.GeometryType Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon' or 'Circle'). Required.
maxPointsnumber | undefined The number of points that can be drawn before a polygon ring or line string is finished. The default is no restriction.
minPointsnumber | undefined The number of points that must be drawn before a polygon ring or line string can be finished. Default is 3 for polygon rings and 2 for line strings.
styleol.style.Style | Array.<ol.style.Style> | ol.style.StyleFunction | undefined Style for sketch features.
geometryFunctionol.interaction.DrawGeometryFunctionType | undefined Function that is called when a geometry's coordinates are updated.
geometryNamestring | undefined Geometry name to use for features created by the draw interaction.
conditionol.events.ConditionType | undefined A function that takes an ol.MapBrowserEvent and returns a boolean to indicate whether that event should be handled. By default ol.events.condition.noModifierKeys, i.e. a click, adds a vertex or deactivates freehand drawing.
freehandConditionol.events.ConditionType | undefined Condition that activates freehand drawing for lines and polygons. This function takes an ol.MapBrowserEvent and returns a boolean to indicate whether that event should be handled. The default is ol.events.condition.shiftKeyOnly, meaning that the Shift key activates freehand drawing.
wrapXboolean | undefined Wrap the world horizontally on the sketch overlay. Default is false.
currentActionstring | undefined name of the current action
-
setEventOnMap(type, listener, opt_this, currentAction){goog.events.Key}
vmap/map/map.js, line 415 -
Set a event on the map and remove the others.
Name Type Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject The object to use as
thisinlistener.currentActionstring | undefined name of the current action
Returns:
Unique key for the listener.
-
setInteraction(interaction, currentAction){ol.interaction.Interaction}
vmap/map/map.js, line 572 -
Remove events and interactions and then add a interaction
Name Type Description interactionol.interaction.Interaction currentActionstring | undefined name of the current action
-
setOpenLayersLayers(layers) experimental
vmap/map/map.js, line 924 -
nsVmap.Map.olLayers_ setter
Name Type Description layersArray.<ol.layer.Base> Layers array
-
setOpenLayersMap(map) experimental
vmap/map/map.js, line 966 -
nsVmap.Map.oOpenLayersMap_ setter
Name Type Description mapol.Map Map to use
-
setOpenLayersView(view) experimental
vmap/map/map.js, line 945 -
nsVmap.Map.olView_ setter
Name Type Description viewol.View View to use
-
setScale(scale){number}
vmap/map/map.js, line 279 -
Set the map scale
Name Type Description scalenumber Returns:
new scale
-
setSelectionStyle(style) unstable
vmap/map/map.js, line 1026 -
nsVmap.Map.oOpenLayersSelectionStyle_ setter
Name Type Description styleol.style.Style FeatureOverlay Selection overlay
-
setTextOverlayFeature(text, coordinates){undefined}
vmap/map/map.js, line 690 -
Remove the text features and a new one
Name Type Description textstring coordinatesarray -
WGSToLambert(coordinates){ol.coordinates}
vmap/map/map.js, line 329 -
Tansform WGS83 coordinates to Lambert93
Name Type Description coordinatesol.coordinates WGS coordinates to transform
Returns:
Lambert93 coordinates