start navigating to position which is stored in database

后端 未结 3 757
孤城傲影
孤城傲影 2020-12-22 09:17

I have an application where I am getting the latitude and longitude coordinates.

I want , when to press a button to start navigating to that position .

Now ,

3条回答
  •  孤城傲影
    2020-12-22 10:12

    While storing the lat and long store it in this way...

    String mylocation=latitude + ":" + longitude;
    

    And while retriving it

    String latitude = mylocation.subString(0, myLocation.indexOf(":") -  1 );
    String longitude = mylocation.subString(myLocation.indexOf(":"));
    

    and pass it as

    j.putExtra("lon", longitude);
    j.putExtra("lat", latitude);
    

提交回复
热议问题