add attribution
This commit is contained in:
parent
08aafbb10a
commit
f280134de7
1 changed files with 9 additions and 5 deletions
|
@ -14,7 +14,6 @@ function MapControls(): JSX.Element {
|
||||||
showZoom: true,
|
showZoom: true,
|
||||||
visualizePitch: true,
|
visualizePitch: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
const GEO_OPTIONS: GeolocateOptions = {
|
const GEO_OPTIONS: GeolocateOptions = {
|
||||||
positionOptions: {
|
positionOptions: {
|
||||||
enableHighAccuracy: false,
|
enableHighAccuracy: false,
|
||||||
|
@ -26,12 +25,14 @@ function MapControls(): JSX.Element {
|
||||||
showAccuracyCircle: false,
|
showAccuracyCircle: false,
|
||||||
showUserLocation: true,
|
showUserLocation: true,
|
||||||
}
|
}
|
||||||
|
const ATTRIB_OPTIONS: AttributionOptions = {
|
||||||
|
compact: false,
|
||||||
|
customAttribution: 'OpenStreetMap',
|
||||||
|
}
|
||||||
const SCALE_OPTIONS: ScaleOptions = {
|
const SCALE_OPTIONS: ScaleOptions = {
|
||||||
maxWidth: 100,
|
maxWidth: 100,
|
||||||
unit: 'imperial',
|
unit: 'imperial',
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Control
|
<Control
|
||||||
|
@ -39,13 +40,16 @@ function MapControls(): JSX.Element {
|
||||||
position="top-right"
|
position="top-right"
|
||||||
options={NAV_OPTIONS}
|
options={NAV_OPTIONS}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Control
|
<Control
|
||||||
type="geolocate"
|
type="geolocate"
|
||||||
position="top-right"
|
position="top-right"
|
||||||
options={GEO_OPTIONS}
|
options={GEO_OPTIONS}
|
||||||
/>
|
/>
|
||||||
|
<Control
|
||||||
|
type="attribution"
|
||||||
|
position="bottom-right"
|
||||||
|
options={ATTRIB_OPTIONS}
|
||||||
|
/>
|
||||||
<Control
|
<Control
|
||||||
type="scale"
|
type="scale"
|
||||||
position="bottom-left"
|
position="bottom-left"
|
||||||
|
|
Loading…
Add table
Reference in a new issue