On Jun 1, 2007, at 7:41 PM, Christopher Schmidt wrote: > On Fri, Jun 01, 2007 at 03:30:03PM -0600, Scott Davis wrote: >> Hey, >> >> Congrats on the 2.4 release. >> >> As I'm digging into the API, it appears that the ZoomToMaxExtent >> control is broken as shipped. (Please correct me if I'm wrong.) It >> seems to be missing the click handler and the associated CSS to get >> it to appear. I did the following to get it working. Am I on the >> right track? > > The ZoomToMaxExtent control is actually designed to be added to a > Control.Panel object, as is demonstrated in: > > http://openlayers.org/dev/examples/panel.html > > In this case, the CSS, initialize, clicking behavior, etc. are all set > up by the Control.Panel. > > I think this should solve any use case I can think of: if it doesn't, > I'd like to know about it. I assume that this is just a lack of > documentation. (For the record, you can remove the rest of the > controls > from the panel and just get the zoomToMaxExtent control. > > Does this help you?
Exactly what I was looking for. I didn't care as much about the specific control as I did grokking the methodology. I was just going down the list: map.addControl(LayerSwitcher), map.addControl (OverviewMap), etc. and ZoomToMaxExtent didn't seem to work as the others did. So, (warning: gross generalization ahead) should all controls go in a Panel? BTW, keep your eyes on http://trimet.org. An antiquated ESRI interactive map is on its way out, being replaced by a full OSS stack: GeoServer, OpenLayers, TileCache, PostGIS, et al. I'll send an announcement to the list when it goes live. Cheers, s _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
