|
@@ -194,7 +194,9 @@ const selectpoint = () => {
|
|
|
getlocalname(center.lng.toFixed(6) + ',' + center.lat.toFixed(6));
|
|
|
} else {
|
|
|
isshowmove.value = true;
|
|
|
- state._marker.remove();
|
|
|
+ if (state.map && state._marker) {
|
|
|
+ state._marker.remove();
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
const setpoint = (longitude, latitude, name) => {
|
|
@@ -239,13 +241,15 @@ const setpoint = (longitude, latitude, name) => {
|
|
|
const searchaddr = () => {
|
|
|
isshowmove.value = false;
|
|
|
fetch(
|
|
|
- `https://minedata.cn/service/lbs/search/v1/keywords?keywords=${whdata.value.address}&city=宿迁&citylimit=true&page_idx=1&page_size=10&key=${window.key}`,
|
|
|
+ `https://tocc.jtj.suqian.gov.cn:21100/service/lbs/search/v1/keywords?keywords=${whdata.value.address}&city=宿迁&citylimit=true&page_idx=1&page_size=10&key=${window.key}`,
|
|
|
)
|
|
|
.then((res) => res.json())
|
|
|
.then((data) => {
|
|
|
// console.log(data.pois)
|
|
|
var clearallmark = () => {
|
|
|
- state._marker.remove();
|
|
|
+ if (state.map && state._marker) {
|
|
|
+ state._marker.remove();
|
|
|
+ }
|
|
|
if (allmark.length > 0) {
|
|
|
allmark.map((item) => {
|
|
|
item.remove();
|
|
@@ -319,7 +323,7 @@ const searchaddr = () => {
|
|
|
|
|
|
const getlocalname = (location) => {
|
|
|
fetch(
|
|
|
- `https://minedata.cn/service/lbs/reverse/v1/regeo?location=${location}&key=${window.key}`,
|
|
|
+ `https://service.minedata.cn/service/lbs/reverse/v1/regeo?location=${location}&key=77ef70465c2d4888b3a5132523494b94`,
|
|
|
)
|
|
|
.then((res) => res.json())
|
|
|
.then((data) => {
|