Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: rename Maplibre to MapLibre #441

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@

### Breaking changes

* All Dart enums have been migrated from mixed cases to lower camelcase
* All Dart enums have been migrated from mixed cases to lower camelcase
according to the `camel_case_types` lint rule.
* Move `MaplibreStyles` to the main `maplibre_gl` package. You can now use the
* Move `MapLibreStyles` to the main `maplibre_gl` package. You can now use the
demo style without adding `maplibre_gl_platform_interface` as a dependency.
* Updated maplibre-native for ios to v6.4.2. This introduces the new
iOS Metal renderer and the OpenGL ES renderer now uses OpenGL ES 3.0. Only
iOS Metal renderer and the OpenGL ES renderer now uses OpenGL ES 3.0. Only
iOS Devices with an Apple A7 GPU or later are supported onwards. See the
[maplibre-native changelog](https://github.com/maplibre/maplibre-native/blob/main/platform/ios/CHANGELOG.md#600)
for more information.
* Updated maplibre-native for android to v11.0.0. This version uses
OpenGL ES 3.0.
* Renamed the method channel to `plugins.flutter.io/maplibre_gl_*` in all packages.
* Updated maplibre-native for android to v11.0.0. This version uses
OpenGL ES 3.0. See the
[maplibre-native changelog](https://github.com/maplibre/maplibre-native/blob/main/platform/android/CHANGELOG.md#1100)
for more information.
* Renamed the method channel to `plugins.flutter.io/maplibre_gl_*` in all
packages.
* Renamed `Maplibre` to `MapLibre` to be in line with maplibre-native
(affects for example the classes MaplibreMap and MaplibreMapController).

## 0.19.0

Expand Down Expand Up @@ -110,7 +115,7 @@ builds).
```dart
@override
Widget build() {
return MaplibreMap(
return MapLibreMap(
myLocationRenderMode: MyLocationRenderMode.COMPASS,
// ...
);
Expand Down Expand Up @@ -158,15 +163,15 @@ at the end for a full changelog.
in [#179](https://github.com/maplibre/flutter-maplibre-gl/pull/179)
* Reenable textureMode which was disabled in f8b2d1 by @maxammann
in [#194](https://github.com/maplibre/flutter-maplibre-gl/pull/194)
* android: Bump Maplibre SDK to 9.6.0 & OkHttp to 4.9.3 by @mariusvn
* android: Bump MapLibre SDK to 9.6.0 & OkHttp to 4.9.3 by @mariusvn
in [#184](https://github.com/maplibre/flutter-maplibre-gl/pull/184)
* Added getSourceIds to the controller by @mariusvn
in [#197](https://github.com/maplibre/flutter-maplibre-gl/pull/197)
* Moved EventChannel creation in the downloadOfflineRegion method by @mariusvn
in [#205](https://github.com/maplibre/flutter-maplibre-gl/pull/205)
* Fix crash android dispose nullpointerdereference by @GaelleJoubert
in [#203](https://github.com/maplibre/flutter-maplibre-gl/pull/203)
* Migrate links in README, pubspec to Maplibre by @kuhnroyal
* Migrate links in README, pubspec to MapLibre by @kuhnroyal
in [#224](https://github.com/maplibre/flutter-maplibre-gl/pull/224)
* Update LICENSE file by @mariusvn
in [#230](https://github.com/maplibre/flutter-maplibre-gl/pull/230)
Expand Down Expand Up @@ -209,7 +214,7 @@ https://github.com/maplibre/flutter-maplibre-gl/compare/0.16.0...0.17.0
* cherry-picked all commits from upstream up
to [https://github.com/flutter-mapbox-gl/maps/commit/3496907955cd4b442e4eb905d67e8d46692174f1),
including up to release 0.16.0 from upstream
* updated Maplibre GL JS for web
* updated MapLibre GL JS for web

## 0.15.1, May 24, 2022

Expand Down Expand Up @@ -267,11 +272,11 @@ https://github.com/maplibre/flutter-maplibre-gl/compare/0.16.0...0.17.0
## 0.13.0, Oct 6, 2021

🎉 The first release of flutter-maplibre-gl with the complete transition to
Maplibre libraries. 🎉
MapLibre libraries. 🎉

Further improvements:

* Update to Maplibre-Android-SDK 9.4.2
* Update to MapLibre-Android-SDK 9.4.2
* Update to MapLibre-iOS-SDK 5.12.0
* Fix onUserLocationUpdated not firing on
android [#14](https://github.com/m0nac0/flutter-maplibre-gl/pull/14)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Flutter Maplibre GL
# Flutter MapLibre GL

[![Pub Version](https://img.shields.io/pub/v/maplibre_gl)](https://pub.dev/packages/maplibre_gl)
[![likes](https://img.shields.io/pub/likes/maplibre_gl?logo=flutter)](https://pub.dev/packages/maplibre_gl)
Expand Down Expand Up @@ -126,7 +126,7 @@ your `web/index.html` file:

## Map Styles

Map styles can be supplied by setting the `styleString` in the `MaplibreMap`
Map styles can be supplied by setting the `styleString` in the `MapLibreMap`
constructor. The following formats are supported:

1. Passing the URL of the map style. This should be a custom map style served
Expand Down
6 changes: 3 additions & 3 deletions example/lib/animate_camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class AnimateCamera extends StatefulWidget {
}

class AnimateCameraState extends State<AnimateCamera> {
late MaplibreMapController mapController;
late MapLibreMapController mapController;

void _onMapCreated(MaplibreMapController controller) {
void _onMapCreated(MapLibreMapController controller) {
mapController = controller;
}

Expand All @@ -41,7 +41,7 @@ class AnimateCameraState extends State<AnimateCamera> {
child: SizedBox(
width: 300.0,
height: 200.0,
child: MaplibreMap(
child: MapLibreMap(
onMapCreated: _onMapCreated,
initialCameraPosition:
const CameraPosition(target: LatLng(0.0, 0.0)),
Expand Down
14 changes: 7 additions & 7 deletions example/lib/annotation_order_maps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class AnnotationOrderBody extends StatefulWidget {
}

class _AnnotationOrderBodyState extends State<AnnotationOrderBody> {
late MaplibreMapController controllerOne;
late MaplibreMapController controllerTwo;
late MapLibreMapController controllerOne;
late MapLibreMapController controllerTwo;

final LatLng center = const LatLng(36.580664, 32.5563837);

Expand All @@ -44,7 +44,7 @@ class _AnnotationOrderBodyState extends State<AnnotationOrderBody> {
child: SizedBox(
width: 250.0,
height: 250.0,
child: MaplibreMap(
child: MapLibreMap(
onMapCreated: onMapCreatedOne,
onStyleLoadedCallback: () => onStyleLoaded(controllerOne),
initialCameraPosition: CameraPosition(
Expand Down Expand Up @@ -78,7 +78,7 @@ class _AnnotationOrderBodyState extends State<AnnotationOrderBody> {
child: SizedBox(
width: 250.0,
height: 250.0,
child: MaplibreMap(
child: MapLibreMap(
onMapCreated: onMapCreatedTwo,
onStyleLoadedCallback: () => onStyleLoaded(controllerTwo),
initialCameraPosition: CameraPosition(
Expand All @@ -102,15 +102,15 @@ class _AnnotationOrderBodyState extends State<AnnotationOrderBody> {
);
}

void onMapCreatedOne(MaplibreMapController controller) {
void onMapCreatedOne(MapLibreMapController controller) {
controllerOne = controller;
}

void onMapCreatedTwo(MaplibreMapController controller) {
void onMapCreatedTwo(MapLibreMapController controller) {
controllerTwo = controller;
}

void onStyleLoaded(MaplibreMapController controller) async {
void onStyleLoaded(MapLibreMapController controller) async {
await addImageFromAsset(
controller, "custom-marker", "assets/symbols/custom-marker.png");
controller.addSymbol(
Expand Down
6 changes: 3 additions & 3 deletions example/lib/attribution.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ class _AttributionBodyState extends State<AttributionBody> {
);
}

MaplibreMap buildMap(
MapLibreMap buildMap(
AttributionButtonPosition? attributionButtonPosition,
bool useDefaultAttributionPosition,
) {
if (useDefaultAttributionPosition) {
return MaplibreMap(
return MapLibreMap(
key: UniqueKey(),
initialCameraPosition: const CameraPosition(
target: LatLng(-33.852, 151.211),
Expand All @@ -87,7 +87,7 @@ class _AttributionBodyState extends State<AttributionBody> {
styleString: "assets/osm_style.json",
);
} else {
return MaplibreMap(
return MapLibreMap(
key: UniqueKey(),
initialCameraPosition: const CameraPosition(
target: LatLng(-33.852, 151.211),
Expand Down
6 changes: 3 additions & 3 deletions example/lib/click_annotations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class ClickAnnotationBodyState extends State<ClickAnnotationBody> {

static const LatLng center = LatLng(-33.88, 151.16);

MaplibreMapController? controller;
MapLibreMapController? controller;

void _onMapCreated(MaplibreMapController controller) {
void _onMapCreated(MapLibreMapController controller) {
this.controller = controller;
controller.onFillTapped.add(_onFillTapped);
controller.onCircleTapped.add(_onCircleTapped);
Expand Down Expand Up @@ -139,7 +139,7 @@ class ClickAnnotationBodyState extends State<ClickAnnotationBody> {

@override
Widget build(BuildContext context) {
return MaplibreMap(
return MapLibreMap(
annotationOrder: const [
AnnotationType.fill,
AnnotationType.line,
Expand Down
6 changes: 3 additions & 3 deletions example/lib/custom_marker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class CustomMarker extends StatefulWidget {
class CustomMarkerState extends State<CustomMarker> {
final _rnd = Random();

late MaplibreMapController _mapController;
late MapLibreMapController _mapController;
final _markers = <Marker>[];
final _markerStates = <MarkerState>[];

void _addMarkerStates(MarkerState markerState) {
_markerStates.add(markerState);
}

void _onMapCreated(MaplibreMapController controller) {
void _onMapCreated(MapLibreMapController controller) {
_mapController = controller;
controller.addListener(() {
if (controller.isCameraMoving) {
Expand Down Expand Up @@ -90,7 +90,7 @@ class CustomMarkerState extends State<CustomMarker> {
Widget build(BuildContext context) {
return Scaffold(
body: Stack(children: [
MaplibreMap(
MapLibreMap(
trackCameraPosition: true,
onMapCreated: _onMapCreated,
onMapLongClick: _onMapLongClickCallback,
Expand Down
6 changes: 3 additions & 3 deletions example/lib/full_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class FullMap extends StatefulWidget {
}

class FullMapState extends State<FullMap> {
MaplibreMapController? mapController;
MapLibreMapController? mapController;
var isLight = true;

_onMapCreated(MaplibreMapController controller) {
_onMapCreated(MapLibreMapController controller) {
mapController = controller;
}

Expand Down Expand Up @@ -52,7 +52,7 @@ class FullMapState extends State<FullMap> {
// ),
// ),
// ),
body: MaplibreMap(
body: MapLibreMap(
onMapCreated: _onMapCreated,
initialCameraPosition: const CameraPosition(target: LatLng(0.0, 0.0)),
onStyleLoadedCallback: _onStyleLoadedCallback,
Expand Down
6 changes: 3 additions & 3 deletions example/lib/get_map_informations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class GetMapInfoBody extends StatefulWidget {
}

class _GetMapInfoBodyState extends State<GetMapInfoBody> {
MaplibreMapController? controller;
MapLibreMapController? controller;
String data = '';

void onMapCreated(MaplibreMapController controller) {
void onMapCreated(MapLibreMapController controller) {
setState(() {
this.controller = controller;
});
Expand Down Expand Up @@ -60,7 +60,7 @@ class _GetMapInfoBodyState extends State<GetMapInfoBody> {
child: SizedBox(
width: 300.0,
height: 200.0,
child: MaplibreMap(
child: MapLibreMap(
initialCameraPosition: const CameraPosition(
target: LatLng(-33.852, 151.211),
zoom: 11.0,
Expand Down
6 changes: 3 additions & 3 deletions example/lib/given_bounds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class GivenBounds extends StatefulWidget {
}

class GivenBoundsState extends State<GivenBounds> {
late MaplibreMapController mapController;
late MapLibreMapController mapController;

void _onMapCreated(MaplibreMapController controller) {
void _onMapCreated(MapLibreMapController controller) {
mapController = controller;
}

Expand All @@ -41,7 +41,7 @@ class GivenBoundsState extends State<GivenBounds> {
child: SizedBox(
width: 300.0,
height: 200.0,
child: MaplibreMap(
child: MapLibreMap(
onMapCreated: _onMapCreated,
initialCameraPosition:
const CameraPosition(target: LatLng(0.0, 0.0)),
Expand Down
6 changes: 3 additions & 3 deletions example/lib/layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LayerBody extends StatefulWidget {
class LayerState extends State {
static const LatLng center = LatLng(-33.86711, 151.1947171);

late MaplibreMapController controller;
late MapLibreMapController controller;
Timer? bikeTimer;
Timer? filterTimer;
int filteredId = 0;
Expand All @@ -43,7 +43,7 @@ class LayerState extends State {
Center(
child: SizedBox(
height: 400.0,
child: MaplibreMap(
child: MapLibreMap(
dragEnabled: false,
myLocationEnabled: true,
onMapCreated: _onMapCreated,
Expand Down Expand Up @@ -139,7 +139,7 @@ class LayerState extends State {
]);
}

void _onMapCreated(MaplibreMapController controller) {
void _onMapCreated(MapLibreMapController controller) {
this.controller = controller;

controller.onFeatureTapped.add(onFeatureTap);
Expand Down
6 changes: 3 additions & 3 deletions example/lib/line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class LineBodyState extends State<LineBody> {

static const LatLng center = LatLng(-33.86711, 151.1947171);

MaplibreMapController? controller;
MapLibreMapController? controller;
int _lineCount = 0;
Line? _selectedLine;
final String _linePatternImage = "assets/fill/cat_silhouette_pattern.png";

void _onMapCreated(MaplibreMapController controller) {
void _onMapCreated(MapLibreMapController controller) {
this.controller = controller;
controller.onLineTapped.add(_onLineTapped);
}
Expand Down Expand Up @@ -154,7 +154,7 @@ class LineBodyState extends State<LineBody> {
Center(
child: SizedBox(
height: 400.0,
child: MaplibreMap(
child: MapLibreMap(
onMapCreated: _onMapCreated,
onStyleLoadedCallback: _onStyleLoadedCallback,
initialCameraPosition: const CameraPosition(
Expand Down
6 changes: 3 additions & 3 deletions example/lib/local_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LocalStyle extends StatefulWidget {
}

class LocalStyleState extends State<LocalStyle> {
MaplibreMapController? mapController;
MapLibreMapController? mapController;
String? styleAbsoluteFilePath;

@override
Expand All @@ -49,7 +49,7 @@ class LocalStyleState extends State<LocalStyle> {
});
}

void _onMapCreated(MaplibreMapController controller) {
void _onMapCreated(MapLibreMapController controller) {
mapController = controller;
}

Expand All @@ -64,7 +64,7 @@ class LocalStyleState extends State<LocalStyle> {
}

return Scaffold(
body: MaplibreMap(
body: MapLibreMap(
styleString: styleAbsoluteFilePath,
onMapCreated: _onMapCreated,
initialCameraPosition: const CameraPosition(target: LatLng(0.0, 0.0)),
Expand Down
Loading