Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SamF2016source = new ol.source.Vector({
- format: new ol.format.WFS(),
- loader: function (extent, resolution, projection) {
- var url = 'https://atlas.brabant.nl/arcgis/services/fauna/MapServer/WFSServer?request=GetFeature&typeName=SamF2016&version=1.1.0&styles=default&SRSname=EPSG:3857&outputFormat=gml3';
- // Use fetch, more simple & modern instead of XMLHttpRequest
- fetch(url).then(function (response) {
- return response.text();
- }).then(function (text) {
- var features = SamF2016source.getFormat().readFeatures(text);
- // Add parsed features to vectorSource
- SamF2016source.addFeatures(features);
- }).catch(function (error) {
- console.log(error.message);
- })
- }
- });
- SamF2016 = new ol.layer.Vector({
- source: SamF2016source,
- setZIndex: 1005,
- title: 'SamF2016',
- visible: false,
- });
- Layer queryable="1">
- <Name>1</Name>
- <Title>
- <![CDATA[ SamF2013 ]]>
- </Title>
- <Abstract>
- <![CDATA[ ]]>
- </Abstract>
- <CRS>CRS:84</CRS>
- <CRS>EPSG:4326</CRS>
- <CRS>EPSG:28992</CRS>
- <EX_GeographicBoundingBox>
- <westBoundLongitude>4.211658</westBoundLongitude>
- <eastBoundLongitude>6.025627</eastBoundLongitude>
- <southBoundLatitude>51.244639</southBoundLatitude>
- <northBoundLatitude>51.815840</northBoundLatitude>
- </EX_GeographicBoundingBox>
- <BoundingBox CRS="CRS:84" minx="4.211658" miny="51.244639" maxx="6.025627" maxy="51.815840"/>
- <BoundingBox CRS="EPSG:4326" minx="51.244639" miny="4.211658" maxx="51.815840" maxy="6.025627"/>
- <BoundingBox CRS="EPSG:28992" minx="73913.494800" miny="362246.413600" maxx="198987.600000" maxy="425141.200000"/>
- <Style>
- <Name>default</Name>
- <Title>1</Title>
- <LegendURL width="130" height="928">
- <Format>image/png</Format>
- <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://atlas.brabant.nl/arcgis/services/fauna/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=1" xlink:type="simple"/>
- </LegendURL>
- </Style>
- </Layer>
Add Comment
Please, Sign In to add comment