[mapserver-users] Connecting to remote MapServer WMS/WMF layers using PHP/OpenLayers

Eric Jarvies 7 at ericjarvies.com
Fri Jan 21 16:12:47 PST 2011


Hello,

I am attempting to connect to a remote MapServer( http://www.catastroloscabos.gob.mx/cgi-bin/mapserv.fcgi?map=/home/juribe/webcatastro/catastro.map& ) and retrieve the respective WMS layers.  However, I am unable to do so for some reason.

http://loscabosproperties.mx/geoserver/wms.png

I get the result in XML format, and the map is not displayed.

The remote MapServer server is located at:
http://www.catastroloscabos.gob.mx/cgi-bin/mapserv.fcgi?map=/home/juribe/webcatastro/catastro.map&

In my PHP/OpenLayers doc/code, i have this:

        var wmsUrl2 = "http://www.catastroloscabos.gob.mx/cgi-bin/mapserv.fcgi";
        var wms2 = new OpenLayers.Layer.WMS("WMS2",
            wmsUrl2,
            { map: '/home/juribe/webcatastro/catastro.map',
            //layers: 'p',
            //map_imagetype: 'jpg'
            SERVICE: 'WMS',
            VERSION: '1.1.1',
            REQUEST: 'GetCapabilities'
            },
            {singleTile: true, isBaseLayer: false});
        map.addLayer(wms2);

Any help would be appreciated.  Thanks!




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110121/748f61e1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ericsSignature.png
Type: image/png
Size: 5863 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110121/748f61e1/attachment.png>


More information about the MapServer-users mailing list