[Mapserver-users] Multiple map views in one html page?
Steve Lime
steve.lime at dnr.state.mn.us
Thu Jul 29 10:08:13 PDT 2004
Hi Backy: Better late than never I guess. I put together something that
might give folks ideas. Check out:
http://maps.dnr.state.mn.us/cgi-bin/mapserv43?map=/usr/local/www/docs/testing/multiple/test.map&layer1=landsat&layer2=doq03im4
It displays 2 maps and allows you to control which layer independently,
but the zooming is syncronized. There are a couple of issues with EPPL7
files being rotated with mode=map, but that's another problem. You'll
get the idea. The template file and map file can be found at
http://maps.dnr.state.mn.us/testing/multiple.
Steve
>>> <colwell at socsci.umn.edu> 7/27/2004 10:43:03 AM >>>
Hey Steve,
I was wondering if you had had any luck with the multiple maps app?
Thanks,
~Becky
> It'd be clearest if I do a quick sample app. I'll try to do that
> tonite...
>
> Steve
>
>>>> <colwell at socsci.umn.edu> 7/23/2004 12:21:48 PM >>>
> Hi Steve,
>
> I am currently using only one mapfile. What's your idea for a
single
> form?
>
> Thanks!
>
> ~Becky
>
>> Will you really have multiple mapfiles or will you just turn on
>> different layers in one mapfile? I think
>> you can do this with a single form.
>>
>> Steve
>>
>>>>> Rebecca Colwell <colwell at geog.umn.edu> 7/22/2004 2:46:27 PM >>>
>> Hi Steve,
>>
>> It is pretty sparse at this point. I just started putting it all
>> together a couple weeks back.
>>
>> In the end, I would like the user to be able to visually compare
>> different aspects of felon voting restrictions in the US. Right
now
> I
>>
>> just have the two layers comparing ethnicity created, but soon I
> will
>> be
>> adding more (as well as a legend and explanatory info). I think it
>> would be nice for my end users to visually cross reference the
>> information if they have two or more independent/interactive maps
to
>> work with within the same webpage.
>>
>> Does my explanation make things clearer?
>>
>> ~Becky
>>
>> Steve Lime wrote:
>>
>>> What do you want the page to actually do? It's hard to tell with
> the
>>> current setup...
>>>
>>> Steve
>>>
>>>
>>>>>>Rebecca Colwell <colwell at geog.umn.edu> 7/22/2004 2:08:47 PM >>>
>>>
>>> Hey Steve,
>>>
>>> Thanks for taking a look. :) Here's the link:
>>>
>>
>
http://mapserver.geog.umn.edu/cgi-bin/mapserv?map=/home/colwell/public_html/FelonVoting/Map1.map&mode=browse
>
>>
>>>
>>>
>>> ~Becky
>>>
>>> Steve Lime wrote:
>>>
>>>
>>>>Do you have a site where I/we can take a look?
>>>>
>>>>Steve
>>>>
>>>>
>>>>
>>>>>>>Rebecca Colwell <colwell at geog.umn.edu> 7/22/2004 1:18:16 PM >>>
>>>>
>>>>Hi Steve,
>>>>
>>>>I've been trying to get your approach to work over the last few
>> days.
>>>
>>>
>>>>The way I'm understanding the template you provided, I am
> displaying
>>>>two
>>>>map images at the start of the application that the user can't
>>>
>>> change.
>>>
>>>>Does that sound right? I would like to have two forms that
operate
>>>>independent of each other. Right now in my template html I have
> two
>>>
>>>
>>>>forms set up. If a layer is checked in either form and then the
>>>>refresh
>>>>button is pushed, the two maps match each other. I'm guessing
this
>>>
>>> is
>>>
>>>>because the two forms are referencing the same [map] values. Is
>>>
>>> there
>>>
>>>>a
>>>>way to differentiate the two forms from referring to the same
layer
>>>>change? Can I do something like:
>>>>
>>>><form>
>>>>...lot's of stuff omitted...
>>>><input type="hidden" name="map" value="[map]">
>>>>...lot's of stuff omitted...
>>>></form>
>>>>
>>>><form>
>>>>...lot's of stuff omitted...
>>>><input type="hidden" name="map2" value="[map2]">
>>>>...lot's of stuff omitted...
>>>></form>
>>>>
>>>>I tried this, but with no luck. I don't know if it is possible
and
>> I
>>>
>>>
>>>>just didn't change enough html code, or if I needed to change
>>>
>>> something
>>>
>>>>in the mapfile, or if it won't work at all like this.
>>>>
>>>>One thing I like and would prefer to hang on to is that if I zoom
> in
>>>
>>> on
>>>
>>>>either map, the other one matches the same extent.
>>>>
>>>>If you or anyone else could get back to me on this, I would
>>>
>>> appreciate
>>>
>>>>it.
>>>>
>>>>Thanks!
>>>>
>>>>~Becky
>>>>
>>>>
>>>>Steve Lime wrote:
>>>>
>>>>
>>>>
>>>>>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
>>>>>_______________________________________________
>>>>>Mapserver-users mailing list
>>>>>Mapserver-users at lists.gis.umn.edu
>>>>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>>_______________________________________________
>>>>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