Modify the base map of a loaded mmpk

666
3
07-05-2017 08:00 AM
AkanéLevy
New Contributor

Hi, 

I am working with the ArcgisRuntime QML SDK 100.0, and wanted to know if it is possible to change the basemap of a loaded mmpk. I tried but I could not manage to display the basemap...

If this is not possible, would it be possible instead to add the operational layers loaded from the mmpk to a basemap ?

Thanks,

Tags (1)
0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

Yes, this is possible. A Map in a MMPK is no different than any other map, so you can set its basemap, modify the operational layers, etc.

0 Kudos
AkanéLevy
New Contributor

Thanks for your fast reply. So basically, something like that : 

mmpk.maps[0].basemap = ArcGISRuntimeEnvironment.createObject("BasemapImagery");

should work ? Because with that, the imagery would not display, could you please tell me what is wrong ?

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Yes, that should work. My best guess is the map is created in a spatial reference other than wkid 3957 spatial reference, and then you try and add that basemap, which is in 3857, and the basemap tiles cannot reproject, so it doesn't display the imagery.

0 Kudos