Skip to content
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

Mapbox not working #22

Closed
shivapersad opened this issue Aug 5, 2016 · 3 comments
Closed

Mapbox not working #22

shivapersad opened this issue Aug 5, 2016 · 3 comments

Comments

@shivapersad
Copy link

TNS Version: 2.1.1

When I run "tns livesync ios --emulator --watch" I get the following error messages:

Aug 5 14:51:44 Shivas-Air cngMobileApp[70894]: 1 0x45b82c -[TNSRuntime executeModule:]
Aug 5 14:51:44 Shivas-Air cngMobileApp[70894]: 2 0x8c60b main
Aug 5 14:51:44 Shivas-Air cngMobileApp[70894]: 3 0x3cc5a25 start
Aug 5 14:51:44 Shivas-Air cngMobileApp[70894]: file:///app/tns_modules/nativescript-mapbox/mapbox.js:7:20: JS ERROR ReferenceError: Can't find variable: MGLOfflineStorage
Aug 5 14:51:44 Shivas-Air com.apple.CoreSimulator.SimDevice.20124C04-21CD-486F-9DFE-439512DD31BD.launchd_sim65148: Service exited due to signal: Segmentation fault: 11

I installed nativescript-mapbox using "tns plugin add nativescript-mapbox". Can you assist me as to what could be causing the issue? Thanks.

@EddyVerbruggen
Copy link
Collaborator

Perhaps you're trying to show a map before the app has started?

Please show me the code reproducing this issue as I can't get it to break..

@shivapersad
Copy link
Author

Got it to work. I'm using the angular version of Typescript so I confused some of the code and this may have caused the issue.

Thanks for the reply all the same.

@ttma1046
Copy link

ttma1046 commented Oct 14, 2016

I had the same issue. How did you fix it?

JS: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ReferenceError: Can't find variable: MGLOfflineStorage

I followed the steps what they do during last night's NativeScript 2.3.0 webinar by using Angular 2 typescript with NativeScript to build an ios app.

https://www.youtube.com/watch?v=WQktviwAGb0

I generate a token on mapbox.com after I registered an account and created a token with everything ticked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants