<?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 Add vector tile map in basemap gallery in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-vector-tile-map-in-basemap-gallery/m-p/1358049#M83053</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am working with ArcGIS JS 4.x. I am trying to add custom basemap layer in Basemap gallery along with the default basemaps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;this.basemapGallery = new BasemapGallery({&lt;BR /&gt;view: mapView,&lt;BR /&gt;container: this.basemapGalleryDiv,&lt;BR /&gt;source: {&lt;BR /&gt;query: {&lt;BR /&gt;title: "Custom Basemap",&lt;BR /&gt;},&lt;BR /&gt;updateBasemapsCallback: (items) =&amp;gt; {&lt;BR /&gt;if (this.map &amp;amp;&amp;amp; this.map.config &amp;amp;&amp;amp; this.map.config.map &amp;amp;&amp;amp; this.map.config.map.baseMapService) {&lt;BR /&gt;&lt;BR /&gt;baseMapservices = this.map.config.map.baseMapService;&lt;/P&gt;&lt;P&gt;array.forEach(baseMapservices, lang.hitch(this, function (mapservice) {&lt;BR /&gt;if (mapservice != null) {&lt;BR /&gt;var customBasemapServiceUrl = mapservice.MapServiceURL;&lt;/P&gt;&lt;P&gt;esriUtil.addProxyRule({&lt;BR /&gt;urlPrefix: customBasemapServiceUrl,&lt;BR /&gt;proxyUrl: _globalGISUrl + "Proxy/proxy.ashx"&lt;BR /&gt;});&lt;BR /&gt;// let text = customBasemapServiceUrl;&lt;BR /&gt;let result = ((customBasemapServiceUrl.endsWith("json")) || (customBasemapServiceUrl.endsWith("VectorTileServer")));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (result) {&lt;BR /&gt;customBasemapLayer = new VectorTileLayer({&lt;BR /&gt;url: customBasemapServiceUrl&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;customBasemapLayer = new BasemapLayer({ url: customBasemapServiceUrl });&lt;BR /&gt;}&lt;BR /&gt;this.customBasemap = new Basemap({&lt;BR /&gt;baseLayers: [&lt;BR /&gt;customBasemapLayer&lt;BR /&gt;],&lt;BR /&gt;title: mapservice.MapServiceName,&lt;BR /&gt;id: mapservice.MapServiceName,&lt;BR /&gt;thumbnailUrl: customBasemapServiceUrl + '/info/thumbnail'&lt;/P&gt;&lt;P&gt;// });&lt;BR /&gt;});&lt;BR /&gt;if (this.customBasemap) {&lt;BR /&gt;items.push(this.customBasemap);&lt;BR /&gt;} // this.customBasemaps.push(this.customBasemap);&lt;BR /&gt;}&lt;BR /&gt;}));&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return items;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works fine when I have the vector tile layer ending with .json. But when I try to add vector tile layer from arcgis Server I am not getting any basemap&amp;nbsp; on the map. When I checked the error I found there is an extra ".pbf " after the tile url.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADITYAKUMAR1_0-1701967741455.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88315i13B95DCE6F21E582/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ADITYAKUMAR1_0-1701967741455.png" alt="ADITYAKUMAR1_0-1701967741455.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea why this is behaving tile this and how to fx it?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aditya Kumar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2023 16:52:32 GMT</pubDate>
    <dc:creator>ADITYAKUMAR1</dc:creator>
    <dc:date>2023-12-07T16:52:32Z</dc:date>
    <item>
      <title>Add vector tile map in basemap gallery</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-vector-tile-map-in-basemap-gallery/m-p/1358049#M83053</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am working with ArcGIS JS 4.x. I am trying to add custom basemap layer in Basemap gallery along with the default basemaps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;this.basemapGallery = new BasemapGallery({&lt;BR /&gt;view: mapView,&lt;BR /&gt;container: this.basemapGalleryDiv,&lt;BR /&gt;source: {&lt;BR /&gt;query: {&lt;BR /&gt;title: "Custom Basemap",&lt;BR /&gt;},&lt;BR /&gt;updateBasemapsCallback: (items) =&amp;gt; {&lt;BR /&gt;if (this.map &amp;amp;&amp;amp; this.map.config &amp;amp;&amp;amp; this.map.config.map &amp;amp;&amp;amp; this.map.config.map.baseMapService) {&lt;BR /&gt;&lt;BR /&gt;baseMapservices = this.map.config.map.baseMapService;&lt;/P&gt;&lt;P&gt;array.forEach(baseMapservices, lang.hitch(this, function (mapservice) {&lt;BR /&gt;if (mapservice != null) {&lt;BR /&gt;var customBasemapServiceUrl = mapservice.MapServiceURL;&lt;/P&gt;&lt;P&gt;esriUtil.addProxyRule({&lt;BR /&gt;urlPrefix: customBasemapServiceUrl,&lt;BR /&gt;proxyUrl: _globalGISUrl + "Proxy/proxy.ashx"&lt;BR /&gt;});&lt;BR /&gt;// let text = customBasemapServiceUrl;&lt;BR /&gt;let result = ((customBasemapServiceUrl.endsWith("json")) || (customBasemapServiceUrl.endsWith("VectorTileServer")));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (result) {&lt;BR /&gt;customBasemapLayer = new VectorTileLayer({&lt;BR /&gt;url: customBasemapServiceUrl&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;customBasemapLayer = new BasemapLayer({ url: customBasemapServiceUrl });&lt;BR /&gt;}&lt;BR /&gt;this.customBasemap = new Basemap({&lt;BR /&gt;baseLayers: [&lt;BR /&gt;customBasemapLayer&lt;BR /&gt;],&lt;BR /&gt;title: mapservice.MapServiceName,&lt;BR /&gt;id: mapservice.MapServiceName,&lt;BR /&gt;thumbnailUrl: customBasemapServiceUrl + '/info/thumbnail'&lt;/P&gt;&lt;P&gt;// });&lt;BR /&gt;});&lt;BR /&gt;if (this.customBasemap) {&lt;BR /&gt;items.push(this.customBasemap);&lt;BR /&gt;} // this.customBasemaps.push(this.customBasemap);&lt;BR /&gt;}&lt;BR /&gt;}));&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return items;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works fine when I have the vector tile layer ending with .json. But when I try to add vector tile layer from arcgis Server I am not getting any basemap&amp;nbsp; on the map. When I checked the error I found there is an extra ".pbf " after the tile url.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADITYAKUMAR1_0-1701967741455.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88315i13B95DCE6F21E582/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ADITYAKUMAR1_0-1701967741455.png" alt="ADITYAKUMAR1_0-1701967741455.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea why this is behaving tile this and how to fx it?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aditya Kumar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 16:52:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-vector-tile-map-in-basemap-gallery/m-p/1358049#M83053</guid>
      <dc:creator>ADITYAKUMAR1</dc:creator>
      <dc:date>2023-12-07T16:52:32Z</dc:date>
    </item>
  </channel>
</rss>

