File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ You can now use the components in your app:
3232
3333[ sveltekit ] : https://kit.svelte.dev/
3434
35+ ## Environment Variables
36+
37+ Google maps requires an API key ` VITE_GOOGLE_MAPS_API_KEY ` to be defined in .env
38+ We support Google Maps for rendering maps. If no API key is provided, we fall back to OpenStreet even if Google Maps is selected
39+
3540## Playground
3641
3742The playground can be used during development but is not used outside of the package.
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const getGoogleMapsStyle = (
1313 [ MapProviders . googleMaps ] : {
1414 type : 'raster' ,
1515 tiles : [
16+ // The apiKey is not actually needed here for some reason. TODO: Update to use the google maps tile api ASAP.
1617 `https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key=${ apiKey } ` ,
1718 ] ,
1819 tileSize,
@@ -22,6 +23,7 @@ const getGoogleMapsStyle = (
2223 satellite : {
2324 type : 'raster' ,
2425 tiles : [
26+ // The apiKey is not actually needed here for some reason. TODO: Update to use the google maps tile api ASAP.
2527 `https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}&key=${ apiKey } ` ,
2628 ] ,
2729 tileSize : 256 ,
Original file line number Diff line number Diff line change @@ -64,11 +64,12 @@ const path = () =>
6464 mapProvider =" google-maps"
6565 mapProviderKey ={import .meta .env .VITE_GOOGLE_MAPS_API_KEY }
6666 >
67- <NavigationControls />
68- <SatelliteControls />
67+ <div class =" absolute right-12 top-2.5 z-10 flex items-center gap-2" >
68+ <NavigationControls />
69+ <SatelliteControls />
70+ </div >
6971 </MapLibre >
7072 </div >
7173 </div >
72-
7374 <FollowingMarker />
7475</div >
You can’t perform that action at this time.
0 commit comments