Skip to content

Commit

Permalink
Merge pull request #688 from unepwcmc/fix/api-call-urls
Browse files Browse the repository at this point in the history
fix/Changed urls so they work after recent API changes
  • Loading branch information
lucacug authored Jun 16, 2022
2 parents e19c400 + c162e38 commit 1733e5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/map_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def all_services_for_point_query

def country_extent_url (iso3)
{
url: "https://data-gis.unep-wcmc.org/server/rest/services/GADM_EEZ_Layer/FeatureServer/0/query?where=iso_ter+%3D+%27#{iso3}%27&returnGeometry=false&returnExtentOnly=true&outSR=4326&f=pjson",
url: "https://data-gis.unep-wcmc.org/server/rest/services/GADM_EEZ_Layer/FeatureServer/0/query?where=iso_ter+%3D+#{iso3}&returnGeometry=false&returnExtentOnly=true&outSR=4326&f=pjson",
padding: 5
}
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/protected_area.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ def arcgis_layer
end

def arcgis_query_string
"/query?where=wdpaid+%3D+%27#{wdpa_id}%27&geometryType=esriGeometryEnvelope&returnGeometry=true&f=geojson"
"/query?where=wdpaid+%3D+#{wdpa_id}&geometryType=esriGeometryEnvelope&returnGeometry=true&f=geojson"
end

def extent_url
{
url: "#{arcgis_layer}/query?where=wdpaid+%3D+%27#{wdpa_id}%27&returnGeometry=false&returnExtentOnly=true&outSR=4326&f=pjson",
url: "#{arcgis_layer}/query?where=wdpaid+%3D+#{wdpa_id}&returnGeometry=false&returnExtentOnly=true&outSR=4326&f=pjson",
padding: 0.2
}
end
Expand Down

0 comments on commit 1733e5e

Please sign in to comment.