[OpenLayers-Users] OverviewMap - bad coords?
Tim Schaub
tschaub at openplans.org
Wed Jul 25 15:42:47 EDT 2007
Jeff Dege wrote:
> Now I seem to remember having had a similar problem with KaMap on the
> main map, because the default tile size in OpenLayers was 256x256 and in
> KaMap was 200x200. Which I fixed by setting the tilesize option to the
> OpenLayers.Map constructor. So I passed a tilesize option to the
> OverviewMap constructor, and it made no difference.
>
Please see the wiki page on the OverviewMap, specifically the section on
custom map options[1].
You'll want to construct your overview map with some non-default
options. Set the mapOptions property of the options object as in the
example, and you should get what you want.
To quote from the wiki:
The thing to keep in mind here is that the OverviewMap control is a
control, not a map. This is an important distinction. The OverviewMap
control *has* a map, but *it is not* a map itself. To set options on the
control, use properties of the options object as you would with other
controls. To set properties on the little map that the OverviewMap
control controls, use the special mapOptions property of the options object.
Tim
[1]
http://trac.openlayers.org/wiki/Control/OverviewMap#Custommapoptions-projectionsextentsetc.
More information about the Users
mailing list