Hi,
As for the attribute data of MVT data, in Mapbox GL JS, I can get it as follows, but can't I get it in ArcGIS API for JavaScript?
map.on("click", "japan_ver821_layer", (e) => {
const value = e.features[0];
console.log(value)
new mapboxgl.Popup()
.setHTML(`<b>${value.properties.KEN}</b>${value.properties.SIKUCHOSON}`)
.setLngLat(e.lngLat)
.addTo(map);
});
The code we used is shown below.
https://github.com/tkamiya0625/Arc-MVT
https://tkamiya0625.github.io/Arc-MVT/20210210/arcgis.html
https://tkamiya0625.github.io/Arc-MVT/20210210/mapbox.html
Are you trying to get back data from the GeoJson layer?
https://github.com/tkamiya0625/Arc-MVT/blob/main/20210210/arcgis.html#L88
Q: Maybe try this?
const opts = {
include: geoJSONLayer
};
Thank you very much.
No, I want to get the data from the following vector tile.
const tileLayer = new VectorTileLayer({
title: "National City Boundary Data (Vector Tile)",
url: ". /style.json",
opacity: 0.5
});
I understand how to get attribute data from GeoJSON.