[Mapserver-users] Multiple map views in one html page?

Steve Lime steve.lime at dnr.state.mn.us
Mon Jul 19 17:45:47 EDT 2004


Sure it's possible. Simplest way is just to have multiple forms on one
page, you can also have multiple input image tags. The key (using the
CGI anyway) is not to build the maps as you pan and zoom. This is an
example where you'd set the main map STATUS to off. Rather you call
MapServer with mode=map to build the map views you might need
independantly. A template might look like:

<html>
   ...lot's of stuff omitted...
   <form name="view" action="/cgi-bin/mapserv">
     <input type="hidden" name="map" value="[map]">
     <input type="hidden" name="imgext" value="[mapext]">
     <input type="image" name="img"
src="/cgi-bin/mapserv?map=[map]&mapext=[mapext_esc]&layer=layer1&mode=map">
     <p>   
     <input type="image" name="img"
src="/cgi-bin/mapserv?map=[map]&mapext=[mapext_esc]&layer=layer2&mode=map">
   </form>
   ...lot's of stuff omitted...
</html>

It assumes that both images are the same size, but the content is
totally diffent. Of course you can get very fancy using MapScript or
Javascript. I used to have a demo application with 4 viewports, worked
just fine.

Steve

>>> Rebecca Colwell <colwell at geog.umn.edu> 7/19/2004 3:13:44 PM >>>
Hi all,

I was wondering if there is a way to have two or more map views in an 
html document?  I would like the views to be independently "query-able"

so that different thematic maps could be compared to one another.

Thanks,

~Becky

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list