[mapserver-users] Color the world, but not my country

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Dec 14 05:03:51 PST 2015


Hi Wim,

I face this issue quite often, and I often use the IMAGECOLOR parameter 
setting in the mapfile for this.  It's a nice trick to show blue water, 
for example, all around your features.  Here is an example:

   MAP
     IMAGECOLOR 0 0 255
     ...
     LAYER
       ...
     END #layer
   END #mapfile

-jeff

-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2015-12-11 3:37 PM, Wim Vanbelle wrote:
> Dear,
>
> I have a country shapefile and I would like to style everything, besides
> the one feature in the polygon.
>
> This is a shapefile layer, so I'm wondering on how I could possibly
> improve this:
>
>
>          LAYER
>                  NAME "gadm"
>                  TYPE POLYGON
> TRANSPARENCY 70
>                  DATA "gadm28.shp"
>                  STATUS default
> DEBUG 4
>
>                  CLASS
> EXPRESSION ("[ISO]" != "NLD")
>
>                          style
>                                  color "#000000"
>                          end
>
>                  END
>          END
>
> Basically, I would like to only use the data from the netherlands (NLD),
> because it's a lot less data, and color everything else, besides the one
> feature that it has.
>
> My above (working example) is taking the entire world and only filtering
> out what I want to see.
>
> The goal is to visually create a map of a single country and block out
> all the rest ;-). It's rendered as a tile layer. (gmaps)
>
> Thanks in advance for your feedback.
>
> Best regards,
> Wim
>



More information about the mapserver-users mailing list