Hi All,
I have been using GeoServer to generate tiles over Google Maps. Now I
require sending a dynamic parameter to the SLD. I have heard that this can
be done with the ENV parameter
(http://docs.geoserver.org/stable/en/user/services/wms/vendor.html#env).
However, I am not sure how to incorporate this into my requests. Currently I
have been using the following:
/* Create Map */
map = new google.maps.Map(document.getElementById('map-canvas'), {
zoom: 4,
center: new google.maps.LatLng(38,-97),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
/* Create ImageMapType */
var imageMapTypeOptions = {
getTileUrl: function(coord,zoom){
return
'http://localhost:8080/geoserver/gwc/service/gmaps?layers=test:geo_layer&zoo
m=' + zoom + '&x=' + coord.x + '&y=' + coord.y +
'&format=image/png8&env=color_hex:CCCCCC';
},
tileSize: new google.maps.Size(256,256),
opacity:0.7,
isPng:true
}
var tiledImageMap = new google.maps.ImageMapType(imageMapTypeOptions);
Unfortunately, the color_hex param is not visible in the SLD when I use:
<ogc:Function name="env">
<ogc:Literal>color_hex</ogc:Literal>
<ogc:Literal>000000</ogc:Literal>
</ogc:Function>
Instead, it always uses the default value. How can I pass this property
correctly?
Thanks!
Matt
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users