Drawing a line/path on Google Maps

后端 未结 13 843
执笔经年
执笔经年 2020-11-22 05:23

I\'ve been busy for a long time finding out how to draw a line between two (GPS) points on the map in HelloMapView but with no luck.

Could anyone please tell me how

13条回答
  •  误落风尘
    2020-11-22 05:25

    This can be done by using intents too:

      final Intent intent = new Intent(Intent.ACTION_VIEW,
        Uri.parse(
                "http://maps.google.com/maps?" +
                "saddr="+YOUR_START_LONGITUDE+","+YOUR_START_LATITUDE+"&daddr="YOUR_END_LONGITUDE+","+YOUR_END_LATITUDE));
             intent.setClassName(
              "com.google.android.apps.maps",
              "com.google.android.maps.MapsActivity");
       startActivity(intent);
    

提交回复
热议问题