-
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.
- Loading branch information
1 parent
c31d2da
commit 663be1d
Showing
2 changed files
with
2 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
// Don't forget to replace <YOUR_ACCESS_TOKEN> by your own access token | ||
const accessToken = "<YOUR_ACCESS_TOKEN>"; | ||
|
||
// Get the style then entend it with the globe projection | ||
const style = await fetch(`https://api.jawg.io/styles/jawg-terrain.json?access-token=${accessToken}`) | ||
.then((response) => response.json()) | ||
.then((style) => { | ||
|
@@ -43,6 +44,7 @@ | |
zoom: 2, | ||
center: [0, 0], | ||
maxPitch: 85, | ||
canvasContextAttributes: { antialias: true }, | ||
}).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 |
---|---|---|
|
@@ -45,7 +45,6 @@ | |
center: [0, 0], | ||
maxPitch: 85, | ||
canvasContextAttributes: { antialias: true }, | ||
hash: false, | ||
}); | ||
// This plugin is used for right to left languages | ||
maplibregl.setRTLTextPlugin("https://unpkg.com/@mapbox/[email protected]/mapbox-gl-rtl-text.min.js"); | ||
|