[OpenLayers-Users] Change Layers, but Layer does not show until zoom out/in performed

Stephen Woodbridge woodbri at swoodbridge.com
Thu Jul 1 11:14:31 EDT 2010


Hi Chris,

Thank you for your feedback on changing layers. I got almost everything 
working. I think I ran into the remaining issue a long time ago, but I 
can not for the life of me find the old post or solution. And this might 
not be exactly the same problem.

I have three base layers:

1. Tiger in EPSG:4326
2. Google in EPSG:900913
3. Streets in EPSG:4326

and a couple of vector overlays that are always on.

Everything works fine when I switch between any of the base layers 
EXCEPT when I change from Google to Streets.

When I change from Google to Streets nothing is drawn in the view port. 
No mapserver image, no vector data, just the map controls. If I zoom in 
or out everything displays properly.

There are no broken images, not javascript errors reported.
The NET panel shows that the image is requested and received.
In FF console:

map.baseLayer.redraw()

returns true but nothing is displayed.

Here is the app currently under development:
http://imaptools.com:8080/routeloops/index4.php?zoom=11&lat=42.64057&lon=-71.36395&layers=B00TT&ll=-71.389033%2042.619456&len=10&rs=0.13877378737528812&av=1100%2C1200&u=E&cw=1#

To reproduce the issue:

1. open the layerswitcher
2. select Google Map (click through alerts)
3. select Streets (click through alerts) - nothing displays
4. zoom in or out - everything displays ok

Any pointers would be appreciated.

Thanks,
   -Steve



More information about the Users mailing list