Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.22 KB

README.md

File metadata and controls

42 lines (32 loc) · 1.22 KB

ember-mapbox-gl

Latest NPM release TravisCI Build Status Ember Observer Score

Ember integration with mapbox-gl-js.

Installation

ember install ember-mapbox-gl

Example

{{#mapbox-gl as |map|}}
  {{#map.source data=wanderDrone as |source|}}
    {{source.layer layerType='symbol' layoutOptions=(hash icon-image='rocket-15')}}
  {{/map.source}}

  {{#if curLocation}}
    {{#map.marker lngLat=curLocation as |marker|}}
      {{#marker.popup}}
        This is where you are!
      {{/marker.popup}}
    {{/map.marker}}

    {{map.call 'easeTo' (hash center=curLocation)}}
  {{/if}}

  {{map.on 'click' (action 'onClick')}}
{{/mapbox-gl}}