0

I would like to to use the WMS url from https://www.alegrodialog.de/profiles/markaspot/modules/mark_a_spot/modules/markaspot_wms/markaspot_wms.js which is about the ALEGrO DC power line.

var alegro = L.tileLayer.wms("https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion", {
  layers: 'zebralog',
  service: 'wms',
  version: '1.1.1',
  format: 'image/png',
  srs:"EPSG:3857",
  attribution: "Alegro Trasse",
  transparent: true
});

Shouldn't it simply be https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion ? Or more elaborate:

wms:https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion?FORMAT=null&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=zebralog&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}

But I've tried with QGIS and JOSM and the URL is dead.

Have I done a mistake or is the WMS endpoint really blocking me?

1
  • 2
    the WMS service is inactive (request for getCapabilities returns error file with 'WMS request not activated')
    – geozelot
    Commented Apr 6, 2018 at 11:56

2 Answers 2

1

As noted by @thingumabob, the service with end-point of https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion? is not currently activated.

that is a request like:

https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion?service=WMS&request=GetCapabilities&

returns:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
    <ServiceException>
    msWMSGetCapabilities(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings.
    </ServiceException>
</ServiceExceptionReport>

with an HTTP 200 status code

If it was blocking you might expect no WMS exception response, and a different HTTP status code like 401 or 403

Have I done a mistake or is the WMS endpoint really blocking me?

It appears that it's neither, it's just that the service is currently not available.

Suggestion would be to contact the map service provider and ask them if the service is live and public.


It's possible that the service is functional but misconfigured, and you could try a GetMap request, so looking at your elaboration:

wms:https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion?FORMAT=null&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=zebralog&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}

FORMAT=null& is wrong, it must be an image format advertised in the GetCapabilites response.

SRS={proj}& must be a CRS advertised in the GetCapabilites response.

LAYERS=zebralog& must be a layer advertised in the GetCapabilites response.

You might also want to add parameters for background colour like BGCOLOR=0xFFFFFF&, transparency like TRANSPARENT=TRUE&, and type of exception report like EXCEPTIONS=XML&

The exception report is WMS version 1.3.0, so the server software supports it, and you could try using VERSION=1.3.0&, CRS={proj}&, and swap the order of the coordinates in the BBOX.

The two obvious problems are that (i) without a GetCapabilities response, you don't know what the parameter values are that you can call, and (ii) without a GetCapabilities response you can't see if the service uses a different URL to handle the GetMap requests.

2
1
var alegro =  L.tileLayer.wms("https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion?SERVICE=wms?", {
        layers: 'zebralog',
        service: 'wms',
        version: '1.1.1',
        format: 'image/png',
        srs: "EPSG:3857",
        attribution: "Alegro Trasse",
        transparent: true
    });

That works for me. Service address should be: " https://map-proxy.zebralog.de/maps.zebralog.de/cgi-bin/maps-amprion?SERVICE=wms? "

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.