diff --git a/README.md b/README.md index 61ee718..1697c20 100644 --- a/README.md +++ b/README.md @@ -73,11 +73,11 @@ hydrated report pages. The following environment variables can be set to change the API and map service endpoints: -| Environment variable | Default | -| -------------------- | --------------------------------------- | -| GEOSERVER_URL | https://gs.mapventure.org/geoserver/wms | -| RASDAMAN_URL | https://zeus.snap.uaf.edu/rasdaman/ows | -| SNAP_API_URL | https://earthmaps.io | +| Environment variable | Default | +| -------------------- | -------------------------------------- | +| GEOSERVER_URL | https://gs.earthmaps.io/geoserver | +| RASDAMAN_URL | https://zeus.snap.uaf.edu/rasdaman/ows | +| SNAP_API_URL | https://earthmaps.io | ### Run locally in development mode diff --git a/components/Map.vue b/components/Map.vue index a34f2b5..dfeff43 100644 --- a/components/Map.vue +++ b/components/Map.vue @@ -102,16 +102,19 @@ export default { }) }, getBaseMapAndLayers() { - var baseLayer = new this.$L.tileLayer.wms(process.env.geoserverUrl, { - transparent: true, - srs: 'EPSG:3338', - format: 'image/png', - version: '1.3.0', - layers: [ - 'atlas_mapproxy:alaska_osm_retina', - 'shadow_mask:iem_with_ak_aleutians_symmetric_difference', - ], - }) + var baseLayer = new this.$L.tileLayer.wms( + process.env.geoserverUrl + '/wms', + { + transparent: true, + srs: 'EPSG:3338', + format: 'image/png', + version: '1.3.0', + layers: [ + 'atlas_mapproxy:alaska_osm_retina', + 'shadow_mask:iem_with_ak_aleutians_symmetric_difference', + ], + } + ) // Projection definition. var proj = new this.$L.Proj.CRS( diff --git a/nuxt.config.js b/nuxt.config.js index 66a731a..a7c0d1a 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -101,7 +101,7 @@ export default { // Env vars env: { geoserverUrl: - process.env.GEOSERVER_URL || 'https://gs.mapventure.org/geoserver/wms', + process.env.GEOSERVER_URL || 'https://gs.earthmaps.io/geoserver', rasdamanUrl: process.env.RASDAMAN_URL || 'https://maps.earthmaps.io/rasdaman/ows', apiUrl: process.env.SNAP_API_URL || 'https://earthmaps.io', diff --git a/store/demographics.js b/store/demographics.js index 727b2b1..4137152 100644 --- a/store/demographics.js +++ b/store/demographics.js @@ -74,7 +74,8 @@ export const actions = { // We query for the geometry of the place separately let geometryQueryUrl = - "https://gs.mapventure.org/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=demographics:demographics&outputFormat=application/json&cql_filter=id='" + + process.env.geoserverUrl + + "/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=demographics:demographics&outputFormat=application/json&cql_filter=id='" + placeId + "'" let returnedGeometry = await $axios @@ -87,11 +88,11 @@ export const actions = { if (returnedData && returnedGeometry) { // Make the data returns a bit more regular let processed = _.mapValuesDeep(returnedData.data, (value, key) => { - if(key == 'total_population') { + if (key == 'total_population') { // Skip this particular value. return value } - if(_.isNumber(value)) { + if (_.isNumber(value)) { return Number.parseFloat(value).toFixed(1) } else { return value diff --git a/utils/maps.js b/utils/maps.js index dd6fc77..fdc8ddb 100644 --- a/utils/maps.js +++ b/utils/maps.js @@ -8,7 +8,7 @@ export const getBaseMapAndLayers = function () { } ) this.baseLayer = this.getBaseLayer() - let naturalEarth = new L.tileLayer.wms(process.env.geoserverUrl, { + let naturalEarth = new L.tileLayer.wms(process.env.geoserverUrl + '/wms', { transparent: true, format: 'image/png', layers: 'natural_earth:iem-natural-earth',