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

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

问题描述

在我的应用我显示了谷歌地图。在这里我要纪念两个地方。一个是要我的当前位置的地方,另一种是将纬度和经度,我给。

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......

推荐答案

勾选此链接 ..

在这些页面中,您有加你位置的字符串数组。在这些地方,你可以添加两个纬度和经度Values​​..So,将在图形页面点的两个地方。

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天全站免登陆