salut tous le monde;
je sais pas si je suis dans la bonne section, voila je développe une plate forme sur mapserver (ms4w) je désire avoir une carte contenant mes point d'interet. pour le points je les ai généré avec QGIS puis j'ai l'export a mapserver. quand je lance l'URL:
lamiapc/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/oranmap/mapfile/mapfile.map
j'ai en sortie une page blanche, je sais pas ou est le problème.
voici un extrait du mapfile.map:
Code:
MAP NAME "QGIS-MAP" # Map image size SIZE 800 800 UNITS dd EXTENT -1.972955 34.946392 1.483896 36.505612 FONTSET 'C:/ms4w/Apache/htdocs/fonts.txt' SYMBOLSET 'C:/ms4w/Apache/htdocs/symbols.txt' PROJECTION 'init=epsg:4326' END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH 'C:/ms4w/tmp/ms_tmp/' # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL '/tmp/' # WMS server settings METADATA 'wms_title' 'Point_interet' 'wms_onlineresource' 'http://lamiaPC:80/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/oranmap/mapfile/mapfile.map' 'wms_srs' 'EPSG:4326' 'wms_enable_request' '*' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation TEMPLATE 'C:/Users/HOME/Desktop/index_map.html' END LAYER NAME 'lieu_interet' TYPE POINT DUMP true TEMPLATE "C:/Users/HOME/Desktop/index_map.html" EXTENT -1.972955 34.946392 1.483896 36.505612 CONNECTIONTYPE postgis CONNECTION "dbname='map_oran' host=localhost port=5432 user='postgres' password='*****' sslmode=disable" DATA 'latlong FROM "lieu_interet" USING UNIQUE lieuid USING srid=4326' METADATA 'wms_title' 'lieu_interet' END STATUS ON TRANSPARENCY 100 PROJECTION 'init=epsg:4326' END CLASSITEM 'categorie' CLASS NAME "categorie = bibliotheque " EXPRESSION "bibliotheque " STYLE SYMBOL "sym_biblio" SIZE 16.0 OUTLINECOLOR 0 0 0 COLOR 224 236 247 END END CLASS NAME "categorie = centre_commercial" EXPRESSION "centre_commercial" STYLE SYMBOL "sym_centrecommerce" SIZE 16.0 OUTLINECOLOR 0 0 0 COLOR 213 229 244 END
et mon HTML:
Code:
<!-- MapServer Template --> <html> <head> <title>Une carte simple avec OpenLayers</title> <script src="http://www.openlayers.org/api/2.12/OpenLayers.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3&sensor=true®ion=DZ&key=**************"></script> <script type="text/javascript"> function init() { // Objet map: var map = new OpenLayers.Map('map', {projection:new OpenLayers.Projection('EPSG:4326')}); // Couche GoogleMaps var gmap = new OpenLayers.Layer.Google( "Google" , {type: google.maps.MapTypeId.NORMAL}, {isBaseLayer:true} ); map.addLayer(gmap); // Notre couche en WMS créée par MapServer var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://lamiaPC:80/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/oranmap/mapfile/mapfile.map", {layers: 'point_interet', transparent:"true"}); map.addLayer(wms); // Etendue initiale de la carte map.zoomToExtent(new OpenLayers.Bounds([-1.972955, 1.483896, 34.946392, 36.505612])); // Ajout du sélectionneur de couches map.addControl(new OpenLayers.Control.LayerSwitcher()); } </script> </head> <body onload="init()"> <div style="width:100%; height:100%" id="map"></div> </body> </html>
qlq'un pourra m'aider s'il vous plait?