AW: [UMN_MAPSERVER-USERS] imagemap

Gernot Katzlberger knozi at GMX.AT
Mon May 2 06:40:47 PDT 2005


I changed the data statement but nothing happened. It is still the same map
as before (without the ids). Can I define a column in the database which
will be taken by the imagemap for inserting the ids?

regards,
gernot



-----Ursprüngliche Nachricht-----
Von: Stéphane RIFF [mailto:stephane.riff at cerene.fr] 
Gesendet: Montag, 02. Mai 2005 15:25
An: Gernot Katzlberger
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: Re: [UMN_MAPSERVER-USERS] imagemap

I think that the data return by '%s' in imagemap format is the first 
filed of your datasource.

with a DATA pattern like this : DATA "geom from (select oid, geom from 
geom_table) as foo"
you will gt what you want

Gernot Katzlberger wrote:

>Hi list,
>I'm trying to get the imagemap function working. I can create an output and
>an imagemap but the ids to the single polygons are missing. How do I get
the
>ids into the href of the imagemap? The ids should come out of the database.
>
>html-source:
>now:
><area href="map.php?id=" title="" shape="poly" coords=" 616,165, 616,167,
>613,168, 612,169, 616,165" />
><area href="/map.php?id=" title="" shape="poly" coords=", 607,164, 609,167,
>608,168, 608,169, 612,173, 607,164" />
>
>should be:
><area href="map.php?id=state01" title=" state01" shape="poly" coords="
>616,165, 612,169, 616,165" />
><area href="/map.php?id=state02" title=" state02" shape="poly" coords=",
>607,164, 612,173, 607,164" />
>
>
>I have a mapfile with the outputformat and one layer defined:
>
>...
>
>OUTPUTFORMAT
>  NAME imagemap
>  DRIVER imagemap
>  MIMETYPE text/html
>  FORMATOPTION "POLYHREF=/verifier/map.php?state=%s"
>  FORMATOPTION "SYMBOLHREF=#"
>  FORMATOPTION "MAPNAME=image_map"
>  FORMATOPTION "TITLE=image_map"
>  FORMATOPTION "POLYMOUSEOUT=return nd();"
>  FORMATOPTION "POLYMOUSEOVER=return overlib('%s');"
>END
>
>LAYER
>    CONNECTION "user=user password=pwd dbname=db host=localhost"
>    CONNECTIONTYPE POSTGIS
>    DATA "the_geom from gd_poly_002"
>    NAME "see01"
>    STATUS ON
>    TYPE POLYGON
>    UNITS METERS
>
>    CLASS
>      NAME "class0"
>      STYLE
>          COLOR 189 215 231
>       SYMBOL 0
>      END
>    END
>  END
>...
>
>Thanks,
>Gernot
>
>
>  
>



More information about the MapServer-users mailing list