[Chameleon] Resizing MapDHTML widget...revisited
Mike Leahy
mgleahy at alumni.uwaterloo.ca
Tue Nov 8 12:52:00 EST 2005
Hello list,
I just wanted to see if I could raise this question again in hopes that
I might catch the attention of someone that is relatively familiar with
the inner-workings of the MapDHTML widget and related components.
I have a demo I'm working on, which can be viewed at
http://gaia.uwaterloo.ca/mgl/resizetest/. In this demo, I want to be
able to resize a MapDHTML widget without reloading the webpage itself.
I essentially have this working (the demo I have will resize the height
of the map when the window.onresize event is triggered). It seems like
the map is loading fine (using the ajax script I posted last week) and
everything works properly, except that the map is not visible beyond its
original height. I've determined that you can still draw a zoom box
(which you also cannot see) on this invisible area, and it functions
normally.
Would anyone have an idea what JS variables/objects need to be changed
to deal with this issue? The current JS code that I have executed (WRT
resizing the map) when the window is resized in my demo is as follows:
(...snip....)
var aWH = CWCDHTML_GetBrowserWH();
var oMainMapImage = CWCDHTML_GetImage( 'mapimage' );
(...snip....)
var oMainMapLayer = CWCDHTML_GetLayer( 'MainMapLayer' );
var oMainMapDivImg = CWCDHTML_GetImage( 'MapLayerDivImg' );
(...snip....)
gMapWiHeight = (aWH[1] - 57);
oMainMapLayer.height = gMapWiHeight;
oMainMapImage.height = gMapWiHeight;
oMainMapDivImg.height = gMapWiHeight;
gRulercMapHeight = gMapWiHeight;
document.forms[0].MAP_HEIGHT.value = gMapWiHeight;
getMapExtents = function(){ return new Array (
Math.round(document.forms[0].MAP_EXTENTS_MINX.value),
Math.round(document.forms[0].MAP_EXTENTS_MAXX.value),
Math.round(document.forms[0].MAP_EXTENTS_MINY.value),
Math.round(document.forms[0].MAP_EXTENTS_MAXY.value) ); };
(...snip....)
getMapSize = function(){return new Array( gMapWiWidth, gMapWiHeight );};
maplayer.clipTo(0,400,gMapWiHeight,0);
(...snip....)
Is there perhaps another layer that I need to resize, or something
different I need to do with the maplayer.clip* functions?
Thanks in advance for any help,
Mike
More information about the Chameleon
mailing list