Adding / updating tile servers and changing the order of zoom in/out in the mouse wheel handler.
This commit is contained in:
parent
2fe7452811
commit
ea97d6bc09
|
@ -27,7 +27,7 @@ export const tileProviders: any = {
|
|||
osmfr: {
|
||||
name: 'Open Street Map France',
|
||||
minZoom: 0,
|
||||
maxZoom: 19,
|
||||
maxZoom: 20,
|
||||
getTileUrl: (zoom: number, x: number, y: number) =>
|
||||
'https://' +
|
||||
getRandomItem(abc) +
|
||||
|
@ -41,8 +41,8 @@ export const tileProviders: any = {
|
|||
},
|
||||
otm: {
|
||||
name: 'Open Topo Map',
|
||||
minZoom: 0,
|
||||
maxZoom: 19,
|
||||
minZoom: 2,
|
||||
maxZoom: 17,
|
||||
getTileUrl: (zoom: number, x: number, y: number) =>
|
||||
'https://' +
|
||||
getRandomItem(abc) +
|
||||
|
@ -68,7 +68,24 @@ export const tileProviders: any = {
|
|||
'/' +
|
||||
y +
|
||||
'.png',
|
||||
},
|
||||
},
|
||||
//https://b.tile.openstreetmap.fr/openriverboatmap/20/535762/382966.png
|
||||
openriverboatmap: {
|
||||
name: 'Open River Boat Map',
|
||||
minZoom: 0,
|
||||
maxZoom: 20,
|
||||
getTileUrl: (zoom: number, x: number, y: number) =>
|
||||
'https://' +
|
||||
getRandomItem(abc) +
|
||||
'.tile.openstreetmap.fr/openriverboatmap/' +
|
||||
zoom +
|
||||
'/' +
|
||||
x +
|
||||
'/' +
|
||||
y +
|
||||
'.png',
|
||||
},
|
||||
|
||||
// cyclosmlite: {
|
||||
// name: 'CyclOSM lite',
|
||||
// minZoom: 0,
|
||||
|
|
|
@ -42,7 +42,7 @@ const WheelHandler: react.FC<WheelHandlerProps> = (
|
|||
) {
|
||||
dispatch(
|
||||
mapActions.scale({
|
||||
factor: event.deltaY > 0 ? Math.SQRT2 : Math.SQRT1_2,
|
||||
factor: event.deltaY < 0 ? Math.SQRT2 : Math.SQRT1_2,
|
||||
center: { x: event.pageX, y: event.pageY },
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue