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

add support for mapbox style URLs #38

Merged
merged 1 commit into from
Oct 15, 2016
Merged

add support for mapbox style URLs #38

merged 1 commit into from
Oct 15, 2016

Conversation

thatrainbowbear
Copy link
Contributor

No description provided.

@ahalls ahalls mentioned this pull request Oct 6, 2016
@EddyVerbruggen EddyVerbruggen merged commit b103c7b into Yermo:master Oct 15, 2016
@EddyVerbruggen
Copy link
Collaborator

Sweet! 👍

@request-eduardo
Copy link

Hi, The custom style url are working perfectly for me on android, but on ios when the map is getting rendered (with the custom style url instead of the predefined ones) it crashes with the following message:

-[__NSCFString scheme]: unrecognized selector sent to instance 0x7878d520
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString scheme]: unrecognized selector sent to instance 0x7878d520'
*** First throw call stack:
(
0 CoreFoundation 0x04173bf2 __exceptionPreprocess + 194
1 libobjc.A.dylib 0x03c33e66 objc_exception_throw + 52
2 CoreFoundation 0x041ed3bc -[NSObject(NSObject) doesNotRecognizeSelector:] + 172
3 CoreFoundation 0x040f24fc forwarding + 1052
4 CoreFoundation 0x040f20be _CF_forwarding_prep_0 + 14
5 Mapbox 0x0058dc1d _Z20MGLDurationInSecondsd + 1000
6 Mapbox 0x0058d992 _Z20MGLDurationInSecondsd + 349
7 NativeScript 0x01013688 ffi_call_i386 + 24
)
*** JavaScript call stack:
(
0 initWithFrameStyleURL@[native code]
1 drawMap@file:///app/tns_modules/nativescript-mapbox/mapbox.js:42:66
2 tick@file:///app/tns_modules/timer/timer.js:17:26
3 UIApplicationMain@[native code]
4 start@file:///app/tns_modules/application/application.js:251:30
5 anonymous@file:///app/app.js:10:18
6 evaluate@[native code]
7 moduleEvaluation@:1:11
8 @:7:50
9 promiseReactionJob@:1:11
)
Dec 15 17:09:49 Admins-Mac com.apple.CoreSimulator.SimDevice.8020827F-752E-4CEA-938C-C178D02DF3F5.launchd_sim[2127] (UIKitApplication:org.nativescript.plocmobile[0x631a][5423]): Service exited due to Abort trap: 6

I've tried without the style url and it works fine... Is there a way to fix this misbehavior?

Thanks in advance, wonderful job

@EddyVerbruggen
Copy link
Collaborator

Hi @request-eduardo what's the style URL you're using? (want to reproduce the error)

@request-eduardo
Copy link

I found the problem already... Android accepts the style URL as the mapbox studio site provides it, with mapbox:// (only 2 slashes) but iOS only accepts it with mapbox:/// (3 slashes). After I changed it for iOS I noticed Android doesn't care which one I use, so I ended up just using 3 slashes.

Thanks a lot for following the issue and answering so promptly, I expect this answer is useful for anyone else who runs into this

@EddyVerbruggen
Copy link
Collaborator

Ha, thanks for sharing indeed!

EddyVerbruggen added a commit that referenced this pull request Apr 18, 2017
add support for mapbox style URLs
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

Successfully merging this pull request may close these issues.

3 participants