kartoza-geek
kartoza-geek

Reputation: 349

Styling raster and vector layers using remote sld in mapserver

I have a mapfile and a remote sld that I want to use to style my vector layer. But each time I put a request the map is returned without a style.
My mapfile is as follows:

MAP
NAME "MAPSERVER QUICKSTART"
EXTENT -137 29 -53 88
UNITS DD
SHAPEPATH "/data/world"
SIZE 800 600

IMAGETYPE PNG24

PROJECTION
 "init=epsg:4326"
END

WEB
 IMAGEPATH '/tmp/'
IMAGEURL '/tmp/'
TEMPPATH '/tmp/'

METADATA
  ows_enable_request "*"
END

END

LAYER
NAME "admin"
STATUS ON
TYPE POLYGON
DATA "countries"
CLASS
  STYLE
    COLOR 246 241 223
    OUTLINECOLOR 0 0 0
  END
END

END

END

I am using the following request to access the map. Get map request

What is it that I could be doing wrong

Upvotes: 1

Views: 418

Answers (1)

Teng Ma
Teng Ma

Reputation: 353

Just a quick observation. When i open you SLD file, i see the name is "country_bounds", and in the layer the name is "admin". In order to apply the SLD to the layer, you have to make sure the name of the actual layer name is equal to the feature layer name in SLD. Hope that is helpful.

Upvotes: 1

Related Questions