Android 将 CID 位置转换为坐标 [英] Android convert CID location to Coordinates

查看:27
本文介绍了Android 将 CID 位置转换为坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我构建了一个 Android 应用程序,它可以处理来自 Google 地图的共享意图并显示其坐标.

I built an android app which can handle a share intent from Google Maps and show it's coordinates.

问题是他们发送了一个短网址,我用 Google 的短网址 api 对其进行了解码,在某些情况下,结果长链接属于这种类型:http://maps.google.com/?cid=3635533832900933072&hl=en&gl=us.

The problem is that they send a short url which I decode with Google's url shortner api and in some cases, the result long link is of this type: http://maps.google.com/?cid=3635533832900933072&hl=en&gl=us.

谁能帮助我如何获得cid=3635533832900933072"的对应坐标

Can anyone help me on how to get the coresponding coordinates to "cid=3635533832900933072"

推荐答案

在最新的 Google Maps 更新中,共享 Intent 在正文中包含地址名称,可以使用 Geocoder 将其解码为坐标.

In latest Google Maps update, the share intent contains the address name in the body which can be decoded with Geocoder into coordinates.

这篇关于Android 将 CID 位置转换为坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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