[mapserver-users] Different image for each point

Stephen Woodbridge woodbri at swoodbridge.com
Thu Aug 23 11:21:19 PDT 2012


On 8/23/2012 1:31 PM, Ian Walberg wrote:
> Hello folks,
>
> We need to be able to display a different small image from each point in
> a data set, say along the lines of a thumbnail.
>
>  From what I can see this could be done my defining each image as a
> symbol and then referencing that.
>
> However what we would like to be able to do is get the image file name
> as part of the query and display the image based on that.
>
> Is this possible?

I have done this by creating a column with the filename in it. You can 
then use the column as a symbol name or symbol path or as attribute 
column in wfs to OpenLayers that can then be used to point to a 
thumbnail directory of fullsize directory of images.

LAYER
   NAME "images"
   TYPE POINT
   DATA "myImagePoints"
   CLASS
     STYLE
       SYMBOL ("/path/to/thumbs/"+'[FILENAME]')
     END
   END
END

Where column FILENAME has something like 'myimage.png' and to do this 
you are probably limited to gif, jpg, and png images only. svg will NOT 
work.

-Steve W



More information about the mapserver-users mailing list