[Mapserver-users] Mouse Over
Steve Lime
steve.lime at dnr.state.mn.us
Wed Feb 25 16:09:17 PST 2004
This is an oversight on my part. All of the [shp...] tags output
coordinates in the native projection. I'll add a proj attribute to allow
you to set the output projection. That way we can use proj=image to get
coordinates for image maps. It's development code so there may be some
change before 4.2 is released.
Precision is applied when writing coordinates to a string, so it's
applied after any transformation/clipping (and eventually projection).
It's true that with image coordinates the precision is forced to be 0.
Steve
>>> "Smith, Michael ERDC-CRREL-NH" <Michael.Smith at erdc.usace.army.mil>
02/23/04 11:44 AM >>>
Steve,
It looks like the shpxy is not being transformed to the output
projection
befor being transformed to image coordinates. It also looks like the
precision is being set to 0 before the xy to img coordinate tranform,
rather
than after (which is problem with ll coords).
I have a layer of lat lon points and here's the resulting output.
<area shape="circle" coords=" -188.000000,2746.000000,20"
href="javascript:alert('Mississippi River at Muscatine,IA <br> Current
Stage: 5.94<br> as of 23/02/2004 11:10 am')" alt=" 5.94">
<area shape="circle" coords=" -188.000000,2746.000000,20"
href="javascript:alert('Boone River near Webster City,IA <br> Current
Stage: 3.76<br> as of 23/02/2004 11:11 am')" alt=" 3.76">
<area shape="circle" coords=" -188.000000,2746.000000,20"
href="javascript:alert('Big Bureau Creek near Princeton,IL <br> Current
Stage: -9999.00<br> as of 23/02/2004 11:10 am')" alt=" -9999.00">
<area shape="circle" coords=" -188.000000,2746.000000,20"
href="javascript:alert('Illinois River near La Salle,IL <br> Current
Stage:
13.54<br> as of 23/02/2004 11:09 am')" alt=" 13.54">
<area shape="circle" coords=" -188.000000,2746.000000,20"
href="javascript:alert('Illinois River near Henry,IL <br> Current
Stage:
15.92<br> as of 23/02/2004 11:09 am')" alt=" 15.92">
<area shape="circle" coords=" -188.000000,2746.000000,20"
href="javascript:alert('Vermilion River near Leonore,IL <br> Current
Stage:
5.69<br> as of 23/02/2004 11:09 am')" alt=" 5.69">
<area shape="circle" coords=" -188.000000,2746.000000,20"
href="javascript:alert('Fox River near Dayton,IL <br> Current Stage:
4.91<br> as of 23/02/2004 11:08 am')" alt=" 4.91">
Mike
Mike Smith
email: michael.smith at erdc.usace.army.mil
RSGISC
ERDC - CRREL
Hanover, NH 03755
(603) 646-4765
-----Original Message-----
From: Steve Lime [mailto:steve.lime at dnr.state.mn.us]
Sent: Friday, February 20, 2004 1:09 AM
To: cpurvis at asg.sc.edu; pucher at atlas.gis.univie.ac.at; Steve Lime;
mapserver-users at lists.gis.umn.edu; bartvde at xs4all.nl
Subject: RE: [Mapserver-users] Mouse Over
I need to ammend this message. I made a mistake earlier although if you
were using a querymap you wouldn't notice. The searchmap option *must*
take a value, set searchmap=true in the URL below and all is well. One
other caveat, don't use the size options in the querymap options, rather
let it inherit size from the main map object. I'll have to fix this
issue later. Otherwise seems to work fine (code problem mentioned
earlier has been long fixed) either with an image or as a seperate
component.
Steve
>>> Steve Lime 02/19/04 11:52 AM >>>
Here's a CGI-based demo.
http://maps.dnr.state.mn.us/cgi-bin/mapserv41?map=/usr/local/www/docs/testin
g/imagemap/test.map&mode=nquery&searchmap
You can download at http://maps.dnr.state.mn.us/testing/imagemap.zip
It's basically just a query that outputs features that have been
transformed (clipped and thinned) to image coordinates. The nice thing
is that you could use this for a component-based system, that is create
the map and the imagemap with seperate calls. The example above uses the
little documented "searchmap" option. This tells MapServer that the
search exent is that of a map so any incoming extent is fit to a map
(width/height) before querying is done. You can also use it with
pan/zoom interfaces (mode is still nquery) and MapServer will apply the
pan/zoom *before* doing the query. I don't know how you'd combine an
imagemap and a strait CGI-form so you could get the tooltips and the
clicking in the map for navigation. It's a start.
Steve
>>> "Steve Lime" <steve.lime at dnr.state.mn.us> 2/19/2004 12:46:07 AM >>>
I don't know squat about the imagemap output function. As Atilla said
it's on the experimental side. I do have an alternative using queries
and the [shpxy...] tag that may be of interest. It's pretty flexible and
usable from the CGI application. I'll post an example on the DNR
machines tomorrow (can't get to them tonite).
Steve
>>> "Charlton Purvis" <cpurvis at asg.sc.edu> 02/17/04 11:52 AM >>>
Hi, Steve:
Checked out the overlib URL you sent below, and I must admit it's slick.
I'm a little lost, though, what library do I need to make sure I have
installed and part of my ./configure?
I'm trying to monkey around w/ imagemap, a la the Wiki post:
OUTPUTFORMAT
NAME imagemap
MIMETYPE "text/html"
DRIVER imagemap
END
But a shp2img gives me a:
msDrawMap(): GD library error. Unable to initialize image.
Running 4.0.1 and gd-2.0.15.
My MS build looks like it put mapimagemap.c into my libmap.a. Any
hints?
Thanks,
Charlton
> -----Original Message-----
> From: Steve Lime [mailto:steve.lime at dnr.state.mn.us]
> Sent: Tuesday, February 10, 2004 12:51 PM
> To: pucher at atlas.gis.univie.ac.at; mapserver-users at lists.gis.umn.edu;
> bartvde at xs4all.nl
> Subject: Re: [Mapserver-users] Mouse Over
>
> Hi all: The mapimage w/XML software was really more a
proof-of-concept.
> I never took it any further than that. The source is around if you're
> interested. There are other possibilities as well. For example, in 4.0
> there actually is a imagemap output object (see
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?ImageMap) but I don't
know
> much about it. In 4.1 there is the [shpxy] tag and I've been planning
to
> add an attribute to allow you to output coordinates in IMAGE
> coordinates. That way you could build an imagemap on the fly via the
> CGI. It could also be used to populate DHTML popup objects (e.g.
> http://www.bosrup.com/web/overlib/).
>
> Would be happy to discuss further.
_______________________________________________
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