when-am-i / commit
minor cleanup
.gitignore | 1 + src/MapPicker.tsx | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f06235c..6feb225 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules dist +public diff --git a/src/MapPicker.tsx b/src/MapPicker.tsx index 4367f61..e082e59 100644 --- a/src/MapPicker.tsx +++ b/src/MapPicker.tsx @@ -19,11 +19,14 @@ const MapPicker: React.FC<MapPickerProps> = ({ onPick }) => { return position ? <Marker position={position} /> : null; } + const tileLayerProps = { + attribution: '© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors', + url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" + }; + return ( - <MapContainer style={{ height: '400px', width: '100%' }}> - <TileLayer - url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" - /> + <MapContainer style={{ height: '400px', width: '100%' }} > + <TileLayer {...tileLayerProps} /> <LocationMarker /> </MapContainer> );