I have a service and I tried to paint his layer on my map:


WFS = new ol.layer.Vector({
    source: new ol.source.Vector({
        format: new ol.format.GeoJSON(),
        url: 'http://www.ign.es/wfs-inspire/unidades-administrativas?REQUEST=GetFeature&SERVICE=WFS&VERSION=2.0.0&COUNT=1&srsName=EPSG:3857&TYPENAMES=au:AdministrativeBoundary'
        stroke: new ol.style.Stroke({
            color: 'rgba(0, 0, 255, 1.0)',
            width: 2

¿is it possible? I don't see the geometries in the map. I think the problem is "outputFormat", is not possible get "outputFormat=application/json"


is not possible get "outputFormat=application/json"

It is not possible in the service you list. The service GetCapabilities response tells you what output formats are available:


<ows:Parameter name="outputFormat">
        <ows:Value>text/xml; subtype=gml/3.2.1</ows:Value>
        <ows:Value>application/gml+xml; version=3.2</ows:Value>
        <ows:Value>text/xml; subtype=gml/3.1.1</ows:Value>
        <ows:Value>text/xml; subtype=gml/2.1.2</ows:Value>

and application/json is not available

Furthermore the service here appears to be a complex features WFS





and AFAIK OpenLayers can't handle complex features

  • 1
    is it possible paint the layer on the map? – AlexPK Jun 13 '19 at 14:16
  • It should be possible, since OpenLayers support GML formats 2, 3, and 3.2, but I couldn't get it working with this particular WFS service. – TomazicM Jun 16 '19 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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