mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
Working onCluster select; zooming in and watching clusters break down into individual clusters and points
This commit is contained in:
@@ -192,9 +192,8 @@ class Map extends React.Component {
|
||||
onClusterSelect (e) {
|
||||
const { id } = e.target
|
||||
const { longitude, latitude } = e.target.attributes
|
||||
const { x, y } = this.projectPoint([latitude.value, longitude.value])
|
||||
const expansionZoom = Math.max(this.index.getClusterExpansionZoom(parseInt(id)), this.index.options.minZoom)
|
||||
this.map.flyTo([x, y], expansionZoom)
|
||||
this.map.flyTo(new L.LatLng(latitude.value, longitude.value), expansionZoom)
|
||||
}
|
||||
|
||||
getClientDims () {
|
||||
|
||||
Reference in New Issue
Block a user