[OpenLayers-Users] application/openlayers from GeoServer VS OpenLayers JS code

Andrea Aime aaime at openplans.org
Mon May 26 03:41:31 EDT 2008


springrider ha scritto:
> Hello
> 
> I come back with live examples. It will easier for you to understand my
> problem.
> 
> This is the OL map generated by Geoserver:
> http://193.43.36.238:8484/geoserver/wms?bbox=-198.0,-96.68453554694977,198.0,98.88973978794988&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=fifao:FAO_DIVISION,fifao:CONTINENTS_LN1&width=800&height=370&srs=EPSG:4326
> 
> And this is the one created in a Web page based on the OpenLayers library
> 2.6:
> http://193.43.36.238:8484/figis_GIS/Development/openlayers.html
> 
> The second map is always longer to load probably because of the number of
> layers and a bigger OpenLayers. js script.(2s vs 2.8s)
> 
> When i zoom in, the blue polygons always take longer in my web page than in
> the Geoserver view to be redisplayed. 
> I made some improvements in my code by having for example one unique WMS
> layer for displaying transparent layers:
> 
> var wms = new OpenLayers.Layer.WMS("All
> Areas","http://193.43.36.238:8484/geoserver/wms?service=wms",
> 								{layers:'fifao:FAO_DIVISION,fifao:CONTINENTS_LN1',
> 								transparent:"true"},{wrapDateLine: true}
> 								);
> but any feedback about your experience to improve display would be welcome.
> I tried to play with the format (png/gif/jpeg) but i don't know what would
> be the best option.

It depends mostly on what kind of connection you'll have between your
clients and your app. Jpeg is always faster for imagery data types,
but may show compression artifacts on vector maps.
For a more extensive discussion of the options you have at your disposal 
see:
http://geoserver.org/display/GEOSDOC/Paletted+images+tutorial

If your data is mostly static (or at least, for the part of your data
that _is_ mostly static) consider using a tile caching solution such
as tilecache or geowebcache.

> More important is the fact that the view displayed in the Web page based on
> OL 2.6 is not correct, some lines composing my polygons are missing (see
> between Africa and South america) while in the OL view provided by
> Geoserver, the line is correctly displayed.
> See the screen shot below:
> http://www.nabble.com/file/p17426479/Untitled-2%2Bcopy.jpg 

Oh, this is bad, I consider this a bug, the line should appear in
at least one of the tiles. Any chance you can give me the OL app
as well as a sample of your data and the SLD used to draw it?

Cheers
Andrea



More information about the Users mailing list