I tried to use the sld parameter in a wms request, I hava geoserver1.7.5
installed,and I tried 1.7.2 too.
I set the sld parameter in the request,as below:
http://localhost:8081/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&Format=image/png&request=GetMap&version=1.1.1&layers=topp:states&width=800&height=317&srs=EPSG:4326&SLD=http://localhost:8081/sld/polygon.xml
however,it seems it doesn't accept it and still use the default style,why?
besides, i also tried the SLD_BODY parameter ,with no success
please help,thanks.
--
View this message in context: http://www.nabble.com/How-to-set-sld-parameter-in-a-wms-request-tp24306449p24306449.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
I believe the URL is incorrect. If Geoserver is running on port 8081, then the file can not be served from the url you provided. You have a couple of options
1. If polygon.xml is in the styles directory of your geoserver data directory then you can use the following url:
http://localhost:8081/geoserver/styles/polygon.xml
2. You can copy polygon.xml in to <GEOSERVER_DATA_DIR>/www and then access it via:
http://localhost:8081/geoserver/www/polygon.xml
Hope that helps.
-Justin
wdnanji wrote:
I tried to use the sld parameter in a wms request, I hava geoserver1.7.5
installed,and I tried 1.7.2 too.
I set the sld parameter in the request,as below:
http://localhost:8081/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&Format=image/png&request=GetMap&version=1.1.1&layers=topp:states&width=800&height=317&srs=EPSG:4326&SLD=http://localhost:8081/sld/polygon.xml
however,it seems it doesn't accept it and still use the default style,why?
besides, i also tried the SLD_BODY parameter ,with no success
please help,thanks.
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
It is appreciated if you can keep your replies on the public email list. Thanks
So what do you get when you visit the url you supply for the SLD in a regular web browser?
-Justin
coolnanjizhou wrote:
I tried both the two ways you mentioned ,but still not work, then I switched the port to the default 8080,but the result was the same.
ÔÚ2009-07-03£¬"Justin Deoliveira" <jdeolive@anonymised.com> дµÀ£º
I believe the URL is incorrect. If Geoserver is running on port 8081, then the file can not be served from the url you provided. You have a couple of options
1. If polygon.xml is in the styles directory of your geoserver data directory then you can use the following url:
http://localhost:8081/geoserver/styles/polygon.xml
2. You can copy polygon.xml in to <GEOSERVER_DATA_DIR>/www and then access it via:
http://localhost:8081/geoserver/www/polygon.xml
Hope that helps.
-Justin
wdnanji wrote:
I tried to use the sld parameter in a wms request, I hava geoserver1.7.5
installed,and I tried 1.7.2 too.
I set the sld parameter in the request,as below:
http://localhost:8081/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&Format=image/png&request=GetMap&version=1.1.1&layers=topp:states&width=800&height=317&srs=EPSG:4326&SLD=http://localhost:8081/sld/polygon.xml
however,it seems it doesn't accept it and still use the default style,why?
besides, i also tried the SLD_BODY parameter ,with no success
please help,thanks.--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.------------------------------------------------------------------------
200ÍòÖÖÉÌÆ·,×îµÍ¼Û¸ñ,·è¿ñÓÕ»óÄã <http://count.mail.163.com/redirect/footer.htm?f=http://gouwu.youdao.com>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.