[Mapserver-users] Layer control in separate frame
Steve McCrone
ms57 at streamyx.com
Sun Sep 28 19:27:27 PDT 2003
Layer control in separate frame
Thanks to Steve Lime in directing me to the samples found in:
http://maps.dnr.state.mn.us/mapserver_demos/workshop
------
In the "frames.html" I have added a left frame to perform the layer control.
It has a tree control for the user to toggle on/off the layers.
<frameset cols="150,*" onLoad="load_map_frame()">
<frame name="left" scrolling="yes" target="rtop"
src="demoCheckboxLeftFrame.html">
<frameset rows="82%,*">
<frame src="blank.html" name="map_frame" marginwidth="5"
marginheight="5" scrolling="YES">
<frame src="blank.html" name="query_frame" marginwidth="5"
marginheight="5" scrolling="YES">
</frameset>
</frameset>
I retrieve ths imgext from the map frame -
ext = parent.map_frame.document.mapserv.imgext.value;
and then construct a string on-the-fly with the updated layers and current
imgext
example - http://localhost/frames.html?layer= + layers +
"&zoomsize=2&imgext=" + ext + "&. . . etc
and then update the map frame -
parent.map_frame.location.href = loc;//this updates the map frame with the
updated layers and keeps the scale the same
this works fine for the sample that uses frames.html
----------------------
Now I need to achieve the same thing using the frames_dhtml.html sample
(i.e.e using the dhtml rubber band zoom box), but it looks like I will have
to access different variables - not the hidden variable imgex.
Can't figure this one out!
Any help would be great - thanks!
More information about the MapServer-users
mailing list