【发布时间】:2016-01-28 01:53:43
【问题描述】:
我在可绘制文件夹中有一个图标图像,我将其设置为映射标记图标,但我需要将图像设置为现有标记 click to See the white portion of the image(1st) 上方我想显示图像 (2nd) this image to be shown on that previous white portion of that 1st image 的位置。
*第一个图像是一个自定义标记,它是静态的,我从可绘制文件夹中获取它。
*第二个是我从网络服务 url 获取的简单图像。**
LatLng userPosition = new LatLng(
Double.parseDouble(item.latitude),
Double.parseDouble(item.longitude));
googleMap.addMarker(new MarkerOptions()
.position(userPosition)
.title(item.vendorname)
.snippet("Service : " + item.category_name)
.icon(BitmapDescriptorFactory.fromResource(R.drawable.location_pin))
以上代码用于查看地图上的标记图标。但我需要在其上方显示另一张图片。所以我通过这样的网络服务获取网址(以下代码)。
try {
URL url = new URL(CommonUtilities.Thumb_Call+ item.vendor_icon);
bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
bmp = BitmapFactory.decodeFile(String.valueOf(url));
}
catch (Exception e)
{
e.printStackTrace();
}
请帮我将图像设置在来自 url 的标记上方。
【问题讨论】:
-
嘿,点击下面的链接,它可能会给你一些想法-Customize marker icon
-
我知道如何设置标记,但不知道如何在其上方设置另一个图像
-
您可以使用图片编辑工具在第一张图片上添加第二张图片...这是我能看到的唯一方法。非程序化它可能,程序化我不这么认为
-
你知道@sud有什么编辑工具吗??
-
google上有很多在线照片编辑工具。只需谷歌“在线照片编辑器”
标签: android web-services google-maps google-maps-api-3 google-maps-markers