开发者

Opening a map with a certain point

开发者 https://www.devze.com 2023-02-20 12:53 出处:网络
I use the following code: uri = \"geo:\"+lat+\"开发者_如何转开发,\"+lon; intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));

I use the following code:

uri = "geo:"+lat+"开发者_如何转开发,"+lon;
intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);

My questions are: 1. I understand I need internet connection to use this? Is there a way to show offline Maps? 2. It opens the map with location, but without showing the point on the map. Anyway to add this with code?


The android documentation is good here: MapView

  1. You will need an internet connection. The map data is massive and couldn't possibly be entirely cached on your phone. Don't forget to add the line in the manifest that says your application uses internet. Maybe there is a way to cache a small area if you know you will always be working with the same area, but I don't know of a way.

  2. To show a point on the map look into "overlays" in the link I added.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消