-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Documentation] How to add access token. #27
Comments
So my issue is in the documentation it lists an old js / css version. |
Inside controller would work |
For those reading this, you need to inject the mapboxService like so:
|
Hi @joelkinzel . I tried adding this code to my index.html file:- <script> var app = angular.module('Kawasaki', ['ui.router', 'ngStamplay', 'angular-mapbox']).run(function(mapboxService){ mapboxService.init({ accessToken: 'MY_API_KEY' }); }) </script>The screenshot contains the header response of the network calls which shows that the map isn't displayed because of a 401(Unauthorized) error. |
@tinker20 - This should go inside your Angular controller file. |
Hi Joel, I have tried adding this to the controller. Still the request is angular.module('starter', ['angular-mapbox']).run(function(mapboxService){
user.instance.profileImg, user.instance._id, user.instance.email, true) Any help with that? Thanks On Fri, Sep 11, 2015 at 5:20 PM, joelkinzel [email protected]
|
I've added
mapboxService.init({ accessToken: 'YOUR_ACCESS_TOKEN' });
a few times, but its not being used when requesting tiles.
I've tried it in my run and config. Where do I put it?
The text was updated successfully, but these errors were encountered: