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
With the addition of the changes for the AdvancedMarkers, a problem has slipped in.
The documentation of AdvancedMarkers.position says:
An AdvancedMarkerElement may be constructed without a position, but will not be displayed until its position is provided
The problem is that in every algorithm (supercluster/grid/superviewport) the MarkerUtils.getPosition function is used which assumes that position of null means lat=0, lng=0 which then leads to problems when calculating the center of a cluster.
One solution could be to return null instead of google.maps.LatLng(null) in the MarkerUtils.getPosition function and then check everywhere where the position is used if MarkerUtils.getPosition(marker) == null.
The text was updated successfully, but these errors were encountered:
LeLunZ
added
triage me
I really want to be triaged.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
labels
Jul 29, 2024
With the addition of the changes for the AdvancedMarkers, a problem has slipped in.
The documentation of AdvancedMarkers.position says:
The problem is that in every algorithm (supercluster/grid/superviewport) the MarkerUtils.getPosition function is used which assumes that position of
null
meanslat=0, lng=0
which then leads to problems when calculating the center of a cluster.One solution could be to return
null
instead ofgoogle.maps.LatLng(null)
in theMarkerUtils.getPosition
function and then check everywhere where the position is used ifMarkerUtils.getPosition(marker) == null
.The text was updated successfully, but these errors were encountered: