Status Update
Comments
ca...@google.com <ca...@google.com> #2
Thank you for posting.
We are currently looking into this and will get back to you as soon as we have an update.
ra...@google.com <ra...@google.com> #3
Thank you for waiting.
Could you please send us a sample demo, steps to reproduce, console errors, screen shots and screen recording so we can better understand the problem?
fs...@beecorp.ai <fs...@beecorp.ai> #4
Sorry, let me try to explain again:
Look at the documentation: gmpClickable
with the following description:
If true, the AdvancedMarkerElement will be clickable and trigger the gmp-click event, and will be interactive for accessibility purposes (e.g. allowing keyboard navigation via arrow keys).
You say "If true, the AdvancedMarkerElement will be clickable", but even if it is false
, the AdvancedMarkerElement is right-clickable. In my opinion all interaction including a right-click should be deactivated if gmpClickable
is false.
I hope this explanation is better understandable.
fs...@beecorp.ai <fs...@beecorp.ai> #5
Here example code:
async function initMap() {
// Request needed libraries.
const { Map } = await google.maps.importLibrary("maps");
const { AdvancedMarkerElement } = await google.maps.importLibrary("marker");
const map = new Map(document.getElementById("map"), {
center: { lat: 37.42, lng: -122.1 },
zoom: 14,
mapId: "4504f8b37365c3d0",
});
const myLabel = document.createElement("div");
myLabel.className = "myClass1";
myLabel.textContent = "This is a sample content.";
const marker = new AdvancedMarkerElement({
map,
position: { lat: 37.42, lng: -122.1 },
content: myLabel,
gmpClickable: false, // !!!
});
marker.addEventListener("gmp-click", (e) => { console.log(e) }); //! does not fire
marker.addEventListener("contextmenu", (e) => { console.log(e) }); //! DOES fire
}
initMap();
ra...@google.com <ra...@google.com> #6
Thanks for the clarification.
We have raised an internal issue to our Engineering Team so they can further evaluate this report.
Please note that we cannot give you any timelines, but you can star the issue to get notifications.
ga...@zealty.ca <ga...@zealty.ca> #7
They shouldn't be triggered in this situation.
Description
The new AdvancedMarkers have some special behavior regarding the clickable property set be gmpClickable and event "gmp-click". In my opinion right click resp. contextmenu shold be handled similar.
The current behaviour however is the right click behaves like any other event independent from the gmpClickable property.