Skip to content

Commit

Permalink
set default tile size for WMS layers in map configurations (#220) (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
giohappy authored Jun 3, 2021
1 parent 3300caa commit 5b3af2a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mapstore2_adapter/plugins/geonode.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,11 @@ def get_overlays(self, viewer, request=None):
source = sources[layer['source']]
overlay = {}
if 'url' in source:
overlay['type'] = "wms" if 'ptype' not in source or \
source['ptype'] != 'gxp_arcrestsource' else 'arcgis'
if 'ptype' not in source or source['ptype'] != 'gxp_arcrestsource':
overlay['type'] = "wms"
overlay['tileSize'] = getattr(settings, "DEFAULT_TILE_SIZE", 512)
else:
overlay['type'] = "arcgis"
_p_url = parse.urlparse(source['url'])
if _p_url.query:
overlay['params'] = dict(parse.parse_qsl(_p_url.query))
Expand Down

0 comments on commit 5b3af2a

Please sign in to comment.