English 中文(简体)
如何在谷歌地图上获得一个地方的位置
原标题:How to get the location of a place on google map
  • 时间:2011-06-02 10:34:32
  •  标签:
  • android

我正在开发一个类似于谷歌位置应用程序的android应用程序。

我想在我的应用程序中获得谷歌地图上一个地方的位置。我该如何做到这一点?

这是一个用例:

  1. 使用GPS,我当前的位置的纬度和经度将通过通知服务。

  2. 然后,当我点击按钮restaurant时,将显示该特定位置的餐厅列表(所有信息都是从我使用grails创建的服务器中检索的)。

  3. 然后我从显示的列表中选择一家餐厅的名称。然后在用户界面中有一个名为“MAP”的按钮。

  4. 点击“地图”按钮后,我选择的餐厅的位置必须显示在谷歌地图上。

最佳回答

你不能做的事情是什么?在地图上显示餐厅,或者只有餐厅的名字,你想在地图上找到它的地址/坐标?

您可以遵循本文中关于主题-第2点的Android官方教程:http://developer.android.com/resources/tutorials/views/…这篇文章可能也很有用:http://mobiforge.com/developing/story/using-google-maps-android

第1部分和第2部分指导您创建Map活动(当用户点击Map按钮时,您应该启动一个新的Map活动)以及如何向地图添加覆盖。在文章中,覆盖的是机器人。其他文章使用图钉作为覆盖。另一方面,Overlay是。。显示在地图上的图片。在你的情况下——在餐厅的坐标上精确定位。创建地图活动后,您可以按照我的第二个链接查找标题“添加标记”。解释得很好。

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签