NS3 Running basic example
See original GitHub issuewhen I run the following code I get the error below the code. using 2.0.3
<Page xmlns="http://www.nativescript.org/tns.xsd" xmlns:maps="nativescript-google-maps-sdk" loaded="pageLoaded">
<GridLayout>
<maps:mapView latitude="{{ latitude }}" longitude="{{ longitude }}"
zoom="{{ zoom }}" bearing="{{ bearing }}"
tilt="{{ tilt }}" i-padding="50,50,50,50" padding="{{ padding }}"
mapReady="onMapReady"
markerSelect="onMarkerSelect"
cameraChanged="onCameraChanged"
/>
</GridLayout>
</Page>
05-05 14:53:37.879 6225 6225 V JS : com.tns.NativeScriptException:
05-05 14:53:37.879 6225 6225 V JS : Calling js method onMapReady failed
05-05 14:53:37.879 6225 6225 V JS :
05-05 14:53:37.879 6225 6225 V JS : Error: Now use instance.nativeView instead of instance.android
05-05 14:53:37.879 6225 6225 V JS : File: "file:///data/data/com.myApp/files/app/tns_modules/nativescript-google-maps-sdk/map-view.js, line: 200, column: 12
05-05 14:53:37.879 6225 6225 V JS :
05-05 14:53:37.879 6225 6225 V JS : StackTrace:
05-05 14:53:37.879 6225 6225 V JS : Frame: function:'get', file:'file:///data/data/com.myApp/files/app/tns_modules/nativescript-google-maps-sdk/map-view.js', line: 200, column: 19
05-05 14:53:37.879 6225 6225 V JS : Frame: function:'onMapReady', file:'file:///data/data/com.myApp/files/app/views/maptest/maptest5.js', line: 56, column: 16
05-05 14:53:37.879 6225 6225 V JS : Frame: function:'Observable.notify', file:'file:///data/data/com.myApp/files/app/tns_modules/tns-core-modules/data/observable/observable.js', line: 103, column: 23
05-05 14:53:37.879 6225 6225 V JS : Frame: function:'MapViewBase.notifyMapReady', file:'file:///data/data/com.myApp/files/app/tns_modules/nativescript-google-maps-sdk/map-view-common.js', line: 74, column: 14
05-05 14:53:37.879 6225 6225 V JS : Frame: function:'onMapReady', file:'file:///data/data/com.myApp/files/app/tns_modules/nativescript-google-maps-sdk/map-view.js', line: 144, column: 23
05-05 14:53:37.879 6225 6225 V JS :
05-05 14:53:37.879 6225 6225 V JS :
05-05 14:53:37.879 6225 6225 V JS : at com.tns.Runtime.callJSMethodNative(Native Method)
05-05 14:53:37.879 6225 6225 V JS : at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1021)
05-05 14:53:37.879 6225 6225 V JS : at com.tns.Runtime.callJSMethodImpl(Runtime.java:903)
05-05 14:53:37.879 6225 6225 V JS : at com.tns.Runtime.callJSMethod(Runtime.java:890)
05-05 14:53:37.879 6225 6225 V JS : at com.tns.Runtime.callJSMethod(Runtime.java:874)
05-05 14:53:37.879 6225 6225 V JS : at com.tns.Runtime.callJSMethod(Runtime.java:866)
05-05 14:53:37.879 6225 6225 V JS : at com.tns.gen.com.google.android.gms.maps.OnMapReadyCallback.onMapReady(OnMapReadyCallback.java:11)
05-05 14:53:37.879 6225 6225 V JS : at com.google.android.gms.maps.MapFragment$zza$1.zza(Unknown Source)
05-05 14:53:37.879 6225 6225 V JS : at com.google.android.gms.maps.internal.zzt$zza.onTransact(Unknown Source)
05-05 14:53:37.879 6225 6225 V JS : at android.os.Binder.transact(Binder.java:499)
05-05 14:53:37.879 6225 6225 V JS : at com.google.android.gms.maps.internal.bh.a(:com.google.android.gms.DynamiteModulesB:82)
05-05 14:53:37.879 6225 6225 V JS : at com.google.maps.api.android.lib6.impl.bh.run(:com.google.android.gms.DynamiteModulesB:1891)
05-05 14:53:37.879 6225 6225 V JS : at android.os.Handler.handleCallback(Handler.java:751)
05-05 14:53:37.879 6225 6225 V JS : at android.os.Handler.dispatchMessage(Handler.java:95)
05-05 14:53:37.879 6225 6225 V JS : at android.os.Looper.loop(Looper.java:154)
05-05 14:53:37.879 6225 6225 V JS : at android.app.ActivityThread.main(ActivityThread.java:6077)
05-05 14:53:37.879 6225 6225 V JS : at java.lang.reflect.Method.invoke(Native Method)
05-05 14:53:37.879 6225 6225 V JS : at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
05-05 14:53:37.879 6225 6225 V JS : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
05-05 14:53:37.879 6225 6225 V JS : {} +2
0
Any idea what is going on here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Running scripts - NS-3
Running C++ scripts. Once the build is done and all tests pass, one generally wants to run a couple of examples as per...
Read more >cqu-bdsc/NS3-example: A example about how to run ns3
A example about how to run ns3. Contribute to cqu-bdsc/NS3-example development by creating an account on GitHub.
Read more >32 The ns-3 Network Simulator
Let us now run a script, for example, the file first.cc included in the ... size 7 */ using namespace ns3; std::string fileNameRoot...
Read more >How to Run NS3 Program in Ubuntu - Network Simulation Tools
1. Initially , install the NS-3.26 tool by using the ns-allinone-3.26.tar.bz2 package. For make install use and execute the command ./build.py 2. Initially,Next...
Read more >Ubuntu Manpage: ns-3-tutorial
In this tutorial, we will build several example simulations, introducing and explaining key concepts and features as we go. As the tutorial unfolds,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into a similar issue with a Nativescript Vue app and solved it by setting a height on the map component (height=“100%”). Worth a try if you’re getting the “Now use instance.nativeView instead of instance.ios/android” and other solutions don’t work.
I have same error bt i cant understand the problem, i’m not using mapView.android nowhere… my onmap ready function looks like this: