[OpenLayers-Users] Layer not shown
Toni Ramiro
anrapas at gmail.com
Thu Nov 12 07:40:48 EST 2009
I'm new to this and I've encountered a problem.
I defined the following code to load one layer with OpenLayers
var opciones = {
projection:"EPSG:4230",
maxExtent:new OpenLayers.Bounds(-3,37,0,39)
};
map = new OpenLayers.Map('map', opciones);
var sigpac_layer = new OpenLayers.Layer.WMS(
"PNOA",
"http://www.idee.es/wms/PNOA/PNOA",
{
layers:"pnoa",
version:"1.1.1",
format:"image/png"
},
{
projection:"EPSG:4230",
units:"m"
});
map.addLayer(sigpac_layer);
var mapserver_layer = new OpenLayers.Layer.WMS(
'Murcia',
'http://localhost/cgi-bin/mapserv.exe',
{
map:'D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map',
layers:'arquetas_otros_planifrega',
transparent:'true'
},
{
projection:"EPSG:4326",
units:"m"
});
map.addLayer(mapserver_layer);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MouseToolbar());
map.addControl(new OpenLayers.Control.MousePosition());
map.zoomToMaxExtent();
My MapServer project is as follows:
MAP
NAME Murcia
SIZE 800 600
UNITS METERS
EXTENT 544061.905938 4135608.106250 720849.906562 4288074.143750
CONFIG PROJ_LIB "D:\Desarrollo\MapServer\proj\nad\"
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
IMAGECOLOR 192 192 192
IMAGEQUALITY 95
IMAGETYPE png
OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/png'
EXTENSION 'png'
END
LEGEND
IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
END
WEB
IMAGEPATH 'C:/Inetpub/tmp/'
IMAGEURL '/tmp/'
METADATA
'wms_title' 'Murcia'
'wms_onlineresource' '
http://localhost/cgi-bin/mapserv.exe?map=D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map&
'
'wms_srs' 'EPSG:4326'
END
END
LAYER
NAME 'arquetas_otros_planifrega'
TYPE POINT
DATA
'D:\Desarrollo\MapServer\datos\CapasDePrueba\arquetas_otros_planifrega.shp'
METADATA
'wms_title' 'arquetas_otros_planifrega'
END
STATUS DEFAULT
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
NAME 'arquetas_otros_planifrega'
STYLE
SYMBOL 'CIRCLE'
SIZE 2
OUTLINECOLOR 0 0 0
COLOR 31 2 3
END
END
END
SYMBOL
NAME 'CIRCLE'
TYPE ellipse
FILLED true
POINTS
1 1
END
END
END
The result is that the OpenLayers 'Murcia' layer shows no data, and if left
alone in the project only shows a gray background.
I've tried the same using QGis WMS client to Mapserver and shows the data.
¿Do anybody knows how to solve the problem?
Thanks a lot.
--
Saludos,
Toni Ramiro
<anrapas at gmail.com>
<aramiro151r at cv.gva.es>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/b4879ffb/attachment.html
More information about the Users
mailing list