瀏覽代碼

maybe a compromise

Jared Norris 8 年之前
父節點
當前提交
b0e2a3d37c
共有 1 個文件被更改,包括 2 次插入7 次删除
  1. 2
    7
      VueApp/src/components/GoogleMap.vue

+ 2
- 7
VueApp/src/components/GoogleMap.vue 查看文件

@@ -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)