From 55bd3312d38cc6dd8a83acf8163d11414fd03320 Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Sat, 10 Mar 2018 22:20:05 +0200 Subject: [PATCH 1/2] Adds url property for markers --- google-map-marker.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/google-map-marker.html b/google-map-marker.html index 1900fa3..047c386 100644 --- a/google-map-marker.html +++ b/google-map-marker.html @@ -221,6 +221,16 @@ observer: '_iconChanged' }, + /** + * URL for the marker. + * + * @type {?String} + */ + url: { + type: String, + value: '' + }, + /** * When true, marker mouse* events are automatically registered. */ @@ -450,6 +460,7 @@ lat: parseFloat(this.latitude), lng: parseFloat(this.longitude) }, + url: this.url, title: this.title, animation: google.maps.Animation[this.animation], draggable: this.draggable, From 37b9ca974d5e6d7d7cb1d8d513b8798596a89158 Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Sun, 11 Mar 2018 00:12:07 +0200 Subject: [PATCH 2/2] Fixes a TypeError which caused element to crash under some circumstances e.g. when marker elements were generated by mapping over an array in a lit-html template --- google-map-marker.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-map-marker.html b/google-map-marker.html index 047c386..6d7efe1 100644 --- a/google-map-marker.html +++ b/google-map-marker.html @@ -478,7 +478,7 @@ }, _clearListener: function(name) { - if (this._listeners[name]) { + if (this._listeners && this._listeners[name]) { google.maps.event.removeListener(this._listeners[name]); this._listeners[name] = null; }