-
-
Notifications
You must be signed in to change notification settings - Fork 748
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add more guides, simplify main readme, fix incorrect links. * Fix search issue that presents long text, fix missing image
- Loading branch information
Showing
8 changed files
with
71 additions
and
47 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
/* see https://github.com/squidfunk/mkdocs-material/issues/4278 */ | ||
.md-search-result .md-typeset { | ||
display: -webkit-box; | ||
-webkit-line-clamp: 5; | ||
-webkit-box-orient: vertical; | ||
max-height: 200px; | ||
} |
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,8 @@ | ||
# Guides | ||
|
||
This section of the docs' site is dedicated to some more complex examples and totorials. | ||
If you have something you would like to share with the community that is not straight forward and might be beneficial to others, this is the place! | ||
|
||
Things that are short enough and/or with lower complexity are probably already in the [Examples](../examples/index.md) section, but if not, feel free to add there. | ||
|
||
The process of adding examples or guides is pretty straight forward, see our `docs` folder in the [MpaLibre GL JS repo](https://github.com/maplibre/maplibre-gl-js/tree/main/docs) for more information. |
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,44 @@ | ||
# MapBox migration guide | ||
|
||
This part of the docs is dedicated to the migration from `mapbox-gl` to `maplibre-gl`. | ||
|
||
This guide might not be accurate depending on the current version of `mapbox-gl` but should be failry straight forward. | ||
|
||
The libraries are very similar but diverge with newer features happening from v2 in both libraries where Mapbox turned proprietary. | ||
|
||
The overall migration happens by uninstalling `mapbox-gl` and installing `maplibre-gl` in your node packages (or see below for CDN links), and replacing `mapboxgl` with `maplibregl` throughout your TypeScript, JavaScript and HTML/CSS. | ||
|
||
```diff | ||
- var map = new mapboxgl.Map({ | ||
+ var map = new maplibregl.Map({ | ||
|
||
- <button class="mapboxgl-ctrl"> | ||
+ <button class="maplibregl-ctrl"> | ||
``` | ||
|
||
#### Compatibility branch | ||
|
||
MapLibre GL JS v1 is completely backward compatible with Mapbox GL JS v1. This compatibility branch (named 1.x) is tagged v1 on npm, and its current version is 1.15.3. | ||
|
||
#### CDN Links | ||
|
||
> MapLibre GL JS is distributed via [unpkg.com](https://unpkg.com). | ||
```diff | ||
- <script src="https://api.mapbox.com/mapbox-gl-js/v#.#.#/mapbox-gl.js"></script> | ||
- <link | ||
- href="https://api.mapbox.com/mapbox-gl-js/v#.#.#/mapbox-gl.css" | ||
- rel="stylesheet" | ||
- /> | ||
|
||
|
||
+ <script src="https://unpkg.com/maplibre-gl@#.#.#/dist/maplibre-gl.js"></script> | ||
+ <link | ||
+ href="https://unpkg.com/maplibre-gl@#.#.#/dist/maplibre-gl.css" | ||
+ rel="stylesheet" | ||
+ /> | ||
|
||
``` | ||
|
||
Don't forget to replace the version above `#.#.#` with the version you would like to use. | ||
In the upper right corner of this page you can find the number of the latest version. |
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
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