Guest User

Untitled

a guest
May 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. SamF2016source = new ol.source.Vector({
  2. format: new ol.format.WFS(),
  3. loader: function (extent, resolution, projection) {
  4. 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';
  5. // Use fetch, more simple & modern instead of XMLHttpRequest
  6. fetch(url).then(function (response) {
  7. return response.text();
  8. }).then(function (text) {
  9. var features = SamF2016source.getFormat().readFeatures(text);
  10. // Add parsed features to vectorSource
  11. SamF2016source.addFeatures(features);
  12. }).catch(function (error) {
  13. console.log(error.message);
  14. })
  15. }
  16. });
  17.  
  18. SamF2016 = new ol.layer.Vector({
  19. source: SamF2016source,
  20. setZIndex: 1005,
  21. title: 'SamF2016',
  22. visible: false,
  23. });
  24.  
  25. Layer queryable="1">
  26. <Name>1</Name>
  27. <Title>
  28. <![CDATA[ SamF2013 ]]>
  29. </Title>
  30. <Abstract>
  31. <![CDATA[ ]]>
  32. </Abstract>
  33. <CRS>CRS:84</CRS>
  34. <CRS>EPSG:4326</CRS>
  35. <CRS>EPSG:28992</CRS>
  36. <EX_GeographicBoundingBox>
  37. <westBoundLongitude>4.211658</westBoundLongitude>
  38. <eastBoundLongitude>6.025627</eastBoundLongitude>
  39. <southBoundLatitude>51.244639</southBoundLatitude>
  40. <northBoundLatitude>51.815840</northBoundLatitude>
  41. </EX_GeographicBoundingBox>
  42. <BoundingBox CRS="CRS:84" minx="4.211658" miny="51.244639" maxx="6.025627" maxy="51.815840"/>
  43. <BoundingBox CRS="EPSG:4326" minx="51.244639" miny="4.211658" maxx="51.815840" maxy="6.025627"/>
  44. <BoundingBox CRS="EPSG:28992" minx="73913.494800" miny="362246.413600" maxx="198987.600000" maxy="425141.200000"/>
  45. <Style>
  46. <Name>default</Name>
  47. <Title>1</Title>
  48. <LegendURL width="130" height="928">
  49. <Format>image/png</Format>
  50. <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"/>
  51. </LegendURL>
  52. </Style>
  53. </Layer>
  54.  
  55. <FeatureType>
  56. <Name>fauna:SamF2016</Name>
  57. <Title>SamF2016</Title>
  58. <DefaultCRS>urn:ogc:def:crs:EPSG:6.9:28992</DefaultCRS>
  59. <OtherSRS>urn:ogc:def:crs:EPSG:6.9:4326</OtherSRS>
  60. <OutputFormats>
  61. <Format>application/gml+xml; version=3.2</Format>
  62. </OutputFormats>
  63. <ows:WGS84BoundingBox>
  64. <ows:LowerCorner>4.2697569340901396 51.221271739696967</ows:LowerCorner>
  65. <ows:UpperCorner>6.029130352568183 51.822105829878616</ows:UpperCorner>
  66. </ows:WGS84BoundingBox>
  67. </FeatureType>
Add Comment
Please, Sign In to add comment