如何在Android应用程序的地图中标记两个位置 [英] how to mark two location's in map of an android app

查看:57
本文介绍了如何在Android应用程序的地图中标记两个位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我正在显示Google地图.在这里我要标记两个地方.一种是我当前的位置,另一种是我提供的经纬度.

in my app i am showing the google maps. Here i want to mark two places. One is to be my current location place and other is to be the lat and lng which i give.

我可以显示当前位置并用图钉标记,但是如何在同一地图上标记另一个位置……

i am able to show the current location with a pin marked on it but how to mark another location in the same map......

推荐答案

选中此链接 ..

在这些页面中,您已经在字符串数组中添加了位置.在这些位置中,您可以添加两个纬度和经度值.这样它将在MapView中指向两个位置.

In these page you have add you location in String array.. In these place you can add two Latitude and Longitude Values..So that it will points Two places in MapView..

 String coordinates[] = {"1.352566007", "103.78921587"};
    double lat = Double.parseDouble(coordinates[0]);
    double lng = Double.parseDouble(coordinates[1]);

这篇关于如何在Android应用程序的地图中标记两个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆