Skip to content

Commit 88138da

Browse files
committed
Combine all base layers source and layer on single object
1 parent 3c5721f commit 88138da

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

frontend/src/config/index.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,49 @@ export const DROPZONE_SETTINGS = {
192192

193193
// TM_DEFAULT_CHANGESET_COMMENT without '#'
194194
export const defaultChangesetComment = TM_DEFAULT_CHANGESET_COMMENT.replace('#', '');
195+
196+
export const DEFAULT_MAP_STYLE = {
197+
version: 8,
198+
glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf',
199+
sources: {},
200+
layers: [],
201+
};
202+
203+
// base layers list on single object along with visibility
204+
export const baseLayers = {
205+
OSM: {
206+
source: {
207+
type: 'raster',
208+
tiles: ['https://a.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'],
209+
tileSize: 256,
210+
attribution:
211+
'© <a href="https://www.openstreetmap.org/copyright/">OpenStreetMap</a> contributors',
212+
},
213+
layer: {
214+
id: 'OSM-layer',
215+
type: 'raster',
216+
source: 'OSM-source',
217+
layout: { visibility: 'visible' },
218+
},
219+
},
220+
bing: {
221+
source: {
222+
type: 'raster',
223+
tiles: [
224+
'https://ecn.t0.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=587&mkt=en-gb&n=z',
225+
'https://ecn.t1.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=587&mkt=en-gb&n=z',
226+
'https://ecn.t2.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=587&mkt=en-gb&n=z',
227+
'https://ecn.t3.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=587&mkt=en-gb&n=z',
228+
],
229+
tileSize: 256,
230+
attribution:
231+
'© <a href="https://blog.openstreetmap.org/2010/11/30/microsoft-imagery-details">Microsoft Corporation</a>',
232+
},
233+
layer: {
234+
id: 'bing-layer',
235+
type: 'raster',
236+
source: 'bing-source',
237+
layout: { visibility: 'none' },
238+
},
239+
},
240+
};

0 commit comments

Comments
 (0)