Urgent! ! ! Great God help us to see new demand, I have Android applications, through the development of guidelines development platform called Baidu Baidu map, Baidu map also shows, I want to ask, how, depending on the latitude and longitude, mark this point in Baidu map, then This point occurs when moving, you can display the track. I give on the part of the code, seeking to modify.
AndroidMainfest.xml and layout files do not write, here is the main program:
public class MyMapActivity extends Activity
{
private BMapManager mBMapMan = null;
private MapView mMapView = null;
@ Override
public void onCreate (Bundle savedInstanceState)
{
super.onCreate (savedInstanceState);
mBMapMan = new BMapManager (getApplication ());
mBMapMan.init (null);
/ / Note: Please initialize BMapManager object before trial setContentView, otherwise it will error
setContentView (R.layout.activity_my_map);
mMapView = (MapView) findViewById (R.id.bmapsView);
mMapView.setBuiltInZoomControls (true);
/ / Set to enable the built-in zoom controls
MapController mMapController = mMapView.getController ();
GeoPoint point = new GeoPoint ((int) (39.915 * 1E6), (int) (116.404 * 1E6));
/ / With a given latitude and longitude to construct a GeoPoint, units are micro (degrees * 1E6)
mMapController.setCenter (point) ;/ / set the center of the map
mMapController.setZoom (12) ;/ / set the map zoom level
}
@ Override
protected void onDestroy ()
{
mMapView.destroy ();
if (mBMapMan! = null)
{
mBMapMan.destroy ();
mBMapMan = null;
}
super.onDestroy ();
}
@ Override
protected void onPause ()
{
mMapView.onPause ();
if (mBMapMan! = null)
{
mBMapMan.stop ();
super.onPause ();
}
}
@ Override
protected void onResume ()
{
mMapView.onResume ();
if (mBMapMan! = null)
{
mBMapMan.start ();
}
super.onResume ();
}
}
Great God, please paste the key code and key comments, please!
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Regularly updated, each refresh the coordinates and then draw a track record
Reply:
Can you point to a specific point code
No comments:
Post a Comment