Skip to content

Commit 2a0cf83

Browse files
committed
- fixed bug introduced on previous commit
1 parent 95580f2 commit 2a0cf83

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pygeoapi/provider/wms_facade.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
'http://www.opengis.net/def/crs/EPSG/0/3857': 'EPSG:3857'
4747
}
4848

49+
DEFAULT_CRS = 'EPSG:4326'
50+
4951

5052
class WMSFacadeProvider(BaseProvider):
5153
"""WMS 1.3.0 provider"""
@@ -64,8 +66,8 @@ def __init__(self, provider_def):
6466
LOGGER.debug(f'pyproj version: {pyproj.__version__}')
6567

6668
def query(self, style=None, bbox=[-180, -90, 180, 90], width=500,
67-
height=300, crs=4326, datetime_=None, transparent=True,
68-
bbox_crs=4326, format_='png', **kwargs):
69+
height=300, crs=DEFAULT_CRS, datetime_=None, transparent=True,
70+
bbox_crs=DEFAULT_CRS, format_='png', **kwargs):
6971
"""
7072
Generate map
7173

tests/provider/test_wms_facade_provider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@ def test_query(config):
6060
results2 = p.query(crs='http://www.opengis.net/def/crs/EPSG/0/1111')
6161
assert len(results2) == len(results)
6262

63-
results3 = p.query(crs='http://www.opengis.net/def/crs/EPSG/0/3857')
63+
results3 = p.query(crs='http://www.opengis.net/def/crs/EPSG/0/3857',
64+
bbox=[-20037508.34, -20037508.34, 20037508.34, 20037508.34], # noqa
65+
bbox_crs='http://www.opengis.net/def/crs/EPSG/0/3857')
6466
assert len(results3) != len(results)

0 commit comments

Comments
 (0)