Skip to content

Commit 458c193

Browse files
committed
update articles
1 parent 2be68e6 commit 458c193

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

playground/simple-map/text.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ description: How to add a simple OSM map.
1111
In our example, we load these assets from our demo server at `https://tiles.versatiles.org`, but you can modify all URLs as needed.
1212

1313
> [!WARNING]
14-
> You might want to include libraries such as MapLibre GL JS directly in your project and serve them yourself instead of loading them from tiles.versatiles.org. We regularly update front-end libraries on our demo server. However, this could introduce breaking changes to your project at some point in the future.
14+
> You might want to include libraries such as MapLibre GL JS directly in your project and serve them yourself instead of loading them from tiles.versatiles.org. We regularly update frontend libraries on our demo server. However, this could introduce breaking changes to your project at some point in the future.
1515
16-
Loading the MapLibre libraries adds the global `maplibregl` variable to the JavaScript environment. Use `new maplibregl.Map()` to initialise your map.
16+
Loading the MapLibre library adds the global `maplibregl` variable to the JavaScript environment. Use `new maplibregl.Map()` to initialise your map.
1717

18-
To learn more about all the options provided by MapLibre, take a look at the documentation for the [Map class documentation](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/) and in general the [MapLibre API documentation](https://maplibre.org/maplibre-gl-js/docs/API/).
18+
To learn more about all the options provided by MapLibre, take a look at the documentation for the [Map class documentation](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/) and in general the [MapLibre API documentation](https://maplibre.org/maplibre-gl-js/docs/API/). We can also highly recommend all the [MapLibre examples](https://maplibre.org/maplibre-gl-js/docs/examples/).

playground/simple-style/text.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ title: Simple Style
33
description: How to style a simple OSM map.
44
---
55

6-
[MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) use styles to define your map. These styles are quite complex JavaScript objects that define data sources, layers, colors, fonts, symbols, etc. (If you later want to really fine tune your map you can find the complete specification here: [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/)) To make it easier to work with map styles, we've developed a [JavaScript library "versatiles-style"](https://github.com/versatiles-org/versatiles-style) to generate styles very fast and efficient in the frontend or the backend.
6+
[MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) use special `style` objects that define the appearance of your map. These `style` object are quite complex JavaScript objects that define data sources, layers, colors, fonts, symbols, etc. (If you later want to really fine tune your map you can find the complete specification here: [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/))
7+
8+
To make it easier to work with these map styles, we've developed the [JavaScript library "versatiles-style"](https://github.com/versatiles-org/versatiles-style) to generate styles very fast and efficient in the frontend or the backend.
79

810
Based on our [frontend specification](https://docs.versatiles.org/compendium/specification_frontend.html), the library should be ready to use under:
911

@@ -12,21 +14,22 @@ Based on our [frontend specification](https://docs.versatiles.org/compendium/spe
1214
Loading our library adds the global variable `VersaTilesStyle` to the JavaScript environment. To generate a style ready to use simply run:
1315

1416
```javascript
15-
const style = VersaTilesStyle.colorful();
17+
const style = VersaTilesStyle.colorful(); // <- generates a style
18+
1619
new maplibregl.Map({
17-
style // <- use the generated style
20+
style // <- use the style
1821
container: "map",
1922
})
2023
```
2124

2225
We also provide other functions to generate base styles, like `colorful`, `eclipse`, `graybeard` and `neutrino`.
2326

24-
All these style functions accept optional properties to adapt the styles, like:
27+
All these style functions accept optional properties to fine tune the styles, like:
2528

2629
```javascript
2730
{
28-
baseUrl: string; // host of the map server, like "https://example.org"
29-
bounds: [number, number, number, number]; // bbox of the initial view
31+
baseUrl: string; // host of your map server, like "https://example.org"
32+
bounds: [number, number, number, number]; // bounding box of the initial view
3033
colors: Partial<StyleBuilderColors>; // to change individual colors
3134
fonts: Partial<StyleBuilderFonts>; // to change the default fonts
3235
glyphs: string; // to change the url template of the fonts
@@ -38,7 +41,7 @@ All these style functions accept optional properties to adapt the styles, like:
3841
}
3942
```
4043

41-
So for example, the following code will generate a style without labels and tint it green to make it look like "Matrix" so people from the 90's will think your map looks cool.
44+
For example, the following code will generate a map style without labels and tint it green, making it look like the 'Matrix', which will make people from the '90s think your map looks cool.
4245

4346
```javascript
4447
const style = VersaTilesStyle.colorful({
@@ -58,7 +61,7 @@ To learn more about all the options provided by "versatiles-style", take a look
5861
- [StyleBuilderColors](https://versatiles.org/versatiles-style/interfaces/StyleBuilderColors.html) for the property `colors` to change individual colors.
5962

6063
> [!NOTE]\
61-
> ["versatiles-style"](https://github.com/versatiles-org/versatiles-style) helped us a lot to make it easier to work with map styles. That is way we plan to completely revamp the whole library in 2025.
64+
> ["versatiles-style"](https://github.com/versatiles-org/versatiles-style) helped us a lot in making it easier to work with map styles. However, many features are missing. That is why we plan to completely revamp the entire library in 2025.
6265
6366
> [!WARNING]
64-
> You might want to include libraries directly in your project and serve them yourself instead of loading them from tiles.versatiles.org. We regularly update front-end libraries on our demo server. However, this could introduce breaking changes to your project at some point in the future.
67+
> Instead of loading the libraries from tiles.versatiles.org, we recommend including them directly in your project and hosting them yourself. Since we regularly update the front-end libraries on our demo server, future updates may affect your project.

0 commit comments

Comments
 (0)