Leaflet / Leaflet.VectorGrid

Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
601 stars 193 forks source link

Toggle polygon #254

Open jvaldezch opened 3 years ago

jvaldezch commented 3 years ago

Is there a way to toggle an specific polygon to show the popup content using JS code? Thanks

dpakprajul commented 1 year ago

vt_layer.on('click', function (e) { var properties = e.layer.properties; L.popup() .setContent("County: " + e.layer.properties.NAMELSAD10 + "
White Student: " + e.layer.properties.D01 + "
White Teacher: " + e.layer.properties.D02) .setLatLng(e.latlng) .openOn(map);