From 5131b6f133dad110c16013fa9c6665b1156aba76 Mon Sep 17 00:00:00 2001 From: Matt Fullerton Date: Wed, 28 Feb 2018 14:18:43 +0100 Subject: [PATCH] Cope with another version of bounds in ESRI API I am not familiar with ESRI's API, but this did the trick in dealing with the dataset we are looking at, and shouldn't break anything else --- ckanext/geoview/public/js/vendor/ol-helpers/ol-helpers.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ckanext/geoview/public/js/vendor/ol-helpers/ol-helpers.js b/ckanext/geoview/public/js/vendor/ol-helpers/ol-helpers.js index a0827259..f8b14487 100644 --- a/ckanext/geoview/public/js/vendor/ol-helpers/ol-helpers.js +++ b/ckanext/geoview/public/js/vendor/ol-helpers/ol-helpers.js @@ -207,6 +207,12 @@ ol.proj.addProjection(createEPSG4326Proj('EPSG:4326:LONLAT', 'enu')); var getArcGISVectorExtent = function() { var bbox = this.get('arcgisDescr') && this.get('arcgisDescr').bounds; + if (!bbox) { + bbox_obj = this.get('arcgisDescr').extent; + if (bbox_obj) { + bbox = [bbox_obj['xmin'], bbox_obj['ymin'], bbox_obj['xmax'], bbox_obj['ymax']]; + } + } return bbox; }