[mapserver-users] How to draw a specific image per point element?
Steve Lime
Steve.Lime at dnr.state.mn.us
Fri Jan 16 10:39:19 PST 2009
You could bind the symbol to the photo_path item:
CLASS
STYLE
SYMBOL [photo_path]
END
END
Assuming the file pointed to by photo path is usable by MapServer as a marker (e.g. a gif or png) then
this might work nicely. You wouldn't need the various classes in this scenario.
Steve
>>> On 1/10/2009 at 2:09 AM, in message <496857C3.7020404 at yahoo.it>, Ludovico
Bianchini <metlud at yahoo.it> wrote:
> - Windows Vista Home Premium
> - Postgres 8.1
> - jvm 1.6.0
> - tomcat 5.5
> - struts2
> - ms4w 2.3.0 (mapscript.jar, mapscript.dll, all other dlls taken from this
> pack)
> - postgresql-8.2-505.jdbc4.jar
>
> Hi all,
> I have a database table of this type:
> TB_POINT (id NUMBER,
> geo GEOMETRY,
> title VARCHAR,
> icon VARCHAR,
> photo_path VARCHAR)
>
> and a mapfile's layer as:
> LAYER
> NAME "tb_point"
> STATUS off
> TYPE POINT
> TRANSFORM true
> POSTLABELCACHE true
> CONNECTION "user=xxxxx password=xxxxx dbname=xxxxx host=xxxxx port=xxxxx"
> CONNECTIONTYPE postgis
> DATA "geo from xxxxx.tb_point"
> MAXSCALE 50000
> CLASSITEM "icon"
>
> CLASS
> EXPRESSION "1"
> STYLE
> BACKGROUNDCOLOR 255 255 255
> COLOR 0 0 0
> SYMBOL "a"
> MAXSIZE 10
> END
> END
>
> CLASS
> EXPRESSION "2"
> STYLE
> BACKGROUNDCOLOR 255 255 255
> COLOR 0 0 0
> SYMBOL "b"
> MAXSIZE 10
> END
> END
>
> END
>
> Based on value of field "icon" mapserver draw symbol "a" or symbol "b".
> What I am trying to do is to draw, based on value on field "photo_path",
> an image saved in file system.
> I'll appreciate very much any suggestions, ideas or links to tutorials
> and related documentation.
>
> Thanks in advance
> Ludovico
>
> Chiacchiera con i tuoi amici in tempo reale!
> http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list