[OpenLayers-Dev] Shape files in openlayers

Guillaume Sueur no-reply at neogeo-online.net
Wed Mar 11 12:32:58 EDT 2009


Hi,

Before testing the mapfile in OpenLayers, you should check it on the
server-side using shp2img and see if a correct output is generated. As
long that it isn't, no need to aks OpenLayers to display it.

Regards,

Guillaume

Jean-Daniel JDG. GONON a écrit :
> Hi all,
> 
>  
> 
> I am a newer on using OpenLayers :
> 
> I want to view data in MapServer (version 2.3.1) using OpenLayers
> (version 2.7).
> 
> In my OpenLayers JS file, I call my mapfile (in attachment) with
> MapServer like this :
> 
> */var layer1= new OpenLayers.Layer.MapServer( "Audincourt SHP mapserver",/*
> 
> */"http://localhost/cgi-bin/mapserv.exe", { layers: '', map:
> 'C:/ms4w/geosphere/client1/Carte16_IA.map'}, {singleTile: true} );/*
> 
> */map.addLayer(layer1);/*
> 
>  
> 
> But in the firefox window, only RASTER layer (with .PNG file in DATA) is
> shown. Others layers aren’t displayed.
> 
>  
> 
> With this URL in firefox :
> http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/geosphere/client1/Carte16_IA.map&mode=map
> <http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/geosphere/client1/Carte16_IA.map&mode=map>
> => I see the map I want.
> 
>  
> 
> Question : why layers (with shape and .ecw files in DATA) are not
> displayed in my map ?
> 
>  
> 
> Thank you for answers
> 
> Jean-Daniel
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev



More information about the Dev mailing list