[OpenLayers-Dev] Doubts regrading shapefies

Alexandre Dubé adube at mapgears.com
Mon Aug 13 07:02:51 PDT 2012


Hi Hari,

   This kind of question is more suitable for the 'users' mailing list.

   Using OpenLayers.Layer.MapServer isn't recommended.  You should use 
OpenLayers.Layer.WMS instead.  Here's some examples :
     http://openlayers.org/dev/examples/wms.html
     http://openlayers.org/dev/examples/layerswitcher.html
     http://openlayers.org/dev/examples/controls.html

   The API documentation contains more details :
http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Layer/WMS-js.html

   Your fixed base layer should keep its 'isBaseLayer' property (option) 
to true, and you should set it to false for the others.

HTH,

Alexandre


On 12-08-13 02:13 AM, Harikumar Muralee wrote:
> Hi,
>
> Iam a beginner in OpenLayers.All I want is to display some shapefiles on web
> as a Asp.net web application.
> Currently what I am doing is created a "test1.map" file and then in
> javascript am using
>
> var shapes = new OpenLayers.Layer.MapServer("TestMap",
>
> "http://localhost/cgi-bin/mapserv.exe?mode=map&map=e:/ms4w/apps/MapFiles/
> test1.map&layer=layername1&layer= layername2&layer= layername3") ;
>
> map.addLayer(shapes);
>
> Is It the right way?.One layer is fixed as a base layer and top of I need to
> add another layers which can be any number ranging from 2 to 30.Please guide
> me through the correct way.
>
> Thanks in Advance
> Hari
>
>
>
> THIS E-MAIL IS CONFIDENTIAL and intended solely for the use of the individual to whom
> it is addressed. If you are not the addressee, do not take any action on the contents
> and any disclosure, reproduction, copying, distribution, or other dissemination or
> use of this communication is strictly prohibited. WARNING: Computer viruses can be
> transmitted via email. The recipient should check this email and any attachments for
> the presence of viruses. ii-2 Technologies accepts no liability for any damage caused
> by any virus transmitted by this email.
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev


-- 
Alexandre Dubé
Mapgears
www.mapgears.com



More information about the Dev mailing list