Adding Esri Map View


I am trying to add an Esri Map View using their Android SDK. I did some research and found a tutorial that I can use native-script to use any other library. I already configure the android in the gradle app. The problem I am facing is I am trying to add this into XML
I don’t know how to convert this layout into nativescript how would you do this.


Hi @noe
in the createNativeView method of the plugin,
you would do,
this.nativeView = new com.esri.arcgisruntime.mapping.view.MapView()

To read more about making UI plugins,
I recommend you read this doc


So the only way to use this is to create my own plugin. @multishiv19


It isn’t the only way.
You can directly write JSified native code in {N} if you want to.
Writing a plugin would be the best way to go about it IMO.


Am sorry I don’t understand the terminology JSified native code in {N}. Can you show me an example? I am new using the native script.


These links might help you

and also read some plugins, to see how java code is written using JS in {N}

Cheers! :slight_smile:


One last question? I found this piece of code mapView = new MapView(this); The this keyword in android how do I do that in native script.

const app = require("application");

mapView = new MapView(; 

it would look something like that for android, in {N} code


Thanks for your help I let you if that works and I am able to implement my map view. I will try to create a plugin and share with the community a lot to learn.


Sure @noe
That’ll be great!


I’m curious, did you ever get this to work?