



CodePudding user response:
It didn't, you seemBaiduMap. SetOnMapClickListener (new BaiduMap OnMapClickListener () {do you write a click to monitor to see map normal, I feel you in the right position to test your fabric, try yourself
@ Override
Public void onMapClick (LatLng point) {
MarkerOptions ooA=new MarkerOptions (). The position (point). The icon (bdA);
//parse the latitude and longitude
IsgeoCodeResult=true;
MSearch. ReverseGeoCode (new ReverseGeoCodeOption ()
The location (point). NewVersion (0));
MBaiduMap. The clear ();
MBaiduMap. AddOverlay (ooA);
}
@ Override
Public Boolean onMapPoiClick MapPoi (poi) {
//String state=the String. Format (" click on the map in the POI point current longitude: % f current latitude: % f ",
//poi. GetPosition (). Longitude, poi. GetPosition (). The latitude);
//Toast. MakeText (LocationActivity. This state, Toast. LENGTH_LONG), show ();
IsgeoCodeResult=true;
MSearch. ReverseGeoCode (new ReverseGeoCodeOption ()
The location (poi) getPosition ()). NewVersion (0));
BitmapDescriptor bdA=BitmapDescriptorFactory
FromResource (R.d rawable. Icon_gcoding);
MarkerOptions ooA=new MarkerOptions (). The position (poi) getPosition ()). The icon (bdA);
MBaiduMap. The clear ();
MBaiduMap. AddOverlay (ooA);
return false;
}
});
CodePudding user response:
I didn't understand the meaning, now I just want to realize I write on the map the location of the make a point, this also need to click on the monitor, and my latitude and longitude is right, big trouble, please explain,CodePudding user response:
MBaiduMap. The clear (); Removed the try