Skip to content
Snippets Groups Projects
Commit a0dfefe9 authored by Christian Adamski's avatar Christian Adamski
Browse files

Issue #3520767: Uncaught InvalidValueError: <gmp-advanced-marker>: Cannot set...

parent e5113bc0
Branches
Tags
1 merge request!96Issue #3520767: Uncaught InvalidValueError: <gmp-advanced-marker>: Cannot set...
Pipeline #497486 canceled
......@@ -16,7 +16,13 @@ export class GoogleMapMarker extends GeolocationMapMarker {
});
if (this.label) {
this.googleMarker.content = this.label;
const glyphLabel = document.createElement("span");
glyphLabel.style.fontWeight = "bold";
glyphLabel.style.fontSize = "14px";
glyphLabel.innerText = this.label;
this.googleMarker.content = new google.maps.marker.PinElement({
glyph: glyphLabel,
}).element;
}
if (this.icon || this.map.settings.google_map_settings.marker_icon_path) {
......@@ -41,7 +47,7 @@ export class GoogleMapMarker extends GeolocationMapMarker {
super.update(newCoordinates, settings);
if (newCoordinates) {
if (!newCoordinates.equals(this.googleMarker.position.lat(), this.googleMarker.position.lng())) {
if (!newCoordinates.equals(this.googleMarker.position.lat, this.googleMarker.position.lng)) {
this.googleMarker.position = this.coordinates;
}
}
......@@ -51,7 +57,13 @@ export class GoogleMapMarker extends GeolocationMapMarker {
}
if (this.label) {
this.googleMarker.content = this.label;
const glyphLabel = document.createElement("span");
glyphLabel.style.fontWeight = "bold";
glyphLabel.style.fontSize = "14px";
glyphLabel.innerText = this.label;
this.googleMarker.content = new google.maps.marker.PinElement({
glyph: glyphLabel,
}).element;
}
if (this.icon || this.map.settings.google_map_settings.marker_icon_path) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment