Skip to content

Commit

Permalink
Add mapy.cz tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
petrkucerak committed May 1, 2024
1 parent 994f98d commit 734d0fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import MapToilets from "../components/map-toilets";
import MapPicker from "./map-picker";

export default function Map() {
const API_KEY="0pDMFK05UmFV-CqGrkNGlwvIIquKNNSwUaFxI2ZLXQo"
return (
<MapContainer
center={[50.08061, 14.4101822]}
Expand All @@ -15,8 +16,8 @@ export default function Map() {
className="w-screen h-screen diseable-map-selection"
>
<TileLayer
url="https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png"
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
url={`https://api.mapy.cz/v1/maptiles/outdoor/256/{z}/{x}/{y}?apikey=${API_KEY}`}
attribution='<a href="https://api.mapy.cz/copyright" target="_blank">&copy; Seznam.cz a.s. a další</a>'
/>
<SracLocation />
<MapToilets />
Expand All @@ -25,6 +26,7 @@ export default function Map() {
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/L.Control.Locate.min.css"
/>
<a href="http://mapy.cz/" target="_blank" className="absolute z-[1000] bottom-0"><img alt="Mapy.cz logo" src="https://api.mapy.cz/img/api/logo.svg"/></a>
</MapContainer>
);
}

0 comments on commit 734d0fb

Please sign in to comment.