|
@ -87,7 +87,8 @@ export function searchNearby(map, keyword) { |
|
|
} else if (mapType == "tdzw") { |
|
|
} else if (mapType == "tdzw") { |
|
|
return new Promise(async (reslove) => { |
|
|
return new Promise(async (reslove) => { |
|
|
const center = map.getCenter(); |
|
|
const center = map.getCenter(); |
|
|
const url = "https://service.sdmap.gov.cn/search"; |
|
|
// const url = "https://service.sdmap.gov.cn/search";
|
|
|
|
|
|
const url = "http://59.206.203.34/QueryService.ashx"; |
|
|
const { status, result } = await requestGet(url, { |
|
|
const { status, result } = await requestGet(url, { |
|
|
area: `CIRCLE(${center.lon} ${center.lat} 1000000)`, |
|
|
area: `CIRCLE(${center.lon} ${center.lat} 1000000)`, |
|
|
words: keyword, |
|
|
words: keyword, |
|
@ -344,7 +345,8 @@ export default function init(ele, position, params) { |
|
|
|
|
|
|
|
|
this.getAddress = async function (lat, lng) { |
|
|
this.getAddress = async function (lat, lng) { |
|
|
return new Promise(async (reslove) => { |
|
|
return new Promise(async (reslove) => { |
|
|
const url = "https://service.sdmap.gov.cn/geodecode"; |
|
|
// const url = "https://service.sdmap.gov.cn/geodecode";
|
|
|
|
|
|
const url = "http://59.206.203.34/GeoDecodeService.ashx"; |
|
|
const { status, result } = await requestGet(url, { |
|
|
const { status, result } = await requestGet(url, { |
|
|
point: lng + "," + lat, |
|
|
point: lng + "," + lat, |
|
|
type: "11", |
|
|
type: "11", |
|
|