Why does the basemap change when downloading a mobile map package?

3296
21
Jump to solution
08-16-2019 01:41 PM
NathanielSimmons2
New Contributor II

I am creating a mobile map package in ArcGIS Pro that I want to upload to ArcGIS Enterprise, and then download it for offline use on iPads. Before I created the mobile map package, I added the light gray canvas basemap, and used the "Download Map" button (from the Map tab) to clip the basemap so it could be uploaded and used offline. Then I created the mobile map package and successfully uploaded it onto ArcGIS Enterprise. 

On the iPad, I downloaded the map, but when I opened it (on the iPad) it was showing the "Streets" (yellow) basemap. I have tried this a handful of times and I keep getting the same result.

Has anyone else experienced this issue or know of a patch/fix that is coming soon?

1 Solution

Accepted Solutions
MarkBockenhauer
Esri Regular Contributor

Snezana,

 

There must have been an update to the portal that handles the response.   Use this to download a .zip of the resources.

https://cdn.arcgis.com/sharing/rest/content/items/df541726b3df4c0caf99255bb1be4c86/resources/export?f=zip

Mark

 

View solution in original post

21 Replies
NathanielSimmons2
New Contributor II

Can anyone confirm that this is a bug? I'd like to at least know if other people are facing the same issue...

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Yes, it is a bug or flaw of the system.   Many of the Esri basemaps are based on the same vector tile set.  The vector tile set has an internal style, which is the "Yellow Streetmap" that you are seeing when using the Mobile Map Package.  ArcGIS Pro is using an external style, custom style, that over-rides the internal style.  When the mobile map package is created the custom style is not included in the package.  Work is being done to address this in the next release of ArcGIS Pro.   In addition to this, your IPad App will also need to know how to use the custom style associated with the Vector Tile Package, this work is being done in ArcGIS Runtime update 7 - both Pro and Runtime updates schedule to be complete before the end of this year.

Here is a description of the problem and a manual workaround.

Explanation of Problem

Specify World Street Night as your basemap.

 

Zoom to desired area and click Download Map, check “Include basemap & tile layers” and download map.

 

The VTPK is downloaded and added to the map. Style looks fine. ArcGIS Pro is holding the custom style in the Layer properties.

 

If you Add data and browse to the downloaded VTPK file on disk and add it, you will see that Pro uses the internal style to display it.  The VTPK itself, does not know anything about the custom style.

 

To work around this problem, for now, the internal style for the VTPK can be manually updated.

 

First, we need a style to update it with.  This can be a custom style created with the Vector Tile Style Editor https://developers.arcgis.com/vector-tile-style-editor/  or any Esri  Vector basemap.  Sticking with the example, on ArcGIS Online we can search for the “World Street Map (Night)” style.

 

View the Item and click “View Style”

 

Copy the style into a text editor, its helpful if the editor can format the JSON.

 

Copied the JSON into an editor and saved the file as “World Street Map Night.txt”

 

If you look at the second line, we also want to get the sprite resources.  If you put the first part of the URL into web browser you can access them. These are the resources for World Street Map (Night)

https://cdn.arcgis.com/sharing/rest/content/items/8e848d9302e84dcba0de7aff8ac429dc/resources/

 

If we look at the World Street Map VTPK that was downloaded to our file system, we can use 7 zip to extract all the files.

You will see a folder structure that matches the files listed in the web browser. Styles, Sprites and Info.

Download the online resource files and replace the internal files in the info and sprites folders with the downloaded files.

For the styles folder we want to replace the root.json file that is in that folder, using the World Street Map Night.txt file that we created, but we want to modify it a bit first.

If you look at the internal root.json file in the styles folder, you will see that the first lines reference resources in the folder structure, we also want to do this with the World Street Map Night.txt file.(it is referencing online resources)

 

Once you have replaced the lines, save World Street Map Night.txt as root.json.  Replace the root.json file in the resources/styles folder.

 

 

Then use 7 zip to create a new VTPK archive with the updated internal files.

 

 

Use 7 zip setting pictured above.

 

Then add to the VTPK to ArcGIS Pro and you will see the correct styling.  Since internal styling is updated, when you create the Mobile Map Package this will be included and continue to work when using the Mobile Map Package.

Mark

EvanOlivier
New Contributor III

Mark Bockenhauer

This section "If you look at the second line, we also want to get the sprite resources.  If you put the first part of the URL into web browser you can access them." does not work for topographic, or any other style for that matter. All I get when I enter the first part of the URL for any of them is an empty page with API Reference on it, as seen in the below image.

What exactly am I missing here?
It seems the only sprite url that works is the one you pasted above. Please explain when you have a moment.

Additionally, why on Earth is this not handled more effectively by esri? This all seems quite burdensome.
It should not be this difficult to get proper styling in a vector tile package.


Thanks.

Evan

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Evan,

I agree with you on the difficulty of getting the vector style you want..., that's why I provided a workaround, and I know it's not ideal. 

Specific to your inquiry the last / is important 

https://cdn.arcgis.com/sharing/rest/content/items/df541726b3df4c0caf99255bb1be4c86/resources/

I have been using feedback like yours to raise awareness with my colleagues, for a better vector tile style download experience.

Thanks,
Mark

EvanOlivier
New Contributor III

Mark,

Thank you for your prompt response, I really appreciate it.

Good to know the last "/" is important. Sometimes it's crucial to leave that out when dealing with other esri workflows and apps. I appreciate you clarifying that for me.


I also appreciate you bringing this up with your colleagues, as there should be included functionality for styling in both mmpk and vtpk file downloading through pro.

That would make things far more efficient for the users.

Thank you again.

0 Kudos
EvanOlivier
New Contributor III

Mark Bockenhauer


I can confirm this workaround works for Collector for ArcGIS Aurora sideloaded VTPKs as well.

I am thrilled I was able to successfully edit and replace all necessary files after you pointed out the final "/" and am grateful for your time and effort in putting this workaround together. Glad I had visual studio code to make json files with.

I finally have a topographic styled vtpk on the device, just in time too.

Thank you kindly sir!

Best,

Evan

snec
by
New Contributor

Hello @MarkBockenhauer ,

I am facing this issue also, even when opening the URLs with / at the end, an empty page with API Reference is displayed:

2021-05-06_15h30_35.png

Do you have any other suggestions to get through the workaround?

Thank you and best regards,

Snezana

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Snezana,

 

There must have been an update to the portal that handles the response.   Use this to download a .zip of the resources.

https://cdn.arcgis.com/sharing/rest/content/items/df541726b3df4c0caf99255bb1be4c86/resources/export?f=zip

Mark

 

SnezanaEckl
Esri Contributor

Hi @MarkBockenhauer ,

Thank you very much. This Link works.

Best regards,

Snezana

0 Kudos