generated from kbysiec/vite-vanilla-ts-lib-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more substantial README and a basic example.
- Loading branch information
1 parent
c0571b4
commit c5379f8
Showing
4 changed files
with
167 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Basic MapLibre Search</title> | ||
<script src="https://unpkg.com/maplibre-gl@3.0.1/dist/maplibre-gl.js"></script> | ||
<link | ||
href="https://unpkg.com/maplibre-gl@3.0.1/dist/maplibre-gl.css" | ||
rel="stylesheet" | ||
/> | ||
<script src="https://unpkg.com/@stadiamaps/maplibre-search-box/dist/maplibre-search-box.umd.js"></script> | ||
<link | ||
href="https://unpkg.com/@stadiamaps/maplibre-search-box/dist/style.css" | ||
rel="stylesheet" | ||
/> | ||
</head> | ||
<body style="margin: 0; padding: 0"> | ||
<div id="map" style="height: 100vh; width: 100vw"></div> | ||
<script type="application/javascript"> | ||
var control = new maplibreSearchBox.MapLibreSearchControl({ | ||
useMapFocusPoint: true, | ||
}); | ||
var map = new maplibregl.Map({ | ||
container: "map", | ||
style: "https://tiles.stadiamaps.com/styles/alidade_smooth.json", // stylesheet location | ||
center: [-74.5, 40], // starting position [lng, lat] | ||
zoom: 2, // starting zoom | ||
}); | ||
map.addControl(control, "top-left"); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters