new ol.layer.Vector({
source: new ol.source.Vector({
url: WFS,
format: new ol.format.GML()
}),
style: new ol.style.Style({
fill: new ol.style.Fill({
color: 'rgba(0, 0, 0, 0.3)'
})
}),
})
WFS 请求按照以下方式返回。
<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver https://ecalertme.weather.gc.ca/alerts-ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=zones_ended&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<gml:boundedBy>
<gml:Envelope srsName="EPSG:900913">
<gml:lowerCorner>-14897677.030271 6147067.126726</gml:lowerCorner>
<gml:upperCorner>-13495152.146478 7770297.331738</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<gml:featureMember>
<ms:zones_ended>
<gml:boundedBy>
<gml:Envelope srsName="EPSG:900913">
<gml:lowerCorner>-14706941.165713 6950832.322429</gml:lowerCorner>
<gml:upperCorner>-14112436.560428 7770297.331738</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<ms:msGeometry>
<gml:Polygon srsName="EPSG:900913">
<gml:exterior>
<gml:LinearRing>
<gml:posList srsDimension="2">
-14141366.548557 6975802.093835 -14173067.590790 6950832.322429 -14237456.444901 6955242.796548 -14348855.361779 7132863.966456 -14470752.446836 7412227.085810 -14488266.717844 7506521.980389 -14472135.448668 7541008.417285 -14481932.636208 7580554.337341 -14498448.129990 7575728.907214 -14517645.714454 7584418.845950 -14521758.026427 7605031.143216 -14536999.569990 7607625.429685 -14554515.539586 7628129.363389 -14590862.195901 7639946.777252 -14646615.364223 7681183.103524 -14674015.490988 7679133.855261 -14679063.732101 7720831.043509 -14706941.165713 7736605.257041 -14697698.813134 7767530.139107 -14696118.614261 7767562.565311 -14694918.470332 7767210.149557 -14614635.810255 7767017.388716 -14534399.927641 7769012.148845 -14384560.397072 7770297.331738 -14384560.363684 7767051.802913 -14384560.355188 7766470.348546 -14359373.389848 7766315.181141 -14249308.739089 7389115.226588 -14218374.516936 7287652.476368 -14214142.301959 7272727.018398 -14213862.063256 7272717.964871 -14194237.250443 7207363.921062 -14112436.560428 7020301.154813 -14141366.548557 6975802.093835
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</ms:msGeometry>
</ms:zones_ended>
</gml:featureMember>
<gml:featureMember>...</gml:featureMember>
<gml:featureMember>...</gml:featureMember>
<gml:featureMember>...</gml:featureMember>
<gml:featureMember>...</gml:featureMember>
<gml:featureMember>...</gml:featureMember>
<gml:featureMember>...</gml:featureMember>
<gml:featureMember>...</gml:featureMember>
似乎它只通过一组 featureMember,因为输出是
然而,基于 GML,温哥华及其周边地区的大部分地区也应该被填充。
有谁知道为什么?