You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to get information building on user click?
And for example, change the color to make a selection effect?
// Buildings and roads from Mapzen (polygons and linestrings)vartopoJSONTileLayer=VIZI.topoJSONTileLayer('https://vector.mapzen.com/osm/buildings,roads/{z}/{x}/{y}.topojson?api_key=vector-tiles-NT5Emiw',{interactive: true,style: function(feature){varheight;if(feature.properties.height){height=feature.properties.height;}else{height=10+Math.random()*10;}return{height: height,lineColor: '#f7c616',lineWidth: 1,lineTransparent: true,lineOpacity: 0.2,lineBlending: THREE.AdditiveBlending,lineRenderOrder: 2};},filter: function(feature){// Don't show pointsreturnfeature.geometry.type!=='Point';},onEachFeature: function(feature,layer){layer.on('click',function(layer,point2d,point3d,intersects){//Get INFO of building?console.log('feature',feature);console.log('layer',layer);console.log('point2d',point2d);console.log('point3d',point3d);console.log('intersects',intersects);});}}).addTo(world);
On click, I am not able to get any information from the building and I can not access the individual styles of that building.
Thanks.
The text was updated successfully, but these errors were encountered:
Hello,
Is it possible to get information building on user click?
And for example, change the color to make a selection effect?
On click, I am not able to get any information from the building and I can not access the individual styles of that building.
Thanks.
The text was updated successfully, but these errors were encountered: