Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

fi: replace process.env by hosname #2315

Merged
merged 1 commit into from
Dec 12, 2023
Merged
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
4 changes: 2 additions & 2 deletions static/scripts/buildmap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

var map = new maplibregl.Map({
container: 'mapcontainer', // container id
style: process.env.HOSTNAME +'/static/json/osm.style.json',
style: 'https://api.' + location.hostname + '/static/json/osm.style.json',
// style: 'https://api.maptiler.com/maps/streets/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL', //style, //https://etalab-tiles.fr/styles/osm-bright/style.json?vector', // style URL
// center: [2.087, 46],
zoom: 0,
Expand All @@ -16,7 +16,7 @@ function capitalizeWord(str) {

// var DEPARTEMENTS_GEOJSON = "https://gist.githubusercontent.com/maximepvrt/26dd5ed5f26a63bc3040cb3f67594325/raw/c6af19f94f2743b9a445a5a2e6d657a4c0bfc3d6/departements-avec-outre-mer.geojson"
// var DEPARTEMENTS_GEOJSON = 'https://raw.githubusercontent.com/etalab/barometre-resultats/master/frontend/static/datasets/geodata/departements-1000m.geojson'
var DEPARTEMENTS_GEOJSON = process.env.HOSTNAME + '/static/json/departements-1000m.geojson'
var DEPARTEMENTS_GEOJSON = 'https://api.' + location.hostname + '/static/json/departements-1000m.geojson'
var groupBy = function(xs, key) {
return xs.reduce(function(rv, x) {
(rv[x[key]] = rv[x[key]] || []).push(x);
Expand Down
Loading