[Mapserver-users] Mouse Over

Smith, Michael ERDC-CRREL-NH Michael.Smith at erdc.usace.army.mil
Mon Feb 23 09:44:31 PST 2004


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3FA34.1D74D90A
Content-Type: text/plain

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

------_=_NextPart_001_01C3FA34.1D74D90A
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2655.35">
<TITLE>RE: [Mapserver-users] Mouse Over</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Steve,</FONT>
</P>

<P><FONT SIZE=3D2>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).</FONT></P>

<P><FONT SIZE=3D2>I have a layer of lat lon points and here's the =
resulting output.</FONT>
</P>

<P><FONT SIZE=3D2><area shape=3D"circle" coords=3D" =
-188.000000,2746.000000,20"  =
href=3D"javascript:alert('Mississippi River at Muscatine,IA  =
<br> Current Stage:        =
5.94<br> as of 23/02/2004 11:10 am')" =
alt=3D"      5.94"></FONT></P>

<P><FONT SIZE=3D2> <area shape=3D"circle" =
coords=3D" -188.000000,2746.000000,20"  =
href=3D"javascript:alert('Boone River near Webster City,IA  =
<br> Current Stage:        =
3.76<br> as of 23/02/2004 11:11 am')" =
alt=3D"      3.76"></FONT></P>

<P><FONT SIZE=3D2> <area shape=3D"circle" =
coords=3D" -188.000000,2746.000000,20"  =
href=3D"javascript:alert('Big Bureau Creek near Princeton,IL  =
<br> Current Stage:    -9999.00<br> as of =
23/02/2004 11:10 am')" alt=3D"  =
-9999.00"></FONT></P>

<P><FONT SIZE=3D2> <area shape=3D"circle" =
coords=3D" -188.000000,2746.000000,20"  =
href=3D"javascript:alert('Illinois River near La Salle,IL  =
<br> Current Stage:       =
13.54<br> as of 23/02/2004 11:09 am')" =
alt=3D"     13.54"></FONT></P>

<P><FONT SIZE=3D2> <area shape=3D"circle" =
coords=3D" -188.000000,2746.000000,20"  =
href=3D"javascript:alert('Illinois River near Henry,IL  =
<br> Current Stage:       =
15.92<br> as of 23/02/2004 11:09 am')" =
alt=3D"     15.92"></FONT></P>

<P><FONT SIZE=3D2> <area shape=3D"circle" =
coords=3D" -188.000000,2746.000000,20"  =
href=3D"javascript:alert('Vermilion River near Leonore,IL  =
<br> Current Stage:        =
5.69<br> as of 23/02/2004 11:09 am')" =
alt=3D"      5.69"></FONT></P>

<P><FONT SIZE=3D2><area shape=3D"circle" coords=3D" =
-188.000000,2746.000000,20"  =
href=3D"javascript:alert('Fox River near Dayton,IL  =
<br> Current Stage:        =
4.91<br> as of 23/02/2004 11:08 am')" =
alt=3D"      4.91"></FONT></P>

<P><FONT SIZE=3D2>Mike</FONT>
</P>

<P><FONT SIZE=3D2>Mike Smith</FONT>
<BR><FONT SIZE=3D2>email: michael.smith at erdc.usace.army.mil</FONT>
<BR><FONT SIZE=3D2>RSGISC</FONT>
<BR><FONT SIZE=3D2>ERDC - CRREL </FONT>
<BR><FONT SIZE=3D2>Hanover, NH  03755</FONT>
<BR><FONT SIZE=3D2>(603) 646-4765</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Steve Lime [<A =
HREF=3D"mailto:steve.lime at dnr.state.mn.us">mailto:steve.lime at dnr.state.m=
n.us</A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Friday, February 20, 2004 1:09 AM</FONT>
<BR><FONT SIZE=3D2>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</FONT>
<BR><FONT SIZE=3D2>Subject: RE: [Mapserver-users] Mouse Over</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>I need to ammend this message. I made a mistake =
earlier although if you</FONT>
<BR><FONT SIZE=3D2>were using a querymap you wouldn't notice. The =
searchmap option *must*</FONT>
<BR><FONT SIZE=3D2>take a value, set searchmap=3Dtrue in the URL below =
and all is well. One</FONT>
<BR><FONT SIZE=3D2>other caveat, don't use the size options in the =
querymap options, rather</FONT>
<BR><FONT SIZE=3D2>let it inherit size from the main map object. I'll =
have to fix this</FONT>
<BR><FONT SIZE=3D2>issue later. Otherwise seems to work fine (code =
problem mentioned</FONT>
<BR><FONT SIZE=3D2>earlier has been long fixed) either with an image or =
as a seperate</FONT>
<BR><FONT SIZE=3D2>component.</FONT>
</P>

<P><FONT SIZE=3D2>Steve</FONT>
</P>

<P><FONT SIZE=3D2>>>> Steve Lime 02/19/04 11:52 AM =
>>></FONT>
<BR><FONT SIZE=3D2>Here's a CGI-based demo.</FONT>
</P>

<P><FONT SIZE=3D2><A =
HREF=3D"http://maps.dnr.state.mn.us/cgi-bin/mapserv41?map=3D/usr/local/w=
ww/docs/testing/imagemap/test.map&mode=3Dnquery&searchmap" =
TARGET=3D"_blank">http://maps.dnr.state.mn.us/cgi-bin/mapserv41?map=3D/u=
sr/local/www/docs/testing/imagemap/test.map&mode=3Dnquery&searchmap</A><=
/FONT>
</P>

<P><FONT SIZE=3D2>You can download at <A =
HREF=3D"http://maps.dnr.state.mn.us/testing/imagemap.zip" =
TARGET=3D"_blank">http://maps.dnr.state.mn.us/testing/imagemap.zip</A> =
</FONT>
</P>

<P><FONT SIZE=3D2>It's basically just a query that outputs features =
that have been</FONT>
<BR><FONT SIZE=3D2>transformed (clipped and thinned) to image =
coordinates. The nice thing</FONT>
<BR><FONT SIZE=3D2>is that you could use this for a component-based =
system, that is create</FONT>
<BR><FONT SIZE=3D2>the map and the imagemap with seperate calls. The =
example above uses the</FONT>
<BR><FONT SIZE=3D2>little documented "searchmap" option. This =
tells MapServer that the</FONT>
<BR><FONT SIZE=3D2>search exent is that of a map so any incoming extent =
is fit to a map</FONT>
<BR><FONT SIZE=3D2>(width/height) before querying is done. You can also =
use it with</FONT>
<BR><FONT SIZE=3D2>pan/zoom interfaces (mode is still nquery) and =
MapServer will apply the</FONT>
<BR><FONT SIZE=3D2>pan/zoom *before* doing the query. I don't know how =
you'd combine an</FONT>
<BR><FONT SIZE=3D2>imagemap and a strait CGI-form so you could get the =
tooltips and the</FONT>
<BR><FONT SIZE=3D2>clicking in the map for navigation. It's a =
start.</FONT>
</P>

<P><FONT SIZE=3D2>Steve</FONT>
</P>

<P><FONT SIZE=3D2>>>> "Steve Lime" =
<steve.lime at dnr.state.mn.us> 2/19/2004 12:46:07 AM =
>>></FONT>
<BR><FONT SIZE=3D2>I don't know squat about the imagemap output =
function. As Atilla said</FONT>
<BR><FONT SIZE=3D2>it's on the experimental side. I do have an =
alternative using queries</FONT>
<BR><FONT SIZE=3D2>and the [shpxy...] tag that may be of interest. It's =
pretty flexible and</FONT>
<BR><FONT SIZE=3D2>usable from the CGI application. I'll post an =
example on the DNR</FONT>
<BR><FONT SIZE=3D2>machines tomorrow (can't get to them tonite).</FONT>
</P>

<P><FONT SIZE=3D2>Steve</FONT>
</P>

<P><FONT SIZE=3D2>>>> "Charlton Purvis" =
<cpurvis at asg.sc.edu> 02/17/04 11:52 AM >>></FONT>
<BR><FONT SIZE=3D2>Hi, Steve:</FONT>
</P>

<P><FONT SIZE=3D2>Checked out the overlib URL you sent below, and I =
must admit it's slick.</FONT>
</P>

<P><FONT SIZE=3D2>I'm a little lost, though, what library do I need to =
make sure I have</FONT>
<BR><FONT SIZE=3D2>installed and part of my ./configure?</FONT>
</P>

<P><FONT SIZE=3D2>I'm trying to monkey around w/ imagemap, a la the =
Wiki post:</FONT>
<BR><FONT SIZE=3D2>  OUTPUTFORMAT</FONT>
<BR><FONT SIZE=3D2>    NAME imagemap</FONT>
<BR><FONT SIZE=3D2>    MIMETYPE =
"text/html"</FONT>
<BR><FONT SIZE=3D2>    DRIVER imagemap</FONT>
<BR><FONT SIZE=3D2>  END</FONT>
</P>

<P><FONT SIZE=3D2>But a shp2img gives me a:</FONT>
<BR><FONT SIZE=3D2>msDrawMap(): GD library error. Unable to initialize =
image.</FONT>
</P>

<P><FONT SIZE=3D2>Running 4.0.1 and gd-2.0.15.</FONT>
</P>

<P><FONT SIZE=3D2>My MS build looks like it put mapimagemap.c into my =
libmap.a.  Any</FONT>
<BR><FONT SIZE=3D2>hints?</FONT>
</P>

<P><FONT SIZE=3D2>Thanks,</FONT>
</P>

<P><FONT SIZE=3D2>Charlton</FONT>
</P>

<P><FONT SIZE=3D2>> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> From: Steve Lime [<A =
HREF=3D"mailto:steve.lime at dnr.state.mn.us">mailto:steve.lime at dnr.state.m=
n.us</A>] </FONT>
<BR><FONT SIZE=3D2>> Sent: Tuesday, February 10, 2004 12:51 =
PM</FONT>
<BR><FONT SIZE=3D2>> To: pucher at atlas.gis.univie.ac.at; =
mapserver-users at lists.gis.umn.edu;</FONT>
<BR><FONT SIZE=3D2>> bartvde at xs4all.nl </FONT>
<BR><FONT SIZE=3D2>> Subject: Re: [Mapserver-users] Mouse =
Over</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Hi all: The mapimage w/XML software was really =
more a</FONT>
<BR><FONT SIZE=3D2>proof-of-concept.</FONT>
<BR><FONT SIZE=3D2>> I never took it any further than that. The =
source is around if you're</FONT>
<BR><FONT SIZE=3D2>> interested. There are other possibilities as =
well. For example, in 4.0</FONT>
<BR><FONT SIZE=3D2>> there actually is a imagemap output object =
(see</FONT>
<BR><FONT SIZE=3D2>> <A =
HREF=3D"http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?ImageMap" =
TARGET=3D"_blank">http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?ImageMap<=
/A>) but I don't</FONT>
<BR><FONT SIZE=3D2>know</FONT>
<BR><FONT SIZE=3D2>> much about it. In 4.1 there is the [shpxy] tag =
and I've been planning</FONT>
<BR><FONT SIZE=3D2>to</FONT>
<BR><FONT SIZE=3D2>> add an attribute to allow you to output =
coordinates in IMAGE</FONT>
<BR><FONT SIZE=3D2>> coordinates. That way you could build an =
imagemap on the fly via the</FONT>
<BR><FONT SIZE=3D2>> CGI. It could also be used to populate DHTML =
popup objects (e.g.</FONT>
<BR><FONT SIZE=3D2>> <A HREF=3D"http://www.bosrup.com/web/overlib/" =
TARGET=3D"_blank">http://www.bosrup.com/web/overlib/</A>).</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Would be happy to discuss further.</FONT>
</P>

<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>Mapserver-users mailing list</FONT>
<BR><FONT SIZE=3D2>Mapserver-users at lists.gis.umn.edu </FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users" =
TARGET=3D"_blank">http://lists.gis.umn.edu/mailman/listinfo/mapserver-us=
ers</A></FONT>
</P>

<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>Mapserver-users mailing list</FONT>
<BR><FONT SIZE=3D2>Mapserver-users at lists.gis.umn.edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users" =
TARGET=3D"_blank">http://lists.gis.umn.edu/mailman/listinfo/mapserver-us=
ers</A></FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C3FA34.1D74D90A--



More information about the MapServer-users mailing list