Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates production Geoserver URL #683

Merged
merged 3 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
23 changes: 13 additions & 10 deletions components/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
7 changes: 4 additions & 3 deletions store/demographics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utils/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading