|
@@ -21,10 +21,9 @@
|
|
|
:loading-tip="t('common.loadingText')"
|
|
:loading-tip="t('common.loadingText')"
|
|
|
>
|
|
>
|
|
|
<MarkerCluster>
|
|
<MarkerCluster>
|
|
|
- <!-- <template v-if="form.type === 0">
|
|
|
|
|
|
|
+ <template v-for="(location, i) in locations" :key="i">
|
|
|
<CustomMarker
|
|
<CustomMarker
|
|
|
- v-for="(location, i) in locations"
|
|
|
|
|
- :key="i"
|
|
|
|
|
|
|
+ v-if="location.isPro"
|
|
|
:options="{
|
|
:options="{
|
|
|
position: { lat: location.lat, lng: location.lng },
|
|
position: { lat: location.lat, lng: location.lng },
|
|
|
title: location.title,
|
|
title: location.title,
|
|
@@ -34,19 +33,16 @@
|
|
|
>
|
|
>
|
|
|
<div class="custom-marker">{{ location.title }}</div>
|
|
<div class="custom-marker">{{ location.title }}</div>
|
|
|
</CustomMarker>
|
|
</CustomMarker>
|
|
|
- </template>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
<AdvancedMarker
|
|
<AdvancedMarker
|
|
|
- v-for="(location, i) in locations"
|
|
|
|
|
- :key="i"
|
|
|
|
|
|
|
+ v-else
|
|
|
:options="{
|
|
:options="{
|
|
|
position: { lat: location.lat, lng: location.lng },
|
|
position: { lat: location.lat, lng: location.lng },
|
|
|
title: location.title,
|
|
title: location.title,
|
|
|
}"
|
|
}"
|
|
|
@click="handleMarkerClick(location)"
|
|
@click="handleMarkerClick(location)"
|
|
|
/>
|
|
/>
|
|
|
- </template> -->
|
|
|
|
|
- <AdvancedMarker
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- <AdvancedMarker
|
|
|
v-for="(location, i) in locations"
|
|
v-for="(location, i) in locations"
|
|
|
:key="i"
|
|
:key="i"
|
|
|
:options="{
|
|
:options="{
|
|
@@ -54,7 +50,7 @@
|
|
|
title: location.title,
|
|
title: location.title,
|
|
|
}"
|
|
}"
|
|
|
@click="handleMarkerClick(location)"
|
|
@click="handleMarkerClick(location)"
|
|
|
- />
|
|
|
|
|
|
|
+ /> -->
|
|
|
</MarkerCluster>
|
|
</MarkerCluster>
|
|
|
|
|
|
|
|
<!-- <CustomControl position="TOP_LEFT">
|
|
<!-- <CustomControl position="TOP_LEFT">
|
|
@@ -138,7 +134,7 @@
|
|
|
GoogleMap,
|
|
GoogleMap,
|
|
|
AdvancedMarker,
|
|
AdvancedMarker,
|
|
|
MarkerCluster,
|
|
MarkerCluster,
|
|
|
- // CustomMarker,
|
|
|
|
|
|
|
+ CustomMarker,
|
|
|
// InfoWindow,
|
|
// InfoWindow,
|
|
|
// CustomControl,
|
|
// CustomControl,
|
|
|
} from 'vue3-google-map';
|
|
} from 'vue3-google-map';
|
|
@@ -255,8 +251,19 @@
|
|
|
mapper.webSite = item.webSite;
|
|
mapper.webSite = item.webSite;
|
|
|
return mapper;
|
|
return mapper;
|
|
|
});
|
|
});
|
|
|
- console.log('getMarkerData-list', list);
|
|
|
|
|
- return list;
|
|
|
|
|
|
|
+ if (list.length === 0) {
|
|
|
|
|
+ return data.map((item) => {
|
|
|
|
|
+ const mapper = {} as any;
|
|
|
|
|
+ mapper.isPro = true;
|
|
|
|
|
+ mapper.lat = Number(item.lat);
|
|
|
|
|
+ mapper.lng = Number(item.lon);
|
|
|
|
|
+ mapper.title = item.title;
|
|
|
|
|
+ mapper.webSite = item.webSite;
|
|
|
|
|
+ return mapper;
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
return data.map((item) => {
|
|
return data.map((item) => {
|
|
|
const mapper = {} as any;
|
|
const mapper = {} as any;
|