Skip to content

Commit

Permalink
Merge pull request #163 from Greenstand/issue162
Browse files Browse the repository at this point in the history
fix: the single tree cluster bug
  • Loading branch information
dadiorchen committed May 9, 2023
2 parents dfedc51 + 4b20f8d commit f722a1f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default class Map {
debug: false,
moreEffect: true,
filters: null,
defaultZoomLevelForTreePoint: 15,
},
...options,
}
Expand Down Expand Up @@ -513,14 +512,7 @@ export default class Map {

_clickMarker(data) {
this._unHighlightMarker()
if (
data.type === 'point' ||
(data.type === 'cluster' && data.count === 1)
) {
if (data.type === 'cluster') {
const { lon, lat } = data
this.map.flyTo([lat, lon], this.defaultZoomLevelForTreePoint)
}
if (data.type === 'point') {
this._selectMarker(data)
if (this.onClickTree) {
this.onClickTree(data)
Expand Down

0 comments on commit f722a1f

Please sign in to comment.