Angular module wrapper for mapbox
This module is create from angular cli
Requierment
npm install --save mapbox-gl
Installation
npm install --save angular-mapbox
Get Started
Add the module to your main module app
//app.module.ts...;...@;
Usage
You can add the balise in your html
Parameters :
-
input
- config : the map box configuration
- instructions : the event emiter to give instruction to the map
-
output
- map : gave an observable return the map instance
- informations : gave an observable to get information whene a layer or marker is added to the map
Events
events | descriptions | data parameter |
---|---|---|
addControl | add a mapbox control to the map | {control : mapboxgl.Control, position : string} |
removeControl | remove a mapbox control to the map | control : mapboxgl.Control |
addNavigationControl | add Navigation control | position : string |
removeNavigationControl | remove Navigation control | none |
addScaleControl | add Scale control | position : string |
removeScaleControl | remove Navigation control | none |
addSource | add Source to the map | data is Source type |
removeSource | remove Source to the map | id : string |
addLayer | add Layer to the map | data is Layer type |
removeLayer | remove Layer to the map | id : string |
addMarker | add Marker to the map | data is Marker type |
removeMarke | remove Marker to the map | id : string |