Note: LeafletMap communication: For performance reasons, we decide to use component programatically (i.g: $refs.map.drawGeometries) rather than representing leaflet geometries with vue components. Note: Z-Index: SimplicitiMap should be responsable of re-ordering layer types in the right order. I.g: Positions should always draw on top of linestrings.
- To Do:
-
- Methods should not be used directly (i.g $refs.map.drawPositionsMarkersFromData) but instead, called from inside this component based on store changes (simpliciti_map store)
View Source components/shared/SimplicitiMap/SimplicitiMap.vue, line 32
Methods
# bindReverseGeocodingOnClickFeature()
Function that binds reverse geocoding service to Leaflet map on click events. On single click it will return an address depending on the coordinates of the click, and on double click it will clear the timeout set by single click.
# drawChronoMarkers()
Draw all Chrono Markers on the SimplicitiMap
# drawCircuitArrowsFromPolylines()
Draw direction arrows (for single circuit execution)
# drawPolylines()
Draw Polylines (Linestrings) on the map
- Used by Location - History mode - History tab (Related history)
- Used by Location - History mode - Circuit tab (Related circuit exec)
- Used by Location - Realtime mode - History tab (Dernier historique)
- Used by Location - Realtime mode - Circuit tab (Dernier circuit exec)
# drawSpeedPolylines()
Speed polylines will always start hidden (Toggleable from MapOptions)
# drawTripStepsmarkers()
Draw contact ON/OFF markers (Also know as trip history step markers) (Red/Green)
# getLeafletMapWrapper()
Get LeafletMap component (child)
# getMap()
Get Leaflet map instance
# highlightSingleLeafletPolylineGeometry()
Note: Highlighted polyline has also direction arrows
# toggleAllMapLayers()
Removes/Add all the available featureGroups (layers) from the map (LeafletMap::map) at once.
# toggleMapLayers(options)
Toggles the specified layer groups from LeafletMap.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object
|
The object containing layerName and enabled that determines which layer to toggle |
# updateHighlightedPolylineItemIfAny()
Note: map polylines can be highlighted
# waitForMapRef()
Vue DOM references might take some extra time to initialize