Open YaakovDavid opened 5 years ago
Did you add the ‘map’ namespace at the outermost component tag?
Yes, this is what it looks like
<Page class="page"
navigatingTo="onNavigatingTo"
xmlns:dd="nativescript-drop-down"
xmlns:mtf="nativescript-masked-text-field"
xmlns:CheckBox="nativescript-checkbox"
xmlns:map="nativescript-mapbox"
xmlns="http://schemas.nativescript.org/tns.xsd">
At the moment all I want to be able to do is put a map up, I don't need the users location or anything else like that
Did you try the demo app?
Yes, I went into nativescript-mapbox/demo
and ran tns run ios
Successfully installed on device with identifier '869C07C8-E288-4D7F-AAF1-7DB78F487B8F'.
Successfully transferred all files on device 869C07C8-E288-4D7F-AAF1-7DB78F487B8F.
Restarting application on device 869C07C8-E288-4D7F-AAF1-7DB78F487B8F...
Successfully synced application org.nativescript.mapbox on device 869C07C8-E288-4D7F-AAF1-7DB78F487B8F.
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x110590c1f NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool, bool)
2 0x1105ba8ea NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3 0x110f87ced ffi_closure_unix64_inner
4 0x110f88642 ffi_closure_unix64
5 0x113c1902f _CFXRegistrationPost
6 0x113c18d71 ___CFXNotificationPost_block_invoke
7 0x113cffae2 -[_CFXNotificationRegistrar find:object:observer:enumerator:]
8 0x113c18694 _CFXNotificationPost
9 0x111746589 -[NSNotificationCenter postNotificationName:object:userInfo:]
10 0x1151798c2 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:]
11 0x11517ec2f -[UIApplication _runWithMainScene:transitionContext:completion:]
12 0x11499d4e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
13 0x1149a629c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:]
14 0x11499d126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]
15 0x11499dae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:]
16 0x11499bcb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
17 0x11499b95f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]
18 0x1149a0a90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
19 0x1149a180e _performActionsWithDelayForTransitionContext
20 0x1149a07ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
21 0x1149a593a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:]
22 0x11517d44e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:]
23 0x114d21d09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:]
24 0x11dddb2da -[FBSSceneImpl _didCreateWithTransitionContext:completion:]
25 0x11dde6443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2
26 0x11dde5b3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke
27 0x11423454b _dispatch_client_callout
28 0x11423760b _dispatch_block_invoke_direct
29 0x11de1aba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
30 0x11de1a860 -[FBSSerialQueue _performNext]
31 0x11de1ae40 -[FBSSerialQueue _performNextFromRunLoopSource]
JavaScript stack trace:
1 require@file:///app/main-view-model.js:7:36
2 anonymous@file:///app/main-view-model.js:7:36
3 evaluate@[native code]
4 moduleEvaluation@[native code]
5 @[native code]
6 promiseReactionJob@[native code]
7 require@[native code]
8 anonymous@file:///app/main-page.js:4:32
9 evaluate@[native code]
10 moduleEvaluation@[native code]
11 @[native code]
12 promiseReactionJob@[native code]
13 require@[native code]
14 _loop_1@file:///app/tns_modules/tns-core-modules/globals/globals.js:60:30
15 loadModule@file:///app/tns_modules/tns-core-modules/globals/globals.js:68:30
16 @file:///app/tns_modules/tns-core-modules/ui/builder/builder.js:65:37
17 @file:///app/tns_modules/tns-core-modules/ui/builder/builder.js:81:39
18 navigate@file:///app/tns_modules/tns-core-modules/ui/frame/frame-common.js:118:49
19 createRootView@file:///app/tns_modules/tns-core-modules/application/application.js:246:31
20 setWindowContent@file:///app/tns_modules/tns-core-modules/application/application.js:210:38
21<…>
JavaScript error:
file:///app/main-view-model.js:7:36: JS ERROR Error: Could not find module 'nativescript-mapbox'. Computed path '/Users/yaakov/Library/Developer/CoreSimulator/Devices/869C07C8-E288-4D7F-AAF1-7DB78F487B8F/data/Containers/Bundle/Application/A9A8B774-034C-46E8-B78E-39039ADB1B2A/demo.app/app/tns_modules/nativescript-mapbox'.
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Could not find module 'nativescript-mapbox'. Computed path '/Users/yaakov/Library/Developer/CoreSimulator/Devices/869C07C8-E288-4D7F-AAF1-7DB78F487B8F/data/Containers/Bundle/Application/A9A8B774-034C-46E8-B78E-39039ADB1B2A/demo.app/app/tns_modules/nativescript-mapbox'.
at
1 require@file:///app/main-view-model.js:7:36
2 anonymous@file:///app/main-view-model.js:7:36
3 evaluate@[native code]
4 moduleEvaluation@[native code]
5 @[native code]
6 promiseReactionJob@[native code]
7 require@[native code]
8 anonymous@file:///app/main-page.js:4:32
9 evaluate@[native code]
10 moduleEvaluation@[native code]
11 @[native code]
12 promiseReactionJob@[native code]
13 require@[native code]
14 _loop_1@file:///app/tns_modules/tns-core-modules/globals/globals.js:60:30
15 loadModule@file:///app/tns_modules/tns-core-modules/globals/globals.js:68:30
16 @file:///app/tns_modules/tns-core-modules/ui/builder/<…>
I got it to work by pasting the code from the demo app into my project.
Thank you for this plugin!
I am trying the basic XML example and nothing shows on my screen. When I go to Mapbox it shows no activity.
I copied the XML example to a tabView, added my token, got rid of
showUserLocation
(because I don't need it at the moment and added<service android:name="com.mapbox.services.android.telemetry.service.TelemetryService" />
to theandroidManifest