[OpenLayers-Users] map bounds or projection problem?

eoinyp eoinyp at yahoo.com
Tue Aug 25 08:04:58 EDT 2009


Hi list,
I am just getting started with openlayers and geoserver.
I have two simple wms layers being served by geoserver: a layer of US
states, and a layer of town boundaries in Massachusetts. Each of the layers
display fine on their own. Showing the full extent of the mapped area. When
I put them both together however, only a section of the States layer is
shown, while the full Mass layer is shown. It is not possible to pan and see
the rest of the States layer. 
I am not entirely sure what the problem is, so im not sure how to fix it!
The map with the states and the Mass towns layers here:
http://www.eoinmaca.com/maps/OpenLayers/mymap3.htm
I think it is a problem with the extent of the bounds of the  layers
defined. What should it be set to?
currently it is:  

var bounds = new OpenLayers.Bounds(
19012.0201171875, 768402.5875,
345695.3353515625, 968859.1625);

The layers have different EPSGs - is this a problem?

The problem is compounded when I add in a googleEarth baselayer. It shows
the full extent of the google layer, but when I zoom in I cant pan to the
Mass area. The pan functionality seems to be constrained to a small area.
The map with the google base layer is available here:
http://www.eoinmaca.com/maps/OpenLayers/mymap2.htm


If the bounds is the problem, is there a simple way of figuring out what the
bounds of my map need to be?

Many thanks,

Eoinyp


-- 
View this message in context: http://n2.nabble.com/map-bounds-or-projection-problem-tp3509317p3509317.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list