A couple MapServer suggestions

Stephen Lime steve.lime at dnr.state.mn.us
Fri Nov 5 11:06:29 EST 1999


To expand on Trevors comments. 

1. You can do this now, but you need a second small (very small) map file
to house the second scalebar definition. Then you call the second map
file like this in the template:

  <img src="/cgi-bin/mapserv?map=scalebar2.map&mapext=[minx]+[miny]+[maxx]+[maxy]&mode=scalebar">

You may also need to add the map size (rows and columns) although if static you can
set that in the second mapfile. With 3.3 you won't need the second file as you can change
scalebar units via a url. I'll add this as an example to the mapserv demo suite.
  
2. My support for this is a bit of a hack. I always knew people might want to do it but I
haven't used it myself so it's admittedly poorly tested. I'll add a template substitution
for the image center so you can set imgxy like this:

  <input type="hidden" name="imgxy" value="[mappixelcen]"> 

or something similar. I'll also add x and y components for this and for mapsize so embeding
in a URL is easier. To me a template substitution makes more sense than a new CGI
param. The CGI is there it just needs the right value.

3. You'll have to show me what the scalebar element looks like. Is it like MapBlast uses?
You can call the mapserver with a point and a scale to create a map. You can have
scale dependent URLs or you could use javascript to adjust the scale element to match
what's just been displayed.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Banister Trevor <TBanister at SpaceImaging.com> 11/04/99 08:16PM >>>
1. Borderless frames with different maps/templates is all I can think of,
probably need some "onload" JavaScript too.

2. I was able to do this with some success, create a new hyperlink URL with
the map size in it.
Pitfall: since you have to hard code the center point for non map clicks,
the "refresh" button doesn't work right for all but 1 of the maps. I've
considered editing the C and adding a new tag like [mappixelcenter] to solve
this, but haven't gotten around to it yet. Maybe we can talk Steve into it?
A kludge would be to make new map/template combinations for each map size. 

Example at: http://www2.spaceimaging.com/maps/ choose the "All Scenes" or
"Recent Cloud free" to see what I'm talking about. Once you're off of the
600x400 size, the requery button sends you further and further Southeast
since it's returning 300 200 as the "clicked" point rather than 200 150 or
100 75.

This site is pre-Alpha, so please be gentle. Scene data is available, but
most of the product imagery is still behind the firewall, and won't be
available. Let me know what you think.

3. Build a static scale bar and use it as a clickable map. You'll probably
have to hard code URLs for different levels on the scale bar, but it might
work. 

----------------------------------------------------------------------------
Trevor Banister, Sr. Application Designer
Space Imaging
12076 Grant Street
Thornton, CO 80241
Phone: (303) 254-2175 Fax: (303) 254-2211
----------------------------------------------------------------------------
"All the glossy brochures and PR budgets in the world can't disguise the
fact that nobody has solved the automatic programming problem. There is no
program that can take an English description of what you want done and turn
that into software."  --Philip Greenspun



-----Original Message-----
From: Paul G. Allen [mailto:pgallen at randomlogic.com] 
Sent: Thursday, November 04, 1999 6:27 PM
To: MapServer Users List
Subject: A couple MapServer suggestions


Maybe some of this is in the works already.

1. I'd like to be able to display multiple scale bars so that I could have
one
in miles and one in kilometers for example.
2. I'd like to be able to change the map image size from the users browser
so
that the user can adjust the map size to fit their screen. Currently doing
this
messes up the reference image and zoom/pan calculations.
3. One of my colleagues would like the ability to scale the map image using
the
scale bar - change the scale on the scale bar and the map adjusts to the
corresponding scale.

There were a couple others, but I don't recall what they were at the moment
(no,
I didn't write them down :)

PGA



More information about the mapserver-users mailing list