1.0.13 • Published 6 years ago

ngx-mapbox v1.0.13

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

Angular module wrapper for mapbox

This module is create from angular cli

Requierment

Mapbox

npm install --save mapbox-gl

Installation

npm install --save angular-mapbox

Get Started

//app.module.ts
...
import { MapBoxModule } from 'angular-mapbox/module';
...
@NgModule({
    ...
    imports: [
        ...
        MapBoxModule.forRoot('YOU_MAPBOX_API_KEY')
        ...
    ],
    ...
});

Usage

<ng-mapbox></ng-mapbox>

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

eventsdescriptionsdata parameter
addControladd a mapbox control to the map{control : mapboxgl.Control, position : string}
removeControlremove a mapbox control to the mapcontrol : mapboxgl.Control
addNavigationControladd Navigation controlposition : string
removeNavigationControlremove Navigation controlnone
addScaleControladd Scale controlposition : string
removeScaleControlremove Navigation controlnone
addSourceadd Source to the mapdata is Source type
removeSourceremove Source to the mapid : string
addLayeradd Layer to the mapdata is Layer type
removeLayerremove Layer to the mapid : string
addMarkeradd Marker to the mapdata is Marker type
removeMarkeremove Marker to the mapid : string
1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago