-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gis): add query param to remove navigation control
- Loading branch information
Showing
3 changed files
with
15 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,11 @@ | |
style: `https://api.jawg.io/gis/maps/${mapId}/versions/latest/style?access-token=${accessToken}`, | ||
zoom: 12, | ||
center: [2.35071554, 48.85826376], | ||
}).addControl(new maplibregl.NavigationControl(), "top-right"); | ||
}); | ||
const useNavigationControl = new URLSearchParams(window.location.search).get("navigation-control"); | ||
if (useNavigationControl !== "false") { | ||
map.addControl(new maplibregl.NavigationControl(), "top-right"); | ||
} | ||
// This plugin is used for right to left languages | ||
maplibregl.setRTLTextPlugin("https://unpkg.com/@mapbox/[email protected]/mapbox-gl-rtl-text.min.js"); | ||
|
||
|
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 |
---|---|---|
|
@@ -79,7 +79,11 @@ | |
style: `https://api.jawg.io/gis/maps/${mapId}/versions/latest/style?access-token=${accessToken}`, | ||
zoom: 2, | ||
center: [8.8, 10.9], | ||
}).addControl(new maplibregl.NavigationControl(), "top-right"); | ||
}); | ||
const useNavigationControl = new URLSearchParams(window.location.search).get("navigation-control"); | ||
if (useNavigationControl !== "false") { | ||
map.addControl(new maplibregl.NavigationControl(), "top-right"); | ||
} | ||
// This plugin is used for right to left languages | ||
maplibregl.setRTLTextPlugin("https://unpkg.com/@mapbox/[email protected]/mapbox-gl-rtl-text.min.js"); | ||
|
||
|
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 |
---|---|---|
|
@@ -104,7 +104,11 @@ | |
style: `https://api.jawg.io/gis/maps/${mapId}/versions/latest/style?access-token=${accessToken}`, | ||
zoom: 5, | ||
center: [2.35, 47], | ||
}).addControl(new maplibregl.NavigationControl(), "top-right"); | ||
}); | ||
const useNavigationControl = new URLSearchParams(window.location.search).get("navigation-control"); | ||
if (useNavigationControl !== "false") { | ||
map.addControl(new maplibregl.NavigationControl(), "top-right"); | ||
} | ||
// This plugin is used for right to left languages | ||
maplibregl.setRTLTextPlugin("https://unpkg.com/@mapbox/[email protected]/mapbox-gl-rtl-text.min.js"); | ||
|
||
|