Retain and Retrieve Attributes on Vector Tiles

946
2
07-17-2017 05:59 PM
LesiMai1
New Contributor II

Hi all,

I'm looking for a way to filter or style vector tiles based on fields included in vector tile package. I followed the steps outlined in Author a map for vector tile creation—ArcGIS Pro | ArcGIS Desktop to bring a field in vector tiles. But I don't see that field information shown up in the style root.json of the vtpk. How do I know if that field has been included in the vector tiles? Also how can I retrieve it in JS API?

Any pointers will be greatly appreciated!

Lesi

0 Kudos
2 Replies
ReneRubalcava
Frequent Contributor

George Bochenek #askgeorge has a cool sample showing this behavior.

GitHub - gbochenek/vector-tile-demo-js: Demo Application for switching vector tile styles on the fly 

You can then  apply a filter to the style file. The data isn't in the style, it's in the cooked tiles, but you can style on it.

vector-tile-demo-js/vectorTileDemo.js at master · gbochenek/vector-tile-demo-js · GitHub 

This is purely for styles though, not stuff like popups.

LesiMai1
New Contributor II

Thank you Rene for pointing me to this resource! It definitely looks promising! Thanks!

0 Kudos