[OpenLayers-Dev] change default size of the overview map

Frédéric Junod frederic.junod at camptocamp.com
Thu Dec 6 02:55:10 EST 2007


Valentina,

Is the image layer correctly displayed on the map ?

Does is works if you don't set a custom size for your overview map ? 

I never use the Image Layer but the 'options' parameter seems to be wrong,
try with:
var panorama = new OpenLayers.Layer.Image(myImage.name,
                                          myImage.src,
                                          panorama_bounds,
                                          panorama_size)

Also check your parameters type: 
  myImage.name : String
  myImage.src: String
  panorama_bounds: OpenLayers.Bounds
  panorama_size: OpenLayers.Size

see also: http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Image-js.html
and: http://www.openlayers.org/dev/examples/image-layer.html

Regards,
fredj

PS: please answer to the dev at openlayers.org mailing list, not to my personal
address

Le Wed, 5 Dec 2007 17:10:06 +0000,
"Val Cartei" <val.cartei at gmail.com> a écrit :

> Thanks, I've updated it to:
> var options = {size: new OpenLayers.Size(newWidth, newHeight)};
>     map.addControl(new OpenLayers.Control.OverviewMap(options));
> 
> but still it gives me the blue background.
> Could this have something to do with the fact that the image is added on the
> map as a Layers? Like:
> 
>    var panorama = new OpenLayers.Layer.Image(
>                                 myImage.name,
>                                 myImage.src,
>                                  panorama_bounds,panorama_size,options);
> 
>     map.addLayers([panorama]);
> 
> Best,
> 
> Valentina Cartei
> UK Tel. +44 (0)796 6882820


-- 
Frédéric Junod
Camptocamp SA



More information about the Dev mailing list