<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use other layers with Mobile Map Package (mmpk)? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-use-other-layers-with-mobile-map-package/m-p/521193#M3550</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ArcGIS PRO, the Map that I created the Mobile Map package from lists its reference as WGS 1984 Web Mercator Auxiliary Sphere. I believe that is the same for your World Topo Map and just about everything.&lt;/P&gt;&lt;P&gt;In the debugger, I can log the spatial reference for the Mobile Map.&lt;/P&gt;&lt;P&gt;The getSpatialreference returns null for all the layers, including the World Topo Layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Log.&lt;SPAN style="font-style: italic;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TAG&lt;/SPAN&gt;,&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Mobile Map SR: "&amp;nbsp; &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.getSpatialReference().getWKText());

Mobile Map SR: 
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]


&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ArcGISTiledLayer tiledLayerBaseMap = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISTiledLayer(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FWorld_Topo_Map%2FMapServer" target="_blank"&gt;http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;If I add the World Topo Map to the basemap after adding the map to the MapView, it definitely does not show. &lt;BR /&gt;The layers from the Mobile Map do show on a grid. &lt;BR /&gt;&lt;BR /&gt;If I add the World Topo Map to the basemap before adding the map to the MapView, NOTHING shows. &lt;BR /&gt;Mapview is all gray with out even a grid or a notice about "Developer Use Only.&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:44:02 GMT</pubDate>
    <dc:creator>NathanMellor</dc:creator>
    <dc:date>2021-12-11T22:44:02Z</dc:date>
    <item>
      <title>How to use other layers with Mobile Map Package (mmpk)?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-use-other-layers-with-mobile-map-package/m-p/521191#M3548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would I go about using other layers with those in a Mobile Map package?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The examples assume i want the&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE class=""&gt;&lt;CODE class=""&gt;&lt;SPAN class=""&gt;// Create a MobileMapPackage from the offline map directory path&lt;/SPAN&gt;&lt;SPAN class=""&gt;final&lt;/SPAN&gt; MobileMapPackage offlineMapPackage = &lt;SPAN class=""&gt;new&lt;/SPAN&gt; MobileMapPackage(mMobileMapPackage); offlineMapPackage.loadAsync(); offlineMapPackage.addDoneLoadingListener(&lt;SPAN class=""&gt;new&lt;/SPAN&gt; Runnable() {&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;@Override&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class=""&gt;public void run() &lt;/SPAN&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;// Get the title from the package metadata&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&lt;SPAN class=""&gt;"Title: "&lt;/SPAN&gt; + offlineMapPackage.getItem().getTitle());&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;// Get the map from the package and set it to the MapView&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mMapView.setMap(offlineMapPackage.getMaps().get(&lt;SPAN class=""&gt;0&lt;/SPAN&gt;));&amp;nbsp;&amp;nbsp; } });

But suppose the MobileMap lacks a basemap or some other layer that is packaged separately. 

The following things DON'T work. 
1. Load map from package, then add layers to it. 
&lt;/CODE&gt;&lt;/CODE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; ArcGISTiledLayer tiledLayerBaseMap = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISTiledLayer(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FWorld_Topo_Map%2FMapServer" target="_blank"&gt;http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;);

&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.getBasemap().getBaseLayers().add(tiledLayerBaseMap);

No errors. The basemap seems to be added. I just never see it. 

&lt;/PRE&gt;&lt;CODE class=""&gt;&lt;CODE class=""&gt;&lt;CODE class=""&gt;2. Try to detach the layers from the mobile map packagemap and place it in an already created map. &lt;BR /&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap &lt;/SPAN&gt;= &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mapPackage&lt;/SPAN&gt;.getMaps().get(&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;);

&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;ArcGISMap defaultMap = new ArcGISMap(Basemap.Type.TOPOGRAPHIC_VECTOR,44.417,-112.08,11);
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;for(int i=0;i&amp;lt;mMap.getBasemap().getBaseLayers().size(); i++)
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;{
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; Layer l = mMap.getBasemap().getBaseLayers().remove(0);
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; defaultMap.getBasemap().getBaseLayers().add(l);
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;}
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;for(int j=0;j&amp;lt;mMap.getOperationalLayers().size(); j++)
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;{
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; Layer o = mMap.getOperationalLayers().remove(0);
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; defaultMap.getOperationalLayers().add(o);
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;CODE class=""&gt;&lt;BR /&gt;This works even less. The map is completely invalid and only shows gray. Not even a grid. &lt;BR /&gt;&lt;BR /&gt;What might still work:&lt;BR /&gt;&lt;BR /&gt;3. Unpack the mobile map package and load the .geodatabase(s) individually from file. Look for them in the p14 folder. &lt;BR /&gt;4. Distribute .geodatabase files and other files separately. &lt;BR /&gt;Since .geodatabase is not one of the file types allowed as a portal item in ArcGIS Online, I don't think that is intended. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-use-other-layers-with-mobile-map-package/m-p/521191#M3548</guid>
      <dc:creator>NathanMellor</dc:creator>
      <dc:date>2021-12-11T22:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use other layers with Mobile Map Package (mmpk)?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-use-other-layers-with-mobile-map-package/m-p/521192#M3549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This doesn't sound right. You should be able just to modify the basemaps/operational layers like you do with any other map. You could try to replace the Basemap with a new instance instead of changing the layers inside of the existing basemap.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember to check that the basemap is in the same Spatial Reference with the map, if it isn't then you won't be able to see it. I tried to use the code from the 1st option in .NET and it seems to work (when the map is in the same SR). What I did before that was clearing the current baselayers and then adding the new layer as well. Could you verify that the Map, Basemap Service and Operational Layers are in the correct SR?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 11:26:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-use-other-layers-with-mobile-map-package/m-p/521192#M3549</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2018-05-29T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use other layers with Mobile Map Package (mmpk)?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-use-other-layers-with-mobile-map-package/m-p/521193#M3550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ArcGIS PRO, the Map that I created the Mobile Map package from lists its reference as WGS 1984 Web Mercator Auxiliary Sphere. I believe that is the same for your World Topo Map and just about everything.&lt;/P&gt;&lt;P&gt;In the debugger, I can log the spatial reference for the Mobile Map.&lt;/P&gt;&lt;P&gt;The getSpatialreference returns null for all the layers, including the World Topo Layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Log.&lt;SPAN style="font-style: italic;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TAG&lt;/SPAN&gt;,&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Mobile Map SR: "&amp;nbsp; &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.getSpatialReference().getWKText());

Mobile Map SR: 
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]


&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ArcGISTiledLayer tiledLayerBaseMap = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISTiledLayer(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FWorld_Topo_Map%2FMapServer" target="_blank"&gt;http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;If I add the World Topo Map to the basemap after adding the map to the MapView, it definitely does not show. &lt;BR /&gt;The layers from the Mobile Map do show on a grid. &lt;BR /&gt;&lt;BR /&gt;If I add the World Topo Map to the basemap before adding the map to the MapView, NOTHING shows. &lt;BR /&gt;Mapview is all gray with out even a grid or a notice about "Developer Use Only.&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:44:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-use-other-layers-with-mobile-map-package/m-p/521193#M3550</guid>
      <dc:creator>NathanMellor</dc:creator>
      <dc:date>2021-12-11T22:44:02Z</dc:date>
    </item>
  </channel>
</rss>

