使用谷歌API的地方地方、API

2023-09-11 12:44:21 作者:因为丑所以要多读书

我想开发中,我想通过获取当前位置附近(1公里内),显示有关场所的信息,用户的应用程序。

I want to develop an application in which i want to display information about places nearby (within 1km )the user by getting its current location..

说,例如,我想显示饭店,商场信息,位于1公里内有关Android设备的当前位置医院。

Say for example i want to display information about Restaurants, Shopping Malls, Hospitals located within 1km related to current location of the android device..

我已经通过这个链接了..但没有得到更多的。

I have gone through this link : Using Google Places API in Android.. But didnt get more.

有没有人使用谷歌API的地方在机器人?

Have anyone used Google Places API in android ?

推荐答案

试试这个教程:using-googles-places-api而无论你的问题问吧的评论。

Try this tutorial: using-googles-places-api and wherever you get problem ask it in comment.

几点要牢记:

在要使用谷歌的地方API,你将需要注册并获得谷歌地图的API密钥。 在类UrlSigner本教程中的变量说明如下: KeyString中 =>,是你的谷歌地图API密钥。 urlString =>它的网址你想使用标志的API密钥。

在code,你会发现 inputKey inputUrl 。这两个变量只是用于测试目的,你可以忽略他们,如果你想要的。您可以直接写code如下: In order to use Google’s Places API, you will need to register and obtain a Google Map’s API Key. In class UrlSigner in the tutorial the variable descriptions are: keyString=> its your google map api key. urlString=>its the url you wanna sign using the api key.

In code you will find inputKey and inputUrl. these 2 variables are just for testing purpose you can omit them if you want. You can directly write code as follows:

网​​址URL =新的URL(urlString);

UrlSigner签名=新UrlSigner(KeyString中);

字符串请求= signer.signRequest(url.getPath(),url.getQuery());

的System.out.println(签名网址:+ url.getProtocol()+://+ url.getHost()+申请);

在UrlSigner类的主要方法。

in main method of UrlSigner class.