The diPointX and diPointY of POI information points are converted into longitude and latitude

Requirements : The interface returns the data (diPointX, diPointY) of a certain location. The front end needs to convert the location into longitude and latitude form for Marker marking on the map.

 Implementation: (Look for Baidu map development documents)

 Code verification:

console.log(new BMap.MercatorProjection().pointToLngLat(new BMap.Pixel(12598091.16,2543496.12)))

 result:

 

 

 

 

Guess you like

Origin blog.csdn.net/m0_73334325/article/details/131964480