[mapserver-users] Apply style to geojson based on property in geojson data

Richard Greenwood richard.greenwood at gmail.com
Tue Oct 24 17:58:38 PDT 2017


I haven't used geojson as a data source, but maybe if you shared a small
example of your map file and the data it would help.

On Tue, Oct 24, 2017 at 8:43 AM, Tuffa <chris at wherryengineering.co.uk>
wrote:

> Hello!
>
> I am rendering a map of African countries from a single geojson file.  Each
> country is represented as a feature with geometry.  I've added a custom
> value to each feature's properties, that I would like to influence the
> style
> selected by MapServer to render the country outline, however I cannot see
> how it is possible to configure the layer so that MapServer uses the new
> 'value' property as the input for the style expressions that I have
> created...
>
> Doing the same job, using a database as the datasource is easy!  I simply
> craft a SQL 'select' statement for the mapfile's Layer 'DATA' to retrieve
> the desired value and it becomes available to MapServer using the
> '[value_name]' syntax in style expressions.
>
> This same approach does not appear to work for GeoJSON.  MapServer states
> that the extent of support for the 'DATA' is driver-dependant, which is
> fair
> enough; examination of the geoJson driver doc in the GDAL doc's does not
> help me though.
>
> Can anyone help?
>
> Regards
> Chris
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-
> f4226646.html
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users




-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20171024/31f3ef0c/attachment.html>


More information about the mapserver-users mailing list