使用谷歌API的地方 [英] Using Google Places API

查看:130
本文介绍了使用谷歌API的地方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发中,我想通过获取当前位置附近(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 ?

推荐答案

试试这个教程:<一href="http://blog.brianbuikema.com/2010/08/android-development-part-1-using-googles-places-api-to-develop-compelling-location-based-mobile-applications/">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.

这篇关于使用谷歌API的地方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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