No subject
Mon Oct 7 05:54:23 PDT 2024
-the TEMPLATE "countytemplate.html" contains: =20
<area shape=3D"polygon" coords=3D"[shpxy precision=3D0 proj=3Dimage]"
title=3D"[NAME]" href=3D"testpage.cfm?counID=3D[COUNTY_FIP]" =
alt=3D"[NAME]">
-the HEADER "countyimagemapheader.html" contains:
<!-- the image map -->
<map id=3D"mymap" name=3D"mymap">
-the FOOTER "countyimagemapfooter.html" contains:
</map>
I call the imagemap with the URL:
http://myurl/cgi-bin/mapserv.exe?map=3Dc:/mypath/maps/testmap/newimagemap=
t
est.map&qlayer=3Dcounty&mode=3Dnquery&searchmap=3Dtrue
Here is the resulting imagemap with all but two of the polygon elements
snipped out for brevity:
<map id=3D"mymap" name=3D"mymap">
<area shape=3D"polygon" coords=3D"164 50,170 50,170 39,171 38,171 30,173
30,174 31,176 31,176 30,178 30,180 31,182 33,183 33,183 40,184 44,185
45,185 51,186 51,187 54,187 60,186 60,186 61,187 61,187 63,188 63,188
65,190 65,190 66,192 66,192 67,195 67,195 68,196 68,196 86,185 86,185
85,167 85,167 75,163 75,163 66,172 66,172 55,171 55,171 56,168 56,168
57,167 57,167 56,165 56,165 55,164 55,164 53,164 50" title=3D"Lake of =
the
Woods" href=3D"testpage.cfm?counID=3D077" alt=3D"Lake of the =
Woods"><area
shape=3D"polygon" coords=3D"95 51,95 50,95 49,94 49,94 48,95 48,95 =
47,105
47,106 48,125 48,125 52,124 53,124 64,125 64,125 66,124 67,124 74,120
74,119 73,101 73,100 72,96 72,96 71,96 70,96 69,96 68,97 68,97 67,98
67,98 65,99 65,99 64,98 64,98 62,97 62,97 59,96 59,96 58,97 58,97 57,96
57,96 54,95 54,95 53,96 53,96 52,95 52,95 51" title=3D"Kittson"
href=3D"testpage.cfm?counID=3D069" alt=3D"Kittson">
</map>
Essentially, I am just doing a query (nquery), using the query templates
(header, template, footer) to build an imagemap instead of a html table.
You can see in the TEMPLATE, that I am using [NAME] and [COUNTY_FIP],
which are field names in my shapefile dbf to put the values in to the
imagemap elements. =20
In addition to the imagemap that is generated, you will want to hit
mapserver to generate the map image associated with your imagemap. =20
I plan to write this up as a HowTo or FAQ as soon as I get a little
time. =20
David.
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Bob Basques
Sent: Thursday, December 22, 2005 2:25 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] scrolling over a point to view
attributes
I should have probably added that I used the CGI version of MapServer=20
since I was most comfortable with that approach.
bobb
Bob Basques wrote:
>Jennifer,
>
>I originally put together our first version of this capability for our=20
>internal developers here at the City.
>
>This is how I got started, it's not the only way:=20
>http://www.walterzorn.com/tooltip/tooltip_e.htm
>
>Once you have a Webpage working with aboveLIB, then the next step is to
>make a TEMPLATE that MapServer can use for Attribute Output from the=20
>SHP files. to generate Imagemap Just read up on:
>http://mapserver.gis.umn.edu/docs/reference/templatereference
>
>I can't seem to find too much on the Mapserver pages about ImageMap=20
>generation, (is there something obvious some place that I'm missing?).=20
>I'm try to find an example of a IMAGEMAP from MapServer Template, but=20
>not find anything specfically like this.
>
>Anyone else know of an example that generate straight from the=20
>MapServer Template (Using SHPXY?)
>
>bobb
>
>
>
>Jennifer A Bennett wrote:
>
> =20
>
>>This is a multipart message in MIME format.
>>--=3D_alternative 00628F4B862570DF_=3D
>>Content-Type: text/plain; charset=3D"US-ASCII"
>>
>>Thank You for your response Bobb,
>>I was wondering if you could flesh out your answer a little for me; I
>>am
>>still kind of new to mapserver and web design and don't know
javascript=20
>>really well. Do you know of any documentation that could explain the=20
>>process of creating an IMAGEMAP and displaying necessary attribute
fields=20
>>when scrolling over a point? Can you direct me to your website, so I
can=20
>>see an example of a mapserver imagemap? Do you know of any other
websites=20
>>that use mapserver generated imagemaps?
>>
>>Thanks,
>>Jennifer
>>--=3D_alternative 00628F4B862570DF_=3D
>>Content-Type: text/html; charset=3D"US-ASCII"
>>
>>
>><br><font size=3D2 face=3D"sans-serif">Thank You for your response=20
>>Bobb,</font> <br><font size=3D2 face=3D"sans-serif">I was wondering if =
you
>>could flesh out your answer a little for me; I am still kind of=20
>>new to mapserver and web design and don't know javascript really well.
>>Do you know of any documentation that could explain the process of=20
>>creating an IMAGEMAP and displaying necessary attribute fields when=20
>>scrolling over a point? Can you direct me to your website, so I=20
>>can see an example of a mapserver imagemap? Do you know of any=20
>>other websites that use mapserver generated imagemaps?</font> <br>=20
>><br><font size=3D2 face=3D"sans-serif">Thanks,</font> <br><font =
size=3D2=20
>>face=3D"sans-serif">Jennifer </font> --=3D_alternative=20
>>00628F4B862570DF_=3D--
>>
>>=20
>>
>> =20
>>
>
> =20
>
More information about the MapServer-users
mailing list