Traffic map creation
- Traffic map creation
map = new longdo.Map({ layer: [ longdo.Layers.GRAY_EN, longdo.Layers.TRAFFIC ], zoom: 12, placeholder: document.getElementById('map'), lastView: false. language: 'en' });
- layer: Map layers can be stacked
- zoom: initial zoom value
- placeholder: A DOM element to place the map in
- lastView: Move to latest position
- Show overlays
map.Overlays.load(longdo.Overlays.events); map.Overlays.load(longdo.Overlays.cameras);
- Parameter : Overlays type
Add/Remove layers
- Add traffic layer
map.Layers.add(longdo.Layers.TRAFFIC);
Example - Remove traffic layer
map.Layers.remove(longdo.Layers.TRAFFIC);
Example - Clear all layers
map.Layers.clear();
Example
Add/Remove overlays
- Load overlays based on type
map.Overlays.load(longdo.Overlays.cameras);
Example - Hide overlays based on type
map.Overlays.unload(longdo.Overlays.events)
Example