33 <google-map id =" map" ref =" Map" >
44 <google-map-marker
55 :key =" index"
6- v-for =" (infowindow , index) in infoWindowsList"
7- :position =" infowindow .position"
8- @click =" toggleInfoWindow(infowindow )"
9- ></google-map-marker >
6+ v-for =" (info , index) in infoWindowsList"
7+ :position =" info .position"
8+ @click =" toggleInfoWindow(info )"
9+ / >
1010 <google-map-infowindow
11- v-for="(infowindow , index) in infoWindowsList"
11+ v-for =" (info , index) in infoWindowsList"
1212 :key =" `info-window-${index}`"
13- :position="infowindow .position"
13+ :position =" info .position"
1414 :show.sync =" showInfo"
1515 :options =" {maxWidth: 300}"
16- @info-window-clicked="infoClicked($event, infowindow )"
16+ @info-window-clicked =" infoClicked($event, info )"
1717 >
18- <h4 >{{infoWIndowContext .title}}</h4>
19- <p >{{infoWIndowContext .description}}</p>
18+ <h4 >{{infoWindowContext .title}}</h4>
19+ <p >{{infoWindowContext .description}}</p>
2020 </google-map-infowindow>
2121 </google-map>
2222 </div>
@@ -28,7 +28,7 @@ export default {
2828 data () {
2929 return {
3030 showInfo: true ,
31- infoWIndowContext : {
31+ infoWindowContext : {
3232 title: ' Hello world' ,
3333 description: ' Description' ,
3434 position: {
@@ -41,11 +41,11 @@ export default {
4141 },
4242 methods: {
4343 toggleInfoWindow (context ) {
44- this .infoWIndowContext = context
44+ this .infoWindowContext = context
4545 this .showInfo = true
4646 },
4747 infoClicked (context , spot ) {
48- console .log (context, spot)
48+ console .log (' infoClicked ' , context, spot)
4949 }
5050 }
5151}
0 commit comments