On Mon, Apr 6, 2009 at 5:46 PM, Nicholas Bergson-Shilcock <[email protected]> wrote: > I have a GML layer that pulls in a KML file. After the layer has loaded, I'd > like to run something like: > > map.zoomToExtent(layer.getDataExtent()); > > Just running this right after I create and add the layer doesn't work because > it runs before the layer has fully loaded. Using setTimeout() is hacky and > unreliable. Is there a callback for doing this?
Yes, just listen to "loadend" on the layer. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
