[Chameleon] resize map to fit area

Julien-Samuel Lacroix jlacroix at mapgears.com
Mon Dec 4 07:04:34 EST 2006


Hi,
Do you have the MapSize widget in your appplication?
It must be present for your code to work. BTW, you can set it to 
visible="false" and it will still work.

Julien

Ben Thompson wrote:
> I'm trying to resize the map to fit the dive area after the window is 
> resized.
> First I noticed that the onresize event does not come through with a map 
> widget on the page (works when I remove it).
> OnResizeEnd does not work in either case.
> Anyone know why and what can be done to get around that?
> 
> So I added a "fit map" button to trigger it manually.
> It calls a function which does this:
> 
> gMapWiWidth = newwidth;
> gMapWiHeight = newheight;
> document.forms[0].SET_MAP_WIDTH.value = newwidth;
> document.forms[0].SET_MAP_HEIGHT.value = newheight;
> document.forms[0].submit();
> 
> it always comes up with the size in the mapfile.
> 
> What am I missing?
> 
> -Ben Thompson
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Chameleon mailing list