[OpenLayers-Users] Behaviour discrepancies between maps (application/openlayers from GeoServer VS OpenLayers JS code)

springrider springrider at hotmail.com
Wed May 21 10:29:35 EDT 2008


Good afternoon

Sorry for the long title. I am developing a web application based on oracle,
GeoServer and Openalyers. It works great but i have found some performance
discrepancies and display problems between maps in a Web page generated
through OL Javascript code and maps generated from Geoserver using the
format="application/openlayers".

Here the code I am using to generate my map through JS code (Sorry
everything is on my development server and can not be accessed from
outside):

var myMap = new
OpenLayers.Map('mapResourceFIRMS',{numZoomLevels:24,projection: "EPSG:4326"
});
	
myMap.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':true}));
myMap.addControl(new OpenLayers.Control.OverviewMap());	

var wms = new OpenLayers.Layer.WMS("All
Areas","http://193.43.36.236:8080/geoserver/wms?service=wms",
								{layers:'fifao:FAO_DIVISION'},{wrapDateLine: true}
								);
	wms.addOptions({isBaseLayer: true});	
	
var wms_continent = new
OpenLayers.Layer.WMS("Continent","http://193.43.36.236:8080/geoserver/wms?service=wms",
								{layers: 'fifao:CONTINENTS_LN1',
								transparent:"true"},{wrapDateLine: true}                 
								);
	wms_continent.addOptions({isBaseLayer: false});   	

	myMap.addLayer(wms);	
	myMap.addLayer(wms_continent);	
	myMap.zoomToMaxExtent();

I obtain a map which works correctly but when i zoomed in, it always takes
10 seconds to display the new extended view. 

On this other hand, when i  use the openlayer format of Geoserver through:
http://193.43.36.236:8080/geoserver/wms?bbox=-198.0,-97,198.0,99&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=fifao:FAO_DIVISION,fifao:CONTINENTS_LN1&width=600&height=290&srs=EPSG:4326
I obtain the same kind of map with less functionnalities but when i zoom in,
it is displayed automatically, very smoothly. No additional delay is
required to display the zoomed view.


Moreover i have a problem of display: When i zoom in on specific polygons in
the map based on OpenLayers JS library in my Web page, these polygons are
not correctly represented:
http://www.nabble.com/file/p17364274/Untitled-2%2Bcopy.jpg 
: See in red the limits of the polygons which are missing.

Here, an screenshot of the same area from a map generated from Geoserver
using the "application/openlayers" format and having the correct border for
the polygons:
http://www.nabble.com/file/p17364274/Untitled-4%2Bcopy.jpg 

I don't understand why 2 maps showing the same data which should be based on
the same mechanism, behave so differently in term of loading performance and
layers display. In fact, I would like to have my map nested in my web page
and built using Openlayers JS code behaving the same as the one which can be
generated through GeoServer.

Moreover, if you have any hints or tricks for improving the speed of display
when zooming, i would be very interested.

Hope it is clear enough.

Thanks

Sylvain
-- 
View this message in context: http://www.nabble.com/Behaviour-discrepancies-between-maps-%28application-openlayers-from-GeoServer-VS-OpenLayers-JS-code%29-tp17364274p17364274.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list