<?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: Vector map's styles/root.json file is not packaged correctly within a .vtpk (Vector Tile Package) in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/vector-map-s-styles-root-json-file-is-not-packaged/m-p/1243124#M49474</link>
    <description>&lt;P&gt;The basemap service has what I refer to as an internal style.&amp;nbsp; I call it an internal style as this is the style that gets put into a .vtpk when you take the tiles offline.&amp;nbsp; &amp;nbsp;The other tile styles are external to the service.&amp;nbsp; &amp;nbsp;The system can use these external styles with the .vtpk when taken offline.&amp;nbsp; &amp;nbsp;If you use the .vtpk by itself the internal style will be used for rendering.&amp;nbsp; When used as part of a map with reference to the external styling in place the tiles will draw with the desired styling.&lt;/P&gt;&lt;P&gt;for Example with this tile layer&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/item.html?id=8e848d9302e84dcba0de7aff8ac429dc" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=8e848d9302e84dcba0de7aff8ac429dc&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_0-1671659925895.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59065iC83ECF4197C94A2D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarkBockenhauer_0-1671659925895.png" alt="MarkBockenhauer_0-1671659925895.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cdn.arcgis.com/sharing/rest/content/items/8e848d9302e84dcba0de7aff8ac429dc/resources/export?f=zip" target="_blank"&gt;https://cdn.arcgis.com/sharing/rest/content/items/8e848d9302e84dcba0de7aff8ac429dc/resources/export?f=zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to get a resource.zip file that contains the dark streetmap styling.&amp;nbsp; Notice the item ID is the same in both URLs.&lt;/P&gt;&lt;P&gt;If we look at a map area that has been taken offline we get the following content.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_1-1671660427522.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59066iD30CFBFD3CEEC0FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarkBockenhauer_1-1671660427522.png" alt="MarkBockenhauer_1-1671660427522.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If we look at the .mmap we can see that for the basemap it has an itemPath referencing the folder with the resources.zip file (the Night styling)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_2-1671660576030.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59067i6EF6C2D161ECAF3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarkBockenhauer_2-1671660576030.png" alt="MarkBockenhauer_2-1671660576030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Applications can show the desired styling when the itemPath is present with the resources.zip&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 22:13:53 GMT</pubDate>
    <dc:creator>MarkBockenhauer</dc:creator>
    <dc:date>2022-12-21T22:13:53Z</dc:date>
    <item>
      <title>Vector map's styles/root.json file is not packaged correctly within a .vtpk (Vector Tile Package)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/vector-map-s-styles-root-json-file-is-not-packaged/m-p/1242992#M49469</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When I am creating an Offline Map Area for a vector map and download the .vtpk file, the p12/resources/styles/root.json file is always the same, it's the styles from the default Streets vector map.&lt;/P&gt;&lt;P&gt;This means that creating an Offline Map Area of the Streets (Night) map results in a light-themed map that is exactly the same as the normal Streets map.&amp;nbsp; It appears the sprites folder has the wrong .png and .json mapping file as well.&amp;nbsp; This results in Interstate/highway icons being incorrect.&lt;/P&gt;&lt;P&gt;Steps to reproduce:&lt;/P&gt;&lt;P&gt;1. Create an Offline Map Area of the Streets (Night) vector map that esri owns.&lt;/P&gt;&lt;P&gt;2. Go to the "Overview" tab of your map's detail page and run this browser bookmarklet&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;javascript&amp;amp;colon;void function(){(async()=&amp;gt;{const a=new URLSearchParams(window.location.search).get("id");if(!a)return void alert("No Web Map ID in URL. Only run this from the detail screen of a web map.");const b=(await esri.IdentityManager().checkSignInStatus(location.origin)).token,c=await fetch(`https://www.arcgis.com/sharing/rest/content/items/${a}/relatedItems%3Ff=json%26relationshipType=Map2Area%26token=${b}`),d=(await c.json()).relatedItems.map(a=&amp;gt;({id:a.id,name:a.title}));if(!d.length)return void alert("There are no map areas associated to this web map.");const e=open("","_blank");let f=d[0],g=f.name;if(1&amp;lt;d.length){if(g=e.prompt(`Enter the name of the map area you want to download:\n${d.map(b=&amp;gt;b.name).join("\n")}`,"")||"",!g)return void e.close();if(f=d.find(a=&amp;gt;a.name.toLowerCase()===g.toLowerCase()),!f)return e.alert(`Could not find map area with a name of: "${g}"`),void e.close()}const h=await fetch(`https://www.arcgis.com/sharing/rest/content/items/${f.id}/relatedItems%3Ff=json%26relationshipType=Area2Package%26token=${b}`),i=(await h.json()).relatedItems.find(a=&amp;gt;a.name.endsWith(".vtpk"));if(!i)return e.alert(`Could not find VTPK associated to map area with a name of: "${g}"`),void e.close();const j=new URL(window.location.href);j.hash="",j.searchParams.set("id",i.id),e.open(j.href,"_self")})()}();&lt;/LI-CODE&gt;&lt;P&gt;3. A new tab should open and there is a Download button to get the .vtpk package.&lt;/P&gt;&lt;P&gt;4. Rename the .vtpk to a .zip file and unzip the package.&lt;/P&gt;&lt;P&gt;5. Open ./p12/resources/styles/root.json&lt;/P&gt;&lt;P&gt;The styles inside are all for the the Streets map and not Streets (Night).&amp;nbsp; If you download a .vtpk for both maps, the root.json files are identical.&amp;nbsp; The sprites as well.&lt;/P&gt;&lt;P&gt;Is this deliberate from Esri?&amp;nbsp; Do they only want us taking the Streets map offline?&lt;/P&gt;&lt;P&gt;-Bill&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 17:21:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/vector-map-s-styles-root-json-file-is-not-packaged/m-p/1242992#M49469</guid>
      <dc:creator>BillSand</dc:creator>
      <dc:date>2022-12-21T17:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Vector map's styles/root.json file is not packaged correctly within a .vtpk (Vector Tile Package)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/vector-map-s-styles-root-json-file-is-not-packaged/m-p/1243124#M49474</link>
      <description>&lt;P&gt;The basemap service has what I refer to as an internal style.&amp;nbsp; I call it an internal style as this is the style that gets put into a .vtpk when you take the tiles offline.&amp;nbsp; &amp;nbsp;The other tile styles are external to the service.&amp;nbsp; &amp;nbsp;The system can use these external styles with the .vtpk when taken offline.&amp;nbsp; &amp;nbsp;If you use the .vtpk by itself the internal style will be used for rendering.&amp;nbsp; When used as part of a map with reference to the external styling in place the tiles will draw with the desired styling.&lt;/P&gt;&lt;P&gt;for Example with this tile layer&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/item.html?id=8e848d9302e84dcba0de7aff8ac429dc" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=8e848d9302e84dcba0de7aff8ac429dc&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_0-1671659925895.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59065iC83ECF4197C94A2D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarkBockenhauer_0-1671659925895.png" alt="MarkBockenhauer_0-1671659925895.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cdn.arcgis.com/sharing/rest/content/items/8e848d9302e84dcba0de7aff8ac429dc/resources/export?f=zip" target="_blank"&gt;https://cdn.arcgis.com/sharing/rest/content/items/8e848d9302e84dcba0de7aff8ac429dc/resources/export?f=zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to get a resource.zip file that contains the dark streetmap styling.&amp;nbsp; Notice the item ID is the same in both URLs.&lt;/P&gt;&lt;P&gt;If we look at a map area that has been taken offline we get the following content.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_1-1671660427522.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59066iD30CFBFD3CEEC0FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarkBockenhauer_1-1671660427522.png" alt="MarkBockenhauer_1-1671660427522.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If we look at the .mmap we can see that for the basemap it has an itemPath referencing the folder with the resources.zip file (the Night styling)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkBockenhauer_2-1671660576030.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59067i6EF6C2D161ECAF3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarkBockenhauer_2-1671660576030.png" alt="MarkBockenhauer_2-1671660576030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Applications can show the desired styling when the itemPath is present with the resources.zip&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 22:13:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/vector-map-s-styles-root-json-file-is-not-packaged/m-p/1243124#M49474</guid>
      <dc:creator>MarkBockenhauer</dc:creator>
      <dc:date>2022-12-21T22:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Vector map's styles/root.json file is not packaged correctly within a .vtpk (Vector Tile Package)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/vector-map-s-styles-root-json-file-is-not-packaged/m-p/1243577#M49496</link>
      <description>&lt;P&gt;Thanks Mark!&amp;nbsp; This is great info.&amp;nbsp; We can figure out the Map Id from the Map Area Id with the /relatedItems endpoint and then can fetch the resources.zip.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 15:30:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/vector-map-s-styles-root-json-file-is-not-packaged/m-p/1243577#M49496</guid>
      <dc:creator>BillSand</dc:creator>
      <dc:date>2022-12-23T15:30:56Z</dc:date>
    </item>
  </channel>
</rss>

