Update heatmap when latLng changes

This commit is contained in:
Linus Groh
2019-10-02 19:03:36 +01:00
parent 9e61b7f174
commit c6181c77b1
+7
View File
@@ -87,6 +87,13 @@ export default {
propsBinder(this, this.mapObject, props);
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.$watch(
"latLng",
newVal => {
this.mapObject.setLatLngs(newVal);
},
{ deep: true }
);
},
beforeDestroy() {
this.parentContainer.removeLayer(this);