English 中文(简体)
如何在图像上设置地理点, 将图像作为地图放入和移动
原标题:how to place geopoints on the image as map in android
  • 时间:2012-05-23 04:28:00
  •  标签:
  • android

hi this raju iam new to and aroid. i 在该项目中创建了一个小项目。i 在该项目中将图像显示为自定义视图的地图。我有纬度和经度点,然后如何使用我的纬度和经度点显示图像上的地理点,请任何人帮助我。如果有人知道,请提供一些样本。

问题回答

希望这能帮助您在Android 中帮助您 GoogleMap

你去那里。 给。

String getMapURL = "http://maps.googleapis.com/maps/api/staticmap?zoom=18&size=560x240" +
    "&markers=size:mid|color:red|" 
    + yourLatitude
    + "," 
    + yourLongitude
    + "&sensor=false";

URL imgValue = new URL(getMapURL);
Bitmap userIcon = BitmapFactory.decodeStream(imgValue.openConnection().getInputStream());

ImageView imgMapInImage = (ImageView) findViewById(R.id.imgMapInImage);
imgMapInImage.setImageBitmap(userIcon);

自定义其他参数, 如 width hilow 属性 。 我的示例使用 560 *240 的维度。 使用您的维度。 另将缩放、 线针大小和颜色修改为您喜欢 。

希望这能帮上忙

EDIT:此示例使用 Google Maps Static API 。 对于更多的定制选项, 请在此参考此 URL : < a href="https:// developmenters.google.com/maps/ documentation/staticmaps/" rel="nofollow" >https:// developers.google.com/maps/document/staticmaps/



上一篇:
下一篇:


相关问题
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 ...

热门标签