我如何设置一个WMS请求层Android的谷歌地图API的不透明度 [英] How do I set the opacity of a WMS requested layer in Android Google Maps API

查看:199
本文介绍了我如何设置一个WMS请求层Android的谷歌地图API的不透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我已经按照此页面上的说明: http://www.azavea.com/blogs/labs/2013/01/wms-on-android/ 使用WMS请求从利用Geoserver谷歌地图叠加图像。它的工作了。问题是我想要的层/图像要少一点可见(更透明),以使图中可以看出更多。一直在寻找了几天,但我似乎无法找到使用Java的Andr​​oid解决方案。请帮忙。非常感谢!

Hi I've followed the instructions on this page: http://www.azavea.com/blogs/labs/2013/01/wms-on-android/ to overlay an image using WMS request to Google Maps from Geoserver. It's working already. The problem is I want the layer/image to be a little less visible (more transparent) so that the map can be seen more. Been searching for days but I can't seem to find solutions using Java Android. Please help. Thank you very much!

推荐答案

要做到这一点,最好的方法是编辑XML文件中宣称,特定的图像/层。你有映射要用户看到XML元素的inspite该层下方(可能是一个按钮),这是在地图上其更好的顶部以配置XML元素使其是透明的。

The best way to do this is to edit that particular image/layer declared in the XML file. As you have map beneath that layer which you want users to see inspite of an XML element (might be a button) which is at the top of the map its better to configure that XML element so that it is transparent.

这是一个小的code片段,展示了如何做到这一点:

This is a small code snippet that shows how to do that:

<ImageButton android:id="@+id/button/layer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_your_button/layer"
android:background="@android:color/transparent"> 

希望这将帮助!

Hope this would Help!!

这篇关于我如何设置一个WMS请求层Android的谷歌地图API的不透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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