Hi,
I have added vector tile as base map in base map gallery. On toggle this is working as expected.Below is the code to add basemap while map load. This code works for ArcGIS dynamic map service or Tiled map service. But below code does not work for Vector tile layer.
Basemaps.mybasemap = {
title: 'My custom basemap',
thumbnailUrl: baseMapService.MapServiceURL + '/info/thumbnail',
baseMapLayers: [
{ url: baseMapService.MapServiceURL }
]
};
map.setBasemap("mybasemap");
}
Is there a way we can add vector tile as bassemap on load?
Thanks
Aditya Kumar
Solved! Go to Solution.
I have managed to fix it. Below are the changes in the code.
Basemaps.mybasemap = {
title: 'My custom basemap',
itemId: "xxxxxxxxxxxxxxxxxxxxxxxx",
thumbnailUrl: baseMapService.MapServiceURL + '/info/thumbnail',
baseMapLayers: [
{
url: baseMapService.MapServiceURL,
type: "VectorTile"
}
]
};
map.setBasemap("mybasemap");
Thanks
I have managed to fix it. Below are the changes in the code.
Basemaps.mybasemap = {
title: 'My custom basemap',
itemId: "xxxxxxxxxxxxxxxxxxxxxxxx",
thumbnailUrl: baseMapService.MapServiceURL + '/info/thumbnail',
baseMapLayers: [
{
url: baseMapService.MapServiceURL,
type: "VectorTile"
}
]
};
map.setBasemap("mybasemap");
Thanks