[OpenLayers-Users] overview control

huub fleuren huub.fleuren at geodan.nl
Tue Nov 6 06:55:21 EST 2007


Hi Tim,

Yes I see now were i got confused. Thanks for clarifying the example.

I' using this now:
  var options2 = {
    size:new OpenLayers.Size(100,130),
    minRatio:8,
    maxRatio:32,
    mapOptions : {layers: [overviewlayer.clone()],maxResolution: 2500}
  };

  var overview = new OpenLayers.Control.OverviewMap(options2);


Regards, Huub

On 11/5/2007 7:16 PM, Tim Schaub wrote:
> Hey-
>
> Huub Fleuren wrote:
>   
>> Ha Tim,
>>
>> Right. I guess i did not look hard enough. And i suppose it's clear 
>> enough. Relatively lots to be said about the OverviewControl though, 
>> maybe change this particular line in the overviewmap.html example anyway?
>>
>>  var overview = new OpenLayers.Control.OverviewMap(options);
>>
>> into
>>
>>  var overview = new OpenLayers.Control.OverviewMap({mapOptions:options});
>>
>>     
>
> I think you may not be fully understanding things here.  The two lines 
> above are not equivalent - in fact they are very different.
>
> The first sets options for the control itself.
>
> The second sets options for the map that the control has.
>
> The control itself and the map that it has take very different options. 
>   I agree that an example demonstrating this would be useful.  I've 
> updated the overviewmap.html example to show two different options - 
> please note, however, that the above distinction is important.
>
> Tim
>
>
>   
>> Regards, Huub
>>
>>
>> Tim Schaub wrote:
>>     
>>> In hopes that these links show up at the top of the google search 
>>> results for OverviewMap, I'll gather doc links here:
>>>
>>> If you have trouble with the overview map control, please read:
>>> http://trac.openlayers.org/wiki/Control/OverviewMap
>>>
>>> If you want to set custom map options on the overview map control, find 
>>> the bit on "Custom map options" on that page.
>>> http://trac.openlayers.org/wiki/Control/OverviewMap#Custommapoptions-projectionsextentsetc.
>>>
>>> If you like reading class documentation, please read:
>>> http://dev.openlayers.org/apidocs/files/OpenLayers/Control/OverviewMap-js.html
>>>
>>> If you want to see the bit where it describes the mapOptions property, 
>>> click on the mapOptions property.
>>> http://dev.openlayers.org/apidocs/files/OpenLayers/Control/OverviewMap-js.html#OpenLayers.Control.OverviewMap.mapOptions
>>>
>>> If you want to learn by reading code and don't own a text editor, see
>>> http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js
>>>
>>> Specifically, you can read about the mapOptions property:
>>> http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js#L68
>>>
>>> Or, if you look a few lines farther down, you can read about the 
>>> constructor, which mentions the mapOptions property:
>>> http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js#L76
>>>
>>> There, documented :)
>>>
>>> Tim
>>>
>>> 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});
>>>>
>>>> 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
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>>
>>>
>>>   
>>>       
>> !DSPAM:4033,472db2fb203595219720167!
>>     
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>
>   

-- 
=====================================
Geodan IT b.v.
Buitenhaven 27-A
5211 TP 's-Hertogenbosch (NL)
-------------------------------------
Tel: +31 (0)73 - 692 5151
Fax:  +31 (0)73 - 692 5150
Mobiel:
-------------------------------------
Postadres / mailing address
President Kennedylaan 1
1079 MB Amsterdam (NL)
-------------------------------------
E-mail: huub.fleuren at geodan.nl
Website: www.geodan.nl
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------






More information about the Users mailing list