Naimikan / angular-mapboxgl-directive

AngularJS directive for Mapbox GL
https://naimikan.github.io/angular-mapboxgl-directive/
MIT License
49 stars 21 forks source link

Cannot find name mapboxgl #34

Closed ddelella closed 7 years ago

ddelella commented 7 years ago

Version: 0.40.1 Angular: 1.5.9

Installed both the directive and mapbox-gl from npm. Added the .run(...) with access token to the end of the app.module('app',['mapboxgl-directive']) command. Added the HTML to my controller files. The error is being produced from the access token setting in the app.module().run() block of code as per the examples. I have tons of other controls installed but this is the first that did not work.

angular.module('app', [ 'agGrid', 'ui.router', 'ui.bootstrap', 'mapboxgl-directive' ]).run([function () { mapboxgl.accessToken = 'pk.eyJ1IjoibmFpbWlrYW4iLCJhIjoiY2lraXJkOXFjMDA0OXdhbTYzNTE0b2NtbiJ9.O64XgZQHNHcV2gwNLN2a0Q'; }])

Naimikan commented 7 years ago

Hi @ddelella!

Can you provide me an example? Thank you!