开发者

Change the size of an OpenLayers.Control.OverviewMap

开发者 https://www.devze.com 2023-03-14 16:20 出处:网络
I create my OpenLayers.Control.OverviewMap with a given size but I would like to change it when certain conditions are met.

I create my OpenLayers.Control.OverviewMap with a given size but I would like to change it when certain conditions are met. I have tried two approaches with no luck...

My first try was just changing its width and height via CSS attributes:

$("div.olControlOverviewMapElement>div.olMap").css('width',320);

It does change its visual size but then the overview map doesn't work properly, the "new gained" space in the overviewmap is not usable (can't be used to drag the view rectangle)

My second try was simply changing its size property:

ovMap.s开发者_Python百科ize = new OpenLayers.Size(320,240);

but it doesn't have any effect to the overview map.

Is it possible to change its size once it's been created?

0

精彩评论

暂无评论...
验证码 换一张
取 消