Select to view content in your preferred language

Changing VectorTileLayer appereance on map.

323
1
09-19-2023 12:01 PM
MitchellMecca
New Contributor

I have a VectorTileLayer that contains floor plan visuals for some buildings, I need to change the color of certain room in the building base on information obtained from a different source. I found many resources and ways for changing Feature Layer things, but nothing for VectorTileLayers. Is there anyway to do this, and if there is not is their anyway to turn a VectorTileLayer  into a FeatureLayer.

0 Kudos
1 Reply
PeterDimitrov1
Esri Contributor

Hi MitchellMecca,
Thank you for reaching out with your question.The basemaps styles API does not provide direct means for modifying the appearance of Vector Tile Layers or Styles. However, there are a couple of approaches you can consider:

  • Firstly, for offline workflows, you can reuse the same vtpk tiles with a different offline style using the item resource cache. This allows you to customize the appearance of the VectorTileLayer for offline use.
  • For online workflows, changing the style of a VectorTileLayer on the fly is not supported. However, you can create a new basemap with the BasemapStyle enum constructor to achieve the desired appearance. It's important to note that a basemap can be made up of any arbitrary layers, so it's not correct to assume that it has a style or can be styled.

Additionally, you can utilize the Vector Tile Style Editor to make changes to individual layers within a Vector Tile Style and save it as a custom style. This custom style can then be requested and used later on to display the modified appearance of the VectorTileLayer.

I would be interested to learn more about your specific use-case. Understanding your requirements and challenges can provide valuable insights for our product development ideas. Please feel free to share more details so that we can better assist you.

I hope this information helps! If you have any further questions or need additional assistance, please don't hesitate to ask.

Best regards,
Peter Dimitrov

0 Kudos