We have problems using NewMapComponent, Marker click Function don't works when Google MapEngine is selected. With Openlayers MapEngine works fine.
Example attached:
- Simple map with a Marker, when clicked an alert pops up with marker's name. (openStreetMap).
- Change Map Engine to Google, (put a valid API key) and try again ....
Self awnser:
Finally, we maked it with an, I dont want to say "ugly" but "not pretty" workaround.
Set the map's operation mode as "just the map", and create markers in JS:
var marker = new google.maps.Marker({
position: new google.maps.LatLng(latitude,longitude),
map: CDEmap,
title: "Marker title"
});
marker.addListener('click', CDE_markerClickFunction);
latitude, longitude, CDEmap and CDE_markerClickFuncion are custom JS variables that have to be initialized.