[OpenLayers-Users] overview control

Tim Schaub tschaub at openplans.org
Fri Nov 2 14:23:57 EDT 2007


Huub Fleuren wrote:
> Hi,
> 
> It appears to be so that the options for the overviewmapcontrol must be 
> set like
> 
> var overviewrd = new OpenLayers.Control.OverviewMap({mapOptions:optionsrd});
> 

Please see http://trac.openlayers.org/wiki/Control/OverviewMap
(and specifically, the bit on custom map options).

The OverviewMap *is* a control.  Also, it *has* a map.

When you specify options in your constructor, you are setting properties 
on the control itself.  The mapOptions property on the control is used 
to set properties on the map that the control has.

Tim

> Thanks Steven for pointing this out
> 
> Even if I read carefully in de docs i suppose that this is documented.
> 
> Howefer: in the overviewmap.html example it looks like:
> 
>     var overview = new OpenLayers.Control.OverviewMap(options);
> 
> Allthough this also works in this case I would suggest that this will be 
> corrected in de distribution
> 
> 
> Regards,
> Huub
> 
> Huub Fleuren wrote:
>> Hi,
>>
>> I'm not sure but pretty sure that the overviewcontrol for a projection 
>> like 28992 does not work correctly (it does for 4326). What is a good 
>> way to go forward with this? Maybe file a trac-ticket?
>> I' referring to my previous contributions in this thread ...
>>
>> I tried using only different options (for the map and the 
>> overview)-(holding this carefully the same), it boils down to the units, 
>> i guess.
>>
>>
>>   var optionsll = {
>>      projection: "EPSG:4326"
>>     ,maxExtent: new OpenLayers.Bounds( 3.13, 50.45, 7.14,53.32)
>>     ,maxResolution: 1500
>>     ,scales:[2500000, 1200000, 600000, 300000, 150000, 75000, 37000, 
>> 12500, 4250]
>>   };
>>
>>   var optionsrd = {
>>      projection: "EPSG:28992"
>>     ,units:"m"
>>     ,maxExtent: new OpenLayers.Bounds( 0,300000,250000,650000)
>>     ,maxResolution: 1500
>>     ,scales:[2500000, 1200000, 600000, 300000, 150000, 75000, 37000, 
>> 12500, 4250]
>>
>>   };
>>
>>
>> Regards, Huub
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>>
>>
>>   
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> !DSPAM:4033,472b21db175308992556831!
> 




More information about the Users mailing list