|
|
@@ -19,11 +19,6 @@
|
|
19
|
19
|
mapTypeId="terrain"
|
|
20
|
20
|
style="width: 100%; height: 500px;"
|
|
21
|
21
|
>
|
|
22
|
|
- <gmap-marker
|
|
23
|
|
- v-for="marker in markers"
|
|
24
|
|
- :position="marker.position"
|
|
25
|
|
- @click="removeMarker"
|
|
26
|
|
- ></gmap-marker>
|
|
27
|
22
|
</gmap-map>
|
|
28
|
23
|
</div>
|
|
29
|
24
|
</template>
|
|
|
@@ -69,10 +64,10 @@
|
|
69
|
64
|
getRoute: function (a, b) {
|
|
70
|
65
|
if (this.directionsDisplay) this.directionsDisplay.setMap(null)
|
|
71
|
66
|
this.directionsService = new google.maps.DirectionsService() // eslint-disable-line no-undef
|
|
72
|
|
- this.directionsDisplay = new google.maps.DirectionsRenderer() // eslint-disable-line no-undef
|
|
|
67
|
+ this.directionsDisplay = new google.maps.DirectionsRenderer({ draggable: true }) // eslint-disable-line no-undef
|
|
73
|
68
|
this.directionsDisplay.setOptions({
|
|
74
|
69
|
markerOptions: {
|
|
75
|
|
- visible: false
|
|
|
70
|
+ visible: true
|
|
76
|
71
|
}
|
|
77
|
72
|
})
|
|
78
|
73
|
this.directionsDisplay.setMap(this.$refs.gMap.$mapObject)
|