Vector Tile Popups/Select

1914
6
09-13-2018 12:39 PM
MajuSadagopan
New Contributor II

Is there any way to select Vector Tile features or add popups in ArcGIS JS 4.8? This functionality is available in Mapbox GL and Openlayers. The ESRI Vector Tile Style Editor also lets you click on features and detect the feature style. 

ArcGIS Vector Tile Style Editor (beta) 

6 Replies
AllanLaframboise
Occasional Contributor III

We don't support popups in the VSTE but if you want to build your own editor with one, you might want to try to use view.hitTest to get the ID of the layer and then match it up against the style. You can then fetch the properties and populate the popup accordingly. You will have to build all of this yourself however.

MajuSadagopan
New Contributor II

It seems like I can fetch style properties using hitTest but I can't access any feature attributes according to the documentation. Are there any possible workarounds for getting actual feature data?

Hit Test Documentation

0 Kudos
MalcolmMeyer2
Occasional Contributor II

Would love to see this in AGOL as well - the ability to add popups and change the style of vector tiles in AGOL.

0 Kudos
AaronBarkhurst1
New Contributor

I'm currently working with with ArcGIS JS 4.16 and for the life of me cannot figure out how to solve this problem! I am coming from working with Mapbox GL JS for the last 5+ years and have no issue implementing this in that library but need to use ArcGIS b/c of project requirements and am beyond frustrated with the lack of this functionality.

Has anyone made progress with this or implemented a solution? I do see that it's possible in ArcGIS Pro but cannot find the solution for the JS library.

Thank you in advance!

hoogw
by
New Contributor III

Dec 2nd, 2020.  Still not resolve this problem !!! Many people have be waiting since 2017.

What exactly so hard for ESRI to implement this feature ????

Please advise

MalcolmMeyer1
New Contributor II

While not directly supported in esri's api, the feature properties can easily be extracted from the raw vector tiles using a tool like tilequery (my tool but there are others). In the link below the geojson is extracted by querying the raw tiles directly, then finding the feature that contains the clicked point. It's not clear to me how to create a highlight effect however.

https://map-compare.apps.zerospatial.com/?map=esri-v4