Skip to content

Commit ab5298f

Browse files
authored
Bump plugin version to 2.0.0 (#567)
1 parent ec68576 commit ab5298f

File tree

5 files changed

+63
-71
lines changed

5 files changed

+63
-71
lines changed

CHANGELOG.md

Lines changed: 59 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,4 @@
1-
### main
2-
3-
* Update Maps SDK to 11.4.0.
4-
5-
### 2.0.0-rc.1
6-
7-
* Update Maps SDK to 11.4.0-rc.2.
8-
9-
### 2.0.0-beta.1
10-
11-
* Introduce experimental `RasterArraySource`, note that `rasterLayers` is a get-only property and cannot be set.
12-
* Introduce `TileCacheBudget`, a property to set per-source cache budgets in either megabytes or tiles.
13-
* Expose `iconColorSaturation`, `rasterArrayBand`, `rasterElevation`, `rasterEmissiveStrength`, `hillshadeEmissiveStrength`, and `fillExtrusionEmissiveStrength` on their respective layers.
14-
* Mark `MapboxMapsOptions.get/setWorldview()` and `MapboxMapsOptions.get/setLanguage()` as experimental.
15-
* Bump Pigeon to 17.1.2
16-
* [iOS] Fix crash in `onStyleImageMissingListener`.
17-
* Deprecate `cameraForCoordinates`, please use `cameraForCoordinatesPadding` instead.
18-
* Add a way to disable default puck's image(s) when using `DefaultLocationPuck2D`. By passing an empty byte array, for example, the following code shows a puck 2D with custom top image, default bearing image and no shadow image.
19-
```
20-
mapboxMap?.location.updateSettings(LocationComponentSettings(
21-
enabled: true,
22-
puckBearingEnabled: true,
23-
locationPuck:
24-
LocationPuck(locationPuck2D: DefaultLocationPuck2D(topImage: list, shadowImage: Uint8List.fromList([]))))
25-
);
26-
```
27-
##### Snapshots
28-
29-
###### Standalone snapshotter
30-
31-
Show multiple maps at the same time with no performance penalty. With the all new `Snapshotter` you can get image snapshots of the map, styled the same way as `MapWidget`.
32-
33-
The `Snapshotter` class is highly configurable. You can set the final result at the time of construction using the `MapSnapshotOptions`. Once you've configured your snapshot, you can start the snapshotting process.
34-
35-
One of the key features of the `Snapshotter` class is the `style` object. This object can be manipulated to set different styles for your snapshot, as well as to apply runtime styling to the style, giving you the flexibility to create a snapshot that fits your needs.
36-
37-
```dart
38-
final snapshotter = await Snapshotter.create(
39-
options: MapSnapshotOptions(
40-
size: Size(width: 400, height: 400),
41-
pixelRatio: MediaQuery.of(context).devicePixelRatio),
42-
onStyleLoadedListener: (_) {
43-
// apply runtime styling
44-
final layer = CircleLayer(id: "circle-layer", sourceId: "poi-source");
45-
snapshotter?.style.addLayer(layer);
46-
},
47-
);
48-
snapshotter.style.setStyleURI(MapboxStyles.STANDARD);
49-
snapshotter.setCamera(CameraOptions(center: Point(...)));
50-
51-
...
52-
53-
final snapshotImage = await snapshotter.start()
54-
```
55-
##### Map widget snapshotting
56-
57-
Create snapshots of the map displayed in the `MapWidget` with `MapboxMap.snapshot()`. This new feature allows you to capture a static image of the current map view.
58-
59-
The `snapshot()` method captures the current state of the Mapbox map, including all visible layers, markers, and user interactions.
60-
61-
To use the snapshot() method, simply call it on your Mapbox map instance. The method will return a Future that resolves to the image of the current map view.
62-
63-
```dart
64-
final snapshotImage = await mapboxMap.snapshot();
65-
```
66-
67-
Please note that the `snapshot()` method works best if the Mapbox Map is fully loaded before capturing an image. If the map is not fully loaded, the method might return a blank image.
1+
### 2.0.0
682

693
#### ⚠️ Breaking changes
704

@@ -164,11 +98,69 @@ PolylineAnnotationOptions(
16498
])
16599
)
166100
```
101+
##### Snapshots
102+
103+
###### Standalone snapshotter
104+
105+
Show multiple maps at the same time with no performance penalty. With the all new `Snapshotter` you can get image snapshots of the map, styled the same way as `MapWidget`.
106+
107+
The `Snapshotter` class is highly configurable. You can set the final result at the time of construction using the `MapSnapshotOptions`. Once you've configured your snapshot, you can start the snapshotting process.
108+
109+
One of the key features of the `Snapshotter` class is the `style` object. This object can be manipulated to set different styles for your snapshot, as well as to apply runtime styling to the style, giving you the flexibility to create a snapshot that fits your needs.
110+
111+
```dart
112+
final snapshotter = await Snapshotter.create(
113+
options: MapSnapshotOptions(
114+
size: Size(width: 400, height: 400),
115+
pixelRatio: MediaQuery.of(context).devicePixelRatio),
116+
onStyleLoadedListener: (_) {
117+
// apply runtime styling
118+
final layer = CircleLayer(id: "circle-layer", sourceId: "poi-source");
119+
snapshotter?.style.addLayer(layer);
120+
},
121+
);
122+
snapshotter.style.setStyleURI(MapboxStyles.STANDARD);
123+
snapshotter.setCamera(CameraOptions(center: Point(...)));
124+
125+
...
126+
127+
final snapshotImage = await snapshotter.start()
128+
```
129+
##### Map widget snapshotting
130+
131+
Create snapshots of the map displayed in the `MapWidget` with `MapboxMap.snapshot()`. This new feature allows you to capture a static image of the current map view.
132+
133+
The `snapshot()` method captures the current state of the Mapbox map, including all visible layers, markers, and user interactions.
134+
135+
To use the snapshot() method, simply call it on your Mapbox map instance. The method will return a Future that resolves to the image of the current map view.
136+
137+
```dart
138+
final snapshotImage = await mapboxMap.snapshot();
139+
```
140+
141+
Please note that the `snapshot()` method works best if the Mapbox Map is fully loaded before capturing an image. If the map is not fully loaded, the method might return a blank image.
167142

168143
* Fix camera center not applied from map init options.
169144
* [iOS] Free up resources upon map widget disposal. This should help to reduce the amount of used memory when previously shown map widget is removed from the widget tree.
170145
* Fix multi-word enum cases decoding/encoding when being sent to/from the platform side.
171146
* [Android] Add Gradle 8 compatibility.
147+
* Introduce experimental `RasterArraySource`, note that `rasterLayers` is a get-only property and cannot be set.
148+
* Introduce `TileCacheBudget`, a property to set per-source cache budgets in either megabytes or tiles.
149+
* Expose `iconColorSaturation`, `rasterArrayBand`, `rasterElevation`, `rasterEmissiveStrength`, `hillshadeEmissiveStrength`, and `fillExtrusionEmissiveStrength` on their respective layers.
150+
* Mark `MapboxMapsOptions.get/setWorldview()` and `MapboxMapsOptions.get/setLanguage()` as experimental.
151+
* Bump Pigeon to 17.1.2
152+
* [iOS] Fix crash in `onStyleImageMissingListener`.
153+
* Deprecate `cameraForCoordinates`, please use `cameraForCoordinatesPadding` instead.
154+
* Add a way to disable default puck's image(s) when using `DefaultLocationPuck2D`. By passing an empty byte array, for example, the following code shows a puck 2D with custom top image, default bearing image and no shadow image.
155+
```dart
156+
mapboxMap?.location.updateSettings(LocationComponentSettings(
157+
enabled: true,
158+
puckBearingEnabled: true,
159+
locationPuck:
160+
LocationPuck(locationPuck2D: DefaultLocationPuck2D(topImage: list, shadowImage: Uint8List.fromList([]))))
161+
);
162+
```
163+
* Update Maps SDK to 11.4.0.
172164

173165
### 1.1.0
174166

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ To use the Maps Flutter Plugin add the git dependency to the pubspec.yaml:
111111

112112
```
113113
dependencies:
114-
mapbox_maps_flutter: ^2.0.0-beta.1
114+
mapbox_maps_flutter: ^2.0.0
115115
```
116116

117117
### Configure permissions

ios/mapbox_maps_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'mapbox_maps_flutter'
7-
s.version = '2.0.0-rc.1'
7+
s.version = '2.0.0'
88

99
s.summary = 'Mapbox Maps SDK Flutter Plugin.'
1010
s.description = 'An officially developed solution from Mapbox that enables use of our latest Maps SDK product.'

lib/src/map_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class _MapWidgetState extends State<MapWidget> {
187187
'textureView': widget.textureView,
188188
'styleUri': widget.styleUri,
189189
'channelSuffix': _suffix,
190-
'mapboxPluginVersion': '2.0.0-rc.1',
190+
'mapboxPluginVersion': '2.0.0',
191191
'eventTypes': _events.eventTypes.map((e) => e.index).toList(),
192192
};
193193

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mapbox_maps_flutter
22
description: A Flutter plugin for integrating Mapbox Maps SDK v11 in Android/iOS application.
3-
version: 2.0.0-rc.1
3+
version: 2.0.0
44
homepage: https://github.com/mapbox/mapbox-maps-flutter
55

66
environment:

0 commit comments

Comments
 (0)