11---
22sidebar_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
99through 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
3445Some properties and class names have changed. Replace the old with the new
3546names.
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() `
0 commit comments