Skip to content

Commit

Permalink
Merge pull request #22 from Flyrell/master
Browse files Browse the repository at this point in the history
Seems ok, Moving of markers [fix], thank you @Flyrell
  • Loading branch information
eregnier committed Jun 4, 2019
2 parents 4213e27 + 3fe6377 commit c41ea4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gmap-custom-marker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
const div = self.$el;
const projection = this.getProjection();
if (projection && div) {
const posPixel = projection.fromLatLngToDivPixel(self.position);
const posPixel = projection.fromLatLngToDivPixel(self.latLng);
let x, y;
switch (self.alignment) {
case "top":
Expand Down Expand Up @@ -181,6 +181,12 @@ export default {
return self.lng;
}
};
},
latLng() {
if (this.marker instanceof google.maps.LatLng) {
return this.marker;
}
return new google.maps.LatLng(this.lat, this.lng);
}
},
destroyed() {
Expand Down

0 comments on commit c41ea4b

Please sign in to comment.