#1 Wed 10 March 2010 11:23
- Geomatikman
- Juste Inscrit !
- Date d'inscription: 27 Jul 2009
- Messages: 6
OpenLayer/Mapserver/wms
Bonjour,
je voudrai afficher une carte qui a de sys de projection: RGF93_Lambert_93 et sys : géo GCS_RGF_1993. Je suis encore débutant et j'arrive pas encore à l'afficher sous mapserver/openlayer
Voici mes code :
MAPFILE:
Code:
MAP NAME "mywms" IMAGETYPE PNG STATUS ON EXTENT 348668.554800 6612329.853000 439554.810600 6698167.309200 SIZE 1000 600 UNITS METERS SHAPEPATH "C:/ms4w/apps/SHP" IMAGECOLOR 205 205 155 TRANSPARENT on WEB TEMPLATE "C:/ms4w/Apache/htdocs/WorkShop1.html" IMAGEPATH "C:/ms4w/Apache/htdocs/tmp/" IMAGEURL '/ms_tmp/' METADATA ### WMS "wms_title" "WMS Demo Server" "wms_onlineresource" "localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/SHP/fifth.map&" "wms_srs" "epsg:2154" "wms_format" "image/png" ### WFS "wfs_title" "WFS Demo Server" "wfs_onlineresource" "localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/SHP/fifth.map&?" ## Recommended "wfs_srs" "epsg:2154" ## Recommended END END PROJECTION "init=epsg:2154" END OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" TRANSPARENT off END LAYER NAME RIVIERE STATUS ON METADATA ### WMS "wms_title" "RIVIERE" ### WFS "wfs_title" "RIVIERE" "gml_featureid" "NAME" "gml_include_items" "all" END PROJECTION "init=epsg:2154" END DUMP TRUE TYPE POLYGON STATUS ON DATA RIVIERE CLASS COLOR 217 217 217 OUTLINECOLOR 0 0 0 END END###### END OF Layer ###### END ###### END OF Map File ######
et voila mon script;
Code:
function init(){
var map = new OpenLayers.Map('map');
var wms=new OpenLayers.Layer.Mapserver("TEST","http://localhost/cgi-bin/mapserv.exe",{map:'C:/ms4w/apps/SHP/fifth.map'});
var OverLayer = new OpenLayers.Layer.WMS("OverLayers", "http://localhost/cgi-bin/mapserv.exe",
{layers: ['RIVIERE'], format: "image/png"},
{singleTile: true, minResolution: 1000});
map.addLayer(wms);
map.addLayers([overlay]);
map.setBaseLayer(wms);
map.zoomToMaxExtent();
Ou se trouve elle l'erreur???Y a t-il une solution complète??
Hors ligne