|
@@ -46,7 +46,10 @@
|
46
|
46
|
:aria-controls="'collapse' + region.id"
|
47
|
47
|
>
|
48
|
48
|
<div :id="'header' + region.id">
|
49
|
|
- <h5 class="mb-0">{{ region.regionName }}</h5>
|
|
49
|
+ <h5
|
|
50
|
+ class="mb-0"
|
|
51
|
+ @mouseover="updateMapProvince(region.regionName)"
|
|
52
|
+ >{{ region.regionName }}</h5>
|
50
|
53
|
</div>
|
51
|
54
|
</a>
|
52
|
55
|
<div
|
|
@@ -61,7 +64,7 @@
|
61
|
64
|
class="cursor-pointer"
|
62
|
65
|
href="#"
|
63
|
66
|
@click="routerGoTo('/resort/' + resort.resortCode)"
|
64
|
|
- @mouseover="getResort(resort.resortCode)"
|
|
67
|
+ @mouseover="updateMap(resort.resortCode)"
|
65
|
68
|
>{{resort.resortName}}</a>
|
66
|
69
|
<br />
|
67
|
70
|
</p>
|
|
@@ -115,19 +118,20 @@ import { mapState, mapActions } from 'vuex';
|
115
|
118
|
|
116
|
119
|
export default {
|
117
|
120
|
name: 'TimeshareToBuy',
|
|
121
|
+ data() {
|
|
122
|
+ return {
|
|
123
|
+ myMap: 'SouthAfrica',
|
|
124
|
+ myZoom: 5,
|
|
125
|
+ };
|
|
126
|
+ },
|
118
|
127
|
mounted() {
|
119
|
128
|
this.getRegions();
|
120
|
129
|
},
|
121
|
130
|
computed: {
|
122
|
131
|
...mapState('timeshareBuy', ['detailedRegion', 'resort']),
|
123
|
132
|
mapUrl() {
|
124
|
|
- return (
|
125
|
|
- 'http://maps.google.com/maps?q='
|
126
|
|
- + this.resort.prLatitude
|
127
|
|
- + ', '
|
128
|
|
- + this.resort.prLongitude
|
129
|
|
- + '&z=15&output=embed'
|
130
|
|
- );
|
|
133
|
+ // return 'http://maps.google.com/maps/place/Gauteng/';
|
|
134
|
+ return `http://maps.google.com/maps?q=${this.myMap}&z=${this.myZoom}&output=embed`;
|
131
|
135
|
},
|
132
|
136
|
regions() {
|
133
|
137
|
return _.sortBy(this.detailedRegion, r => r.regionName);
|
|
@@ -139,8 +143,15 @@ export default {
|
139
|
143
|
this.$router.push(goTo);
|
140
|
144
|
},
|
141
|
145
|
updateMap(resortCode) {
|
142
|
|
- this.getGPS(resortCode);
|
143
|
|
- alert(resortCode);
|
|
146
|
+ this.myMap = 'SouthAfrice';
|
|
147
|
+ this.getResort(resortCode);
|
|
148
|
+ // `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=7&output=embed`;
|
|
149
|
+ this.myMap = `${this.resort.prLatitude},${this.resort.prLongitude}`;
|
|
150
|
+ this.myZoom = 10;
|
|
151
|
+ },
|
|
152
|
+ updateMapProvince(province) {
|
|
153
|
+ this.myMap = province.replace(/\s/g, '');
|
|
154
|
+ this.myZoom = 7;
|
144
|
155
|
},
|
145
|
156
|
},
|
146
|
157
|
};
|