This commit is contained in:
parent
ec928c2024
commit
4f48891923
|
|
@ -49,13 +49,10 @@ const getMapDataList = async () => {
|
||||||
} catch (res: any) {
|
} catch (res: any) {
|
||||||
console.log('🚀 ~ getMapDataList ~ res:', res)
|
console.log('🚀 ~ getMapDataList ~ res:', res)
|
||||||
if (res) {
|
if (res) {
|
||||||
|
let { longitude, latitude } = wgs84ToGcj02ToBd09Public(res.longitude, res.latitude)
|
||||||
mapData.value = res
|
mapData.value = res
|
||||||
let { longitude, latitude } = wgs84ToGcj02ToBd09Public(
|
// mapData.value.longitude = longitude
|
||||||
Number(mapData.value.longitude),
|
// mapData.value.latitude = latitude
|
||||||
Number(mapData.value.latitude),
|
|
||||||
)
|
|
||||||
mapData.value.longitude = longitude
|
|
||||||
mapData.value.latitude = latitude
|
|
||||||
console.log('🚀 ~ getMapDataList ~ longitude:', longitude, latitude)
|
console.log('🚀 ~ getMapDataList ~ longitude:', longitude, latitude)
|
||||||
points.value = [
|
points.value = [
|
||||||
{
|
{
|
||||||
|
|
@ -248,7 +245,7 @@ const formatUtcTimeV2 = (utcTime: any, date: any) => {
|
||||||
const initMap = () => {
|
const initMap = () => {
|
||||||
if (window.BMap) {
|
if (window.BMap) {
|
||||||
const map = new BMap.Map(mapContainer.value)
|
const map = new BMap.Map(mapContainer.value)
|
||||||
const point = new BMap.Point(106.674974,26.489328) // 默认贵州贵阳
|
const point = new BMap.Point(106.674974, 26.489328) // 默认贵州贵阳
|
||||||
// 添加标记点
|
// 添加标记点
|
||||||
points.value.forEach((item: any) => {
|
points.value.forEach((item: any) => {
|
||||||
const point = new BMap.Point(item.lng, item.lat)
|
const point = new BMap.Point(item.lng, item.lat)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue