[OpenLayers-Users] help (add gml files,try)
Arnd Wippermann
arnd.wippermann at web.de
Sat Jan 23 08:13:21 EST 2010
Hi Ricardo,
firebug shows:
bounds is null
zoomToExtent()(null, undefined)Map.js (Linie 2075)
zoomToMaxExtent()(Object EVENT_TYPES=[24] options=Object style=Object)Map.js
(Linie 2119)
initGis()map3.html (Linie 125)
onload()map3.html (Linie 1)
[Break on this error] var center = bounds.getCenterLonLat();
your layer lindero is not loaded, when you want to zoom. Try instead
map.setCenter(new OpenLayers.LonLat(x, y), 11);
It could also be setting a baselayer from an GML layer, that not loaded yet
leads to an error. I use always a faked layer to get a baselayer for my map
and add my other layers as overlays.
var fakeLayer = new OpenLayers.Layer( "fake", "");
fakeLayer.isBaseLayer=true;
map.addLayer(fakeLayer);
goof luck
Arnd
_____
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Ricardo Rodríguez
Gesendet: Freitag, 22. Januar 2010 23:51
An: users at openlayers.org
Betreff: [OpenLayers-Users] help (add gml files,try)
hello all, I still have the same problem are not my files, I've done
everything that I have recommended (to create a base layer, permissions on
my server, check the coordinate system files) all the above is fine, but I
still have the problem I have changed some things at this site is the link:
http://obtra.univalle.edu.co/accewps/map3.html
I recommend doing, I'm tired
thanks for your answers
Ricardo Rodríguez
Ing. Topográfico
Univalle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100123/8c151054/attachment.html
More information about the Users
mailing list