Skip to content

Commit

Permalink
fix: add random marker id to avoid multipoint conflict #189
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Mar 18, 2024
1 parent 9602456 commit 6158e26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/markerLayerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function updateMarkers(
props.metadata = JSON.parse(props.metadata)

if (props?.metadata?.id) {
const id = `m${props.metadata.id}`
const id = `m${Math.floor(Math.random() * props.metadata.id)}`
markerIdcurrent.push(id)
if (!markers[id]) {
// const markerCoords = this.featuresCoordinates[props.metadata.id]
Expand Down

0 comments on commit 6158e26

Please sign in to comment.