Select to view content in your preferred language

Using ArcGIS Pro to put Esri Vector Tile basemaps in your Mobile Map

5476
11
07-03-2019 12:11 PM
MarkBockenhauer
Esri Regular Contributor
3 11 5,476

A prior article https://community.esri.com/community/gis/applications/arcgis-pro/blog/2018/06/30/using-arcgis-pro-22...  described how to put the Esri Word Imagery basemap in a mobile map.  With the release of ArcGIS Pro 2.7 the same workflow applies for Esri Vector Tile basemaps.

 

If your organization is using vector tile basemaps in the basemap gallery, it’s as simple as selecting the desired basemap in the basemap gallery.

 

 

Zooming to the desired area of interest and clicking ‘Download Map’ on the ribbon. Check the box to include basemap and tile layers.

 

 

 

When the process completes a vector tile package layer will be added to your map.

 

 

This layer can be packaged like any other layer.

For Organization admins, you can enable the use of Esri vector tile basemaps in your organization settings.

 

 

OK… so you are not an organization administrator and your organization is not using Esri vector basemaps, you can still export vector tile packages from vector tile services that support export.  In fact, I prefer modifying the styles for the vector tile services that I extract. Simply use the Vector Tile Style Editor https://developers.arcgis.com/vector-tile-style-editor/

The Vector Tile Style editor allows you to create and save custom styles for vector tile services.

For example; I chose the ‘Nova’ style.

I then made some modifications…  (a lot of people ask for basemaps that don't have labels, you can absolutely turn off all the labels).  In this example I changed the color of the streets to one that is more pleasing to me, for use in Navigator at night.

 

 

Save the style as your own...

 

...then back in ArcGIS Pro, search for, and add the styled tile service to your map.

 

Remove the default layers.

 

 

Then click Download Map  to get a map layer that is in your desired style.    

Note: the .vtpk file that is downloaded to the file system will not have the desired style.  Internally most Esri basemaps contain the World Streets Style.  If you use the .vtpk file on its own, side loaded or added to a new map and shared as a mobile map package... it will display in the world streets style.

 

 

 

That's it for now.

mark

11 Comments
MarkBockenhauer
Esri Regular Contributor

Currently there is a bug with the above workflow, a comment from this post describes the problem and provides a workaround.

This problem has been addressed, and the style will be package correctly in ArcGIS Pro 2.5.

by Anonymous User
Not applicable

Mark this still doesn't seem to work in the apps yet. I exported the Streets at Night to a vector tile package and loaded it on an ipad and the basemap shows the default coloring - no dark theme.

MarkBockenhauer
Esri Regular Contributor

Which App are you using, or rather version of ArcGIS Runtime.   Runtime 100.7 should show the correct style.  Note that you have to package the ArcGIS Pro layer.  If you use the VTPK file from disk directly, it will show the internal style, which is different.

by Anonymous User
Not applicable

I'm using Pro 2.5, so shouldn't it do it correctly? I did the download map in 2.5, and the vtpk file looks correct in Pro. But when I sideload the vtpk file into the app, I got a yellow basemap instead. I noticed in the workaround post it says to load the vtpk in pro and then create an mmpk and the style will be correct. I'd assume this should now work correctly when sideloading the vtpk by itself? Or is this only working with mmpks?

I re-read your post on the workaround thread and this confuses me: The .vtpk file on disk does have an internal style that differs from the style in the layer.  If you use the .vtpk directly (add data and browse for vtpk) it will display differently from the style downloaded with the vtpk."

So do standalone vtpk basemap files still not show the correct style? This seems to be way overly complicated than it needs to be. But right now loading a vtpk in Collector doesn't show the correct style.

MarkBockenhauer
Esri Regular Contributor

The steps will only work correctly if you  Create a Mobile Map Package from ArcGIS Pro.  the VTPK file still has the original styling inside of it, and the Pro layer has the new "override" styling.  When you create a Mobile Map Package the layer styling is included in the MMPK.   

You can use the manual steps of replacing the styling in the vtpk that I wrote about in this thread https://community.esri.com/thread/238736-why-does-the-basemap-change-when-downloading-a-mobile-map-p... 

Its not ideal, but its a way to get what you want.

by Anonymous User
Not applicable

Mark

My first go at those steps didn't work, but I did it a second time and it appears to have achieved what I want. I did this for 3 vector basemaps and they seem to work fine on an iPad, so it may be a doable workaround.

So I have to ask - what is the point of creating vector tile packages of basemaps from Pro if the VTPK doesn't "include" the proper style to load on a device for use as an offline vector basemap? Why does this only work in a mobile map package out of the box? This is like deja vu from two years ago when I had issues with TPK files and they only worked in MMPK files for vector data but not raster data, etc. Why does Esri release these neat little tools if they don't actually work properly? Wouldn't the main use of exporting a vtpk file is to use it as a standalone offline basemap and not only in an mmpk? Would be nice if these tools could just work correctly from the get go?

MarkBockenhauer
Esri Regular Contributor

Nathan,

Nathan Fazer wrote:

what is the point of creating vector tile packages of basemaps from Pro if the VTPK doesn't "include" the proper style to load on a device for use as an offline vector basemap? Why does this only work in a mobile map package out of the box? 

Sometimes functionality is released to meet the needs of a narrow workflow.  Particular to this case, the Pro workflow was not considering that some may want to use the downloaded vector tiles (.vtpk file) in runtime applications.  Mobile Map Package Creation is one thing in Pro that is primarily for use in the ArcGIS Runtime, for Pro 2.5 it was updated to include the correct styling.  Runtime update 7 was also enhanced to read the styling.  That is how it came to be...

Nathan Fazer wrote:

Wouldn't the main use of exporting a vtpk file is to use it as a standalone offline basemap and not only in an mmpk? 

This is definitely a common workflow.  I have asked a few teams to consider including custom styles in the .vtpk file that gets downloaded when extracted, and it is being considered.  I will also use this thread to re-raise awareness for this use case.

Thanks,

mark

by Anonymous User
Not applicable

This appears to be broken again in 2.7 - or maybe it was never fixed? I loaded a vector basemap in Pro 2.7, used the Download map and include basemap, created a vector tile package. Loaded that VTPK into a map and created a mobile map package to use in Field Maps on an Iphone 12, and the vector basemap shows up as the street map colors. I'm not wasting time editing vector tile packages to make it work this time. Please fix. Tried this with several vector basemaps - topo, community, etc. All look like the street map. Guess I'm confused as to how we're supposed to get a vector basemap into a mobile map package. I thought it was to create a VTPK and include that in a mmpk?

MarkBockenhauer
Esri Regular Contributor

Using ArcGIS Pro 2.7 and the current version of Fieldmaps, the downloaded basemap in ArcGIS Pro can work.

 

When creating the  mobile map package you need to use the Layer that is added to the map. 

StyleStoredinLayer.png

 

 

 

 

The desired style properties are stored in the Layer.   Fieldmaps will use this style when it is available.

 

Browsing for the .vtpk file that is download to the file system and adding that to the map will not work as desired.   

downloadedVTPKstyleisWorldStreet.png

by Anonymous User
Not applicable

Consider fixing this soon. We should be able to create a vtpk, rename it, move it, add it to projects, sideload on a device like the original TPK, etc. It's common sense. Restricting a vtpk to only the map it was created in doesn't help.

MarkBockenhauer
Esri Regular Contributor

@Anonymous User while it would require manually modifying the internal styling of the .vtpk to achieve what is wanted for a side loading scenario,  you can share the layer from ArcGIS Pro creating a layer package.  The layer package can then be used in other projects  and maps with the desired style.

About the Author
esri Software Products Engineer | he-him-his