[OpenLayers-Users] How to add OverviewMap that is open?
Stephen Woodbridge
woodbri at swoodbridge.com
Fri Apr 20 00:03:02 EDT 2007
Christopher Schmidt wrote:
> On Thu, Apr 19, 2007 at 11:10:36PM -0400, Stephen Woodbridge wrote:
>> I would like to add the OverviewMap, but have it start in the open
>> position? How do I do this?
>>
>> I tried:
>>
>> var ovm = new OpenLayers.Control.OverviewMap();
>> ovm.maximizeControl();
>> map.addControl(ovm);
>>
>> but it was not happy with this, probably because this is not an event. I
>> looked through the code but it was not obvious whether there was an
>> option for this.
>
> I just did tested this -- it seems to work after the control is added to
> the map, and layers are added to the map. (It doesn't actually populate
> the overview map until after it has a base layer to clone.)
>
> var ovm = new OpenLayers.Control.OverviewMap();
> map.addControl(ovm);
> map.addLayer(wms);
> ovm.maximizeControl();
>
> Will that work for you?
Yes, that works and I almost had it right :)
So one more question then its time for sleep, Is it possible to tell OL
to use an alternate theme? How?
Thanks,
-Steve
More information about the Users
mailing list