Skip to content

Commit 01343a8

Browse files
josxhaCopilot
andauthored
docs: update docs for v0.3.0 (#349)
Co-authored-by: Copilot <[email protected]>
1 parent 4ceaee0 commit 01343a8

File tree

10 files changed

+2439
-3832
lines changed

10 files changed

+2439
-3832
lines changed

docs/.yarn/install-state.gz

-125 KB
Binary file not shown.

docs/docs/getting-started/add-dependency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 10
33
---
44

55
# Add Dependency

docs/docs/getting-started/programmatic-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 60
33
---
44

55
# Programmatic Control

docs/docs/getting-started/setup-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 3
2+
sidebar_position: 20
33
---
44

55
# Setup Android
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
sidebar_position: 30
3+
---
4+
5+
# Setup iOS
6+
7+
## Activate the Swift Package Manager
8+
9+
The Swift Package Manager is available in Flutter 3.35 in the `stable`
10+
channel but needs to be enabled by running the following command:
11+
12+
```bash
13+
flutter config --enable-swift-package-manager
14+
```

docs/docs/getting-started/setup-web.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 4
2+
sidebar_position: 40
33
---
44

55
# Setup Web

docs/docs/getting-started/use-widget.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 4
2+
sidebar_position: 50
33
title: 'Use the Widget'
44
---
55

docs/docs/upgrade.md

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
sidebar_position: 100
3-
title: 'Upgrade from 0.1.x'
3+
title: 'Upgrade from 0.2.x'
44
---
55

6-
# Upgrade from version 0.1.x
6+
# Upgrade from version 0.2.x
77

8-
Version `0.2.0` introduced some breaking changes. This site will guide you
8+
Version `0.3.0` introduced some breaking changes. This site will guide you
99
through all of them.
1010

1111
## General Information on Breaking Changes
@@ -22,59 +22,52 @@ rules apply:
2222

2323
## Step-by-Step guide
2424

25-
### 1. Compatible Flutter Version
25+
### 1. iOS Support
2626

27-
Version `0.2.0` increased the minimum allowed version of Flutter
28-
to [3.24](https://medium.com/flutter/whats-new-in-flutter-3-24-6c040f87d1e4).
27+
Version `0.3.0` finally added iOS as a supported platform. Head over to
28+
[Setup iOS](getting-started/setup-ios) to read how to use.
2929

30-
Run `flutter upgrade` to upgrade Flutter.
30+
### 2. Migration to the `geobase` package
3131

32-
### 2. Name Changes
32+
`maplibre` was previously based on a package
33+
called [geotypes](https://pub.dev/packages/geotypes) for easy use
34+
with [turf](https://pub.dev/packages/turf). The package now uses the
35+
package [geobase](https://pub.dev/packages/geobase) instead.
36+
All `geobase` classes are exported together with the default `maplibre` import.
37+
Head over to the geobase documentation to learn on how to
38+
use: https://geospatial.navibyte.dev/v1/geobase/
39+
40+
The most noticeable change will be to change usages of `Position` to
41+
`Geographic`.
42+
43+
### 3. Name Changes
3344

3445
Some properties and class names have changed. Replace the old with the new
3546
names.
3647

37-
| Old Name | New Name |
38-
|-------------------------|-------------------------|
39-
| MapZoomButtons | MapControlButtons |
40-
| CircleLayer | CircleStyleLayer |
41-
| FillExtrusionLayer | FillExtrusionStyleLayer |
42-
| FillLayer | FillStyleLayer |
43-
| HeatmapLayer | HeatmapStyleLayer |
44-
| HillshadeLayer | HillshadeStyleLayer |
45-
| LineLayer | LineStyleLayer |
46-
| RasterLayer | RasterStyleLayer |
47-
| SymbolLayer | SymbolStyleLayer |
48-
| CircleAnnotationLayer | CircleLayer |
49-
| MarkerAnnotationLayer | MarkerLayer |
50-
| PolygonAnnotationLayer | PolygonLayer |
51-
| PolylineAnnotationLayer | PolylineLayer |
52-
53-
### 3. Programmatic Style Control
54-
55-
Style related functionality is now loaded in the new `StyleController`.
56-
For an easy migration, you can access it using the
57-
nullable `mapController.style` getter.
58-
59-
The `onStyleLoaded` callback now returns the `StyleController` of the loaded
60-
style: `onStyleLoaded: (style) { ... }`
61-
62-
### 4. Update your web integration
63-
64-
maplibre 0.2.0
65-
uses [MapLibre GL JS version 5.0.0](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.0.0)
66-
onwards. Open your `web/index.html` file and update the used library version.
67-
68-
```html title="web/index.html"
69-
<!DOCTYPE html>
70-
<html>
71-
<head>
72-
<!-- other html -->
73-
<!-- highlight-start -->
74-
<script src='https://unpkg.com/maplibre-gl@^5.0/dist/maplibre-gl.js'></script>
75-
<link href='https://unpkg.com/maplibre-gl@^5.0/dist/maplibre-gl.css'
76-
rel='stylesheet'/>
77-
<!-- highlight-end -->
78-
</head>
79-
</html>
80-
```
48+
| Old Name | New Name |
49+
|-----------------------------|-----------------------------------|
50+
| MapCompass.rotationDuration | MapCompass.nativeRotationDuration |
51+
52+
### 4. Changed return types and removed methods
53+
54+
With the ongoing effort towards a complete interop implementation, more methods
55+
are now called synchronously.
56+
57+
- `MapController.toScreenLocation()`
58+
- `MapController.toLngLat()`
59+
- `MapController.toScreenLocations()`
60+
- `MapController.toLngLats()`
61+
- `MapController.getMetersPerPixelAtLatitude()`
62+
- `MapController.getVisibleRegion()`
63+
- `MapController.queryLayers()`
64+
65+
Previously added synchronous overloads are no longer required and therefore
66+
removed.
67+
68+
- `MapController.toScreenLocationSync()`
69+
- `MapController.toLngLatSync()`
70+
- `MapController.toScreenLocationsSync()`
71+
- `MapController.toLngLatsSync()`
72+
- `MapController.getMetersPerPixelAtLatitudeSync()`
73+
- `MapController.getVisibleRegionSync()`

docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
"@docusaurus/module-type-aliases": "^3.8.1",
2929
"@docusaurus/tsconfig": "^3.8.1",
3030
"@docusaurus/types": "^3.8.1",
31+
"@types/shelljs": "^0",
32+
"shelljs": "^0.10.0",
3133
"typescript": "~5.9.2"
3234
},
3335
"browserslist": {

0 commit comments

Comments
 (0)