Not the WGS coordinates and Google map coordinates??????? If not, how to transform?????? Urgent urgent!!!!!!!!!!!!!!!!!!!!!!!! Thank you very much!
CodePudding user response:
1, map
This. _cppObject=window. External
Enclosing _mapOverlay=new Google. Maps. OverlayView ();
Register
. Google maps. Event. AddListener (this, 'mousemove, enclosing OnMapMouseMove);
OffLineMap. Prototype. OnMapMouseMove=function (event) {
Var pointNow=this. _mapOverlay. GetProjection () fromLatLngToContainerPixel (event. LatLng);//get the mouse in the window of the pixel coordinates
If (this. _cppObject) {
Var strLatLng=LatLngArrayToString (event. LatLng);
This. _cppObject. OnMapMouseMove (pointNow. X, pointNow. Y, strLatLng);
}
}
2, MFC end
//(ptX, ptY) is the cursor coordinates of the client area of the unit pixel
Void CMapView: : OnMapMouseMove (int ptX, int ptY, cstrings strLatLng)
{
//strLatLng for latitude and longitude string format: latitude and longitude; Latitude and longitude. .
}
CodePudding user response:
Map the var strLatLng=LatLngArrayToString (event. LatLng); Used for converting LatLng type of longitude and latitude "latitude and longitude; Latitude and longitude. . "In the form of a stringCodePudding user response:
Bosses, how to load in the MFC offline maps, can help the younger brother