Skip to main content
added question in comment
Source Link
nmtoken
  • 13.6k
  • 5
  • 38
  • 89

The map parameter is part of the service endpoint URL, so the syntax would be like:

layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
   "http://localhost/qgis/qgis_mapserv.fcgi.exe?map=D:/OSGeo4W/apps/qgis/bin/MyLondon.qgs&",
    {layers: 'basic'}
);

To convert to a more friendly endpoint URL like http://localhost/qgis/qgis_mapserv.fcgi.exe? add a SetEnvIf parameter to your Apache config, something like:

SetEnvIf Request_URI "/qgis/qgis_mapserv.fcgi.exe" MS_MAPFILE=D:/OSGeo4W/apps/qgis/bin/MyLondon.qgs

The map parameter is part of the service endpoint URL, so the syntax would be like:

layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
   "http://localhost/qgis/qgis_mapserv.fcgi.exe?map=D:/OSGeo4W/apps/qgis/bin/MyLondon.qgs&",
    {layers: 'basic'}
);

The map parameter is part of the service endpoint URL, so the syntax would be like:

layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
   "http://localhost/qgis/qgis_mapserv.fcgi.exe?map=D:/OSGeo4W/apps/qgis/bin/MyLondon.qgs&",
    {layers: 'basic'}
);

To convert to a more friendly endpoint URL like http://localhost/qgis/qgis_mapserv.fcgi.exe? add a SetEnvIf parameter to your Apache config, something like:

SetEnvIf Request_URI "/qgis/qgis_mapserv.fcgi.exe" MS_MAPFILE=D:/OSGeo4W/apps/qgis/bin/MyLondon.qgs
Source Link
nmtoken
  • 13.6k
  • 5
  • 38
  • 89

The map parameter is part of the service endpoint URL, so the syntax would be like:

layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
   "http://localhost/qgis/qgis_mapserv.fcgi.exe?map=D:/OSGeo4W/apps/qgis/bin/MyLondon.qgs&",
    {layers: 'basic'}
);