• is it be possible to color code a GeoJSON file based on field values?, different colors for different attribute values, for instance if field X=b color = blue if field X=c color = red… something like that

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bozdoz

    (@bozdoz)

    Not currently, no. The only thing you can do with attributes is use them in popups:

    [leaflet-geojson]Here's X: {X}[/leaflet-geojson]

    Plugin Contributor hupe13

    (@hupe13)

    I’m using such as:

    [leaflet-geojson color="#ffa500" src="/path/to/my/file.json"]Some Text[/leaflet-geojson]

    If you are using any php plugin or php code you can generate the color based on your conditions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change Geojson file color based on field values’ is closed to new replies.