=============== Problem description ====================
Public class mainactivity extends activity {mapview mmapview = NULL; baidumap mbaidumap; // UI-related button resetbtn; button clearbtn; @ override protected void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); // initialize the context information before using the SDK components, and pass in the applicationcontext // note that this method must be implemented before the setcontentview method. initialize (getapplicationcontext (); setcontentview (R. layout. activity_main); // get Map Control Reference mmapview = (mapview) findviewbyid (R. id. bmapview); mbaidumap = mmapview. getmap (); // The UI initializes clearbtn = (button) findviewbyid (R. id. btnstart); resetbtn = (button) findviewbyid (R. id. btnstart2); onclicklistener clearlistener = new onclicklistener () {public void onclick (view v) {// clearclick () ;}}; onclicklistener restlistener = new onclicklistener () {public void onclick (view v) {// resetclick () ;}}; clear BTN. setonclicklistener (clearlistener); resetbtn. setonclicklistener (restlistener); // Add the draw layer addcustomelementsdemo () when loading the interface;}/*** Add a vertex, line, polygon, circle, text */Public void addcustomelementsdemo () {// Add text latlng lltext = new latlng (39.86923, 116.397428); // latlng lltext = new latlng (108.7622674067471, 34.0358298501404 ); // my local GPS coordinates overlayoptions ootext = new textoptions (). bgcolor (0xaaffff00 ). fontsize (24 ). fontcolo R (0xffff00ff ). text ("Baidu map SDK "). rotate (-30 ). position (lltext); mbaidumap. addoverlay (ootext) ;}@ override protected void ondestroy () {super. ondestroy (); // execute mmapview when ondestroy is executed in activity. ondestroy () to implement mmapview for map lifecycle management. ondestroy () ;}@ override protected void onresume () {super. onresume (); // execute mmapview when onresume is executed in the activity. onresume () to implement mmapview for map lifecycle management. onresume () ;}@ override protected void onpause () {Super. onpause (); // execute mmapview when onpause is executed in activity. onpause () enables mmapview for map lifecycle management. onpause () ;}} by default, the program is opened on the map of Beijing. I replaced the given GPS coordinates with the local coordinates I collected but cannot locate the local map (Shaanxi ), if the value is displayed on the Beijing map, the added text cannot be displayed ~ Thank you!
============= Solution 1 ======================
Never used Baidu map.
============= Solution 2 ======================
Let's change the longitude and latitude coordinates of 116 and 39. Didn't you find that the order of the following coordinates is different from yours?
Baidu map development, marking can only be displayed on Beijing Map t_t