Skip to content

Commit

Permalink
map MS2 bbox coords to GN config convention
Browse files Browse the repository at this point in the history
  • Loading branch information
giohappy committed Jun 26, 2020
1 parent 62dd5c2 commit 2c80688
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mapstore2_adapter/plugins/geonode.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,9 @@ def viewer_json(self, viewer, request):
input: MapStore2 compliant str(config)
output: GeoNode JSON Gxp Config
"""
# MapStore uses x0,y0,x1,y1 ordering of bbox coords
if map and map.get('bbox'):
ms2_bbox = map.get('bbox')
config_bbox = [ms2_bbox[0], ms2_bbox[2], ms2_bbox[1], ms2_bbox[3]]
viewer['map']['bbox'] = config_bbox
return to_json(viewer)

0 comments on commit 2c80688

Please sign in to comment.