我正在使用mapserver和openlayers,当我绘制WMS图层时遇到问题。我得到了这一层的马赛克,我不知道为什么。有人可以帮帮我吗?我的HTML代码是:
map = new OpenLayers.Map('map', {
controls: []
});
wms = new OpenLayers.Layer.WMS('Municipios',
"path of the map", {
layers: "MUNICIPIO"
}, {
isBaseLayer: "true",
visibility: "true"
});
map.addLayer(wms);
map.zoomToMaxExtent();
我的mapfile是:
MAP
NAME "mapa2"
SIZE 1400 900
IMAGETYPE png
IMAGECOLOR 196 240 255
EXTENT -16.0006 27.7281 -13.2323 29.3318
SHAPEPATH "datos"
FONTSET "path"
WEB
TEMPLATE "/mapserver/ms4w/apps/prueba/index.html"
IMAGEPATH "/mapserver/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"WMS_TITLE" "mapa2"
"WMS_SRS" "EPSG:4258"
END
END
LAYER
NAME Foto1
TILEINDEX indice.shp
TILEITEM location
DATA Foto1
TYPE RASTER
STATUS on
OFFSITE 252 252 252
METADATA
WMS_NAME "Foto1"
WMS_FORMAT "IMAGE/PNG"
WMS_SRS "EPSG:4258"
END
END
LAYER
NAME "MUNICIPIO"
STATUS ON
DATA MUNICIPIO
LABELITEM "NOM_MUNICI"
TYPE POLYGON
CLASS
STYLE
COLOR 254 226 197
OUTLINECOLOR 255 0 0
END
LABEL
SIZE SMALL
COLOR 0 0 0
END
END
END
我想放置栅格图层,但我不能。