On Wed, Nov 18, 2009 at 04:50:05PM +0100, Jakob Voss wrote: > map.zoomToExtent( kml.getExtent() );
map.zoomToExtent( kml.getDataExtent() ); http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.getDataExtent > The getExtent() method of OpenLayers.Layer does only return the current > viewport but not the whole extend. The following does not works neither: > > map.zoomToExtent( kml.maxExtent ); > > I think the problem is that the KML layer may lie outside of the current > viewport and so it does not get loaded (?) I just want to get the > smallest bounding box that contains all coordinates in the KML file. How > can you do this? > > Thanks! > Jakob > > -- > Jakob Voß <[email protected]>, skype: nichtich > Verbundzentrale des GBV (VZG) / Common Library Network > Platz der Goettinger Sieben 1, 37073 Göttingen, Germany > +49 (0)551 39-10242, http://www.gbv.de > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
