Skip to content

Commit 017e05b

Browse files
committed
add CyclOSM, fixes graphhopper#317
1 parent 5b47182 commit 017e05b

File tree

1 file changed

+14
-41
lines changed

1 file changed

+14
-41
lines changed

src/stores/MapOptionsStore.ts

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ const isRetina = window.devicePixelRatio > 1 || (window.matchMedia && window.mat
4444
const tilePixelRatio = isRetina ? 2 : 1
4545
const retina2x = isRetina ? '@2x' : ''
4646

47-
const mapTiler: VectorStyle = {
48-
name: 'MapTiler',
49-
type: 'vector',
50-
url: 'https://api.maptiler.com/maps/1f566542-c726-4cc5-8f2d-2309b90083db/style.json?key=' + mapTilerKey,
51-
attribution: osmAttribution + ', &copy; <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>',
52-
}
5347
const mapTilerSatellite: VectorStyle = {
5448
name: 'MapTiler Satellite',
5549
type: 'vector',
@@ -67,6 +61,18 @@ const osmOrg: RasterStyle = {
6761
attribution: osmAttribution,
6862
maxZoom: 19,
6963
}
64+
const osmCycl: RasterStyle = {
65+
name: 'Cyclosm',
66+
type: 'raster',
67+
url: [
68+
'https://a.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
69+
'https://b.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
70+
'https://c.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
71+
],
72+
attribution: osmAttribution + ', &copy; <a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" target="_blank">CyclOSM</a>',
73+
maxZoom: 19,
74+
}
75+
7076
const omniscale: RasterStyle = {
7177
name: 'Omniscale',
7278
type: 'raster',
@@ -124,18 +130,6 @@ const tfOutdoors: RasterStyle = {
124130
', <a href="https://www.thunderforest.com/maps/outdoors/" target="_blank">Thunderforest Outdoors</a>',
125131
tilePixelRatio: tilePixelRatio,
126132
}
127-
const tfAtlas: RasterStyle = {
128-
name: 'TF Atlas',
129-
type: 'raster',
130-
url: [
131-
'https://a.tile.thunderforest.com/atlas/{z}/{x}/{y}' + retina2x + '.png?apikey=' + thunderforestApiKey,
132-
'https://b.tile.thunderforest.com/atlas/{z}/{x}/{y}' + retina2x + '.png?apikey=' + thunderforestApiKey,
133-
'https://c.tile.thunderforest.com/atlas/{z}/{x}/{y}' + retina2x + '.png?apikey=' + thunderforestApiKey,
134-
],
135-
attribution:
136-
osmAttribution + ', <a href="https://thunderforest.com/maps/atlas/" target="_blank">Thunderforest Atlas</a>',
137-
tilePixelRatio: tilePixelRatio,
138-
}
139133
const path = '/raster/styles/kurviger-liberty/{z}/{x}/{y}' + retina2x + '.png?key=' + kurvigerApiKey
140134
const kurviger: RasterStyle = {
141135
name: 'Kurviger Liberty',
@@ -161,17 +155,6 @@ const mapillion: VectorStyle = {
161155
osmAttribution +
162156
', &copy; <a href="https://mapilion.com/attribution" target="_blank">Mapilion</a> <a href="http://www.openmaptiles.org/" target="_blank">&copy; OpenMapTiles</a>',
163157
}
164-
const osmDe: RasterStyle = {
165-
name: 'OpenStreetmap.de',
166-
type: 'raster',
167-
url: [
168-
'https://a.tile.openstreetmap.de/{z}/{x}/{y}.png',
169-
'https://b.tile.openstreetmap.de/{z}/{x}/{y}.png',
170-
'https://c.tile.openstreetmap.de/{z}/{x}/{y}.png',
171-
],
172-
attribution: osmAttribution,
173-
maxZoom: 18,
174-
}
175158
const lyrk: RasterStyle = {
176159
name: 'Lyrk',
177160
type: 'raster',
@@ -191,30 +174,20 @@ const wanderreitkarte: RasterStyle = {
191174
attribution: osmAttribution + ', <a href="https://wanderreitkarte.de" target="_blank">WanderReitKarte</a>',
192175
maxZoom: 18,
193176
}
194-
const sorbian: RasterStyle = {
195-
name: 'Sorbian Language',
196-
type: 'raster',
197-
url: ['https://a.tile.openstreetmap.de/tilesbw/osmhrb/{z}/{x}/{y}.png'],
198-
attribution: osmAttribution + ', <a href="https://www.alberding.eu/">&copy; Alberding GmbH, CC-BY-SA</a>',
199-
}
200177

201178
const styleOptions: StyleOption[] = [
202179
omniscale,
203180
osmOrg,
181+
osmCycl,
204182
esriSatellite,
205183
mapTilerSatellite,
206-
mapTiler,
207184
tfTransport,
208185
tfCycle,
209186
tfOutdoors,
210-
tfAtlas,
211187
kurviger,
212188
mapillion,
213-
osmDe,
214189
lyrk,
215-
wanderreitkarte,
216-
// This one is extremely slow with mapbox and openlayers?!
217-
// sorbian
190+
wanderreitkarte
218191
]
219192

220193
export default class MapOptionsStore extends Store<MapOptionsStoreState> {

0 commit comments

Comments
 (0)