Assigned
Status Update
Comments
ka...@google.com <ka...@google.com> #2
As per comment #1 , Unable to Triage the Issue from TE End. Hence, adding "TE-NeedsTriageHelp" hotlist. Someone from Dev Team could you please take a look into this issue.
Thanks!
Thanks!
ch...@gmail.com <ch...@gmail.com> #3
hello, sorry for my late reply.
I created a page on my website to recreate the "faulty" behavior.
https://bmfworld.com/test-google
on top of the page, there is a toggle button which hide/show the orange
markers on the map.
There are 4 orange markers and 1 green marker. If I push the button to hide
the 4 orange markers, while they are in view (displayed and visible with
zoom level) all 4 orange markers will be hidden.
Now if I zoom the map to a point that I only can see that green marker, and
I push the button to hide the orange markers, then if I zoom out, the
orange markers have not been removed from the map because they were not
displayed in the first place by that zoom level. I hope this makes sense.
By the way, I hide those markers using jquery
$(".class_of_those_orange_markers").hide()
Op vr 23 aug 2024 om 03:12 schreef <buganizer-system@google.com>:
I created a page on my website to recreate the "faulty" behavior.
on top of the page, there is a toggle button which hide/show the orange
markers on the map.
There are 4 orange markers and 1 green marker. If I push the button to hide
the 4 orange markers, while they are in view (displayed and visible with
zoom level) all 4 orange markers will be hidden.
Now if I zoom the map to a point that I only can see that green marker, and
I push the button to hide the orange markers, then if I zoom out, the
orange markers have not been removed from the map because they were not
displayed in the first place by that zoom level. I hope this makes sense.
By the way, I hide those markers using jquery
$(".class_of_those_orange_markers").hide()
Op vr 23 aug 2024 om 03:12 schreef <buganizer-system@google.com>:
ch...@gmail.com <ch...@gmail.com> #4
I managed to find a workaround.
It s not pretty but it works.
As we are not able anymore to create an AdvancedMarker with a custom id,
thus, we are not able anymore to loop through the created markers.
function showMarker(ID){
for (var i = 0; i < markers.length; i++) {
if(markers[i].targetElement.children[0].innerHTML.includes(ID)){
markers[i].setMap(map);
}
}
}
This AdvancedMarker has been sold as being better, but I think it is a
degradation of what it once was.
The map that I created to show you the problem will be deleted.
rgds
Op vr 23 aug 2024 om 03:12 schreef <buganizer-system@google.com>:
It s not pretty but it works.
As we are not able anymore to create an AdvancedMarker with a custom id,
thus, we are not able anymore to loop through the created markers.
function showMarker(ID){
for (var i = 0; i < markers.length; i++) {
if(markers[i].targetElement.children[0].innerHTML.includes(ID)){
markers[i].setMap(map);
}
}
}
This AdvancedMarker has been sold as being better, but I think it is a
degradation of what it once was.
The map that I created to show you the problem will be deleted.
rgds
Op vr 23 aug 2024 om 03:12 schreef <buganizer-system@google.com>:
Description
The problem:
when hiding markers, markers are only hidden when in the viewport.
When zooming out, after I have hidden the markers, the markers which were not in the viewport, are still visible, and thus not hidden.
I make custom made markers using this code:
const marker_gevel = document.createElement("div");
marker_gevel.setAttribute("class","marker_van_een_gevel")
if(g.gevel_kant == "LINKS"){
marker_gevel.innerHTML = "<div class='marker_geveltje_links een_marker_van_een_gevel' style='transform:rotate(" + g.richting + "deg);transform-origin:bottom center' data-id_gevel='" + g.display_id + "'></div>";
}else{
marker_gevel.innerHTML = "<div class='marker_geveltje_rechts een_marker_van_een_gevel' style='transform:rotate(" + g.richting + "deg);transform-origin:bottom center' data-id_gevel='" + g.display_id + "'></div>";
}
const marker = new google.maps.marker.AdvancedMarkerElement({
map,
position: { lat: parseFloat(g.lat), lng: parseFloat(g.lon) },
title: "",
content: marker_gevel,
});
I m using jquery if I want specific markers to be hidden
$(".een_marker_van_een_gevel").slideUp(50)
Only the markers which are in the viewport, are hidden, the others remain.