android - Mapbox - Use gps location -


i develop android app. want stock gps location , draw line on map these datas, "draw course".

what's best way ?

i designed map tilemill.

where can stock data , use mapbox?


this code :

public class gpsactivity extends activity{ private locationmanager manager = null; private mylocationlistener listener; private textview textview; @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_main);      textview = (textview) findviewbyid(r.id.location);     listener = new mylocationlistener(textview);       manager = (locationmanager) getsystemservice(context.location_service);      listener = new mylocationlistener(textview);      manager.requestlocationupdates(locationmanager             .gps_provider, 5000, 10,listener);      } public class mylocationlistener implements locationlistener { textview textview;  public mylocationlistener(textview textview) {     this.textview = textview; }  @override public void onlocationchanged(location location) {     this.textview.settext(location.tostring()); }  @override public void onstatuschanged(string s, int i, bundle bundle) {  }  @override public void onproviderenabled(string s) {  }  @override public void onproviderdisabled(string s) {  }  } 

--> code, have location. stock longitude , latitude , use these mapbox. what's best way stock these datas? start design map on map box : https://a.tiles.mapbox.com/v3/malicia.hh3dgalc/page.html?secure=1#13/48.1169/-1.6803 interactive map, want draw itinerary datas stocked.

can me?


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -