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

M0 ios extension with merges changes from master in order to compile #7

Merged
merged 8 commits into from
Jul 22, 2021
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
5 changes: 1 addition & 4 deletions .github/workflows/flutter_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.26.0-17.5.pre'

channel: beta
- run: flutter pub get
- name: Lint analysis
Expand All @@ -35,7 +35,6 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.26.0-17.5.pre'
channel: beta
- run: flutter pub get
- name: Build example APK
Expand All @@ -55,7 +54,6 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.26.0-17.5.pre'
channel: beta
- run: flutter pub get
- name: build iOS package
Expand All @@ -76,7 +74,6 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.26.0-17.5.pre'
channel: beta
- run: flutter config --enable-web
- run: flutter pub get
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Flutter Maplibre GL

**This project is a fork of [https://github.com/tobrun/flutter-maplibre-gl](https://github.com/tobrun/flutter-maplibre-gl), aiming to replace its usage of Mapbox GL libraries with [Maplibre GL](https://github.com/maplibre) libraries.**
**This project is a fork of [https://github.com/tobrun/flutter-mapbox-gl](https://github.com/tobrun/flutter-mapbox-gl), aiming to replace its usage of Mapbox GL libraries with [Maplibre GL](https://github.com/maplibre) libraries.**

**This change isn't fully done, yet, and the project shouldn't be used at this time.**

Expand All @@ -19,13 +19,15 @@ This Flutter plugin allows to show embedded interactive and customizable vector

## Using the SDK in your project

This project is not yet available on [pub.dev](https://pub.dev/).
This project is not yet available on pub.dev.
You can use it by referencing it in your pubspec.yaml like this:
```yaml
dependencies:
...
maplibre_gl:
git: https://github.com/m0nac0/flutter-maplibre-gl.git
git:
url: https://github.com/m0nac0/flutter-maplibre-gl.git
ref: main
```
Compared to flutter-mapbox-gl, the only breaking API changes are:
- `MapboxMap` <--> `MaplibreMap`
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/Constants.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Mapbox
import MapboxAnnotationExtension
import MapLibreAnnotationExtension

/*
* The mapping is based on the values defined here:
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/Convert.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Mapbox
import MapboxAnnotationExtension
import MapLibreAnnotationExtension

class Convert {
class func interpretMapboxMapOptions(options: Any?, delegate: MapboxMapOptionsSink) {
Expand Down
6 changes: 3 additions & 3 deletions ios/Classes/MapboxMapController.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Flutter
import UIKit
import Mapbox
import MapboxAnnotationExtension
import MapLibreAnnotationExtension

class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, MapboxMapOptionsSink, MGLAnnotationControllerDelegate {

Expand Down Expand Up @@ -30,8 +30,8 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma

init(withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: Any?, registrar: FlutterPluginRegistrar) {
if let args = args as? [String: Any] {
if let token = args["accessToken"] as? NSString{
MGLAccountManager.accessToken = token
if let token = args["accessToken"]{
MGLAccountManager.accessToken = token as? String
}
}
mapView = MGLMapView(frame: frame)
Expand Down
4 changes: 2 additions & 2 deletions ios/maplibre_gl.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ A new Flutter plugin.
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'MaplibreAnnotationExtension', '~> 0.0.1-beta.2'
s.dependency 'MapLibre', '~> 5.10.0'
s.dependency 'MapLibreAnnotationExtension', '~> 0.0.1-beta.2'
s.dependency 'MapLibre', '~> 5.11.0'
s.swift_version = '4.2'
s.ios.deployment_target = '9.0'
end
Expand Down
7 changes: 4 additions & 3 deletions maplibre_gl_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
meta: ^1.1.7
meta: ^1.3.0
maplibre_gl_platform_interface:
git:
url: https://github.com/m0nac0/flutter-maplibre-gl.git
path: maplibre_gl_platform_interface
ref: main
mapbox_gl_dart: ^0.1.5
image: ^2.1.12
image: ^3.0.1

dependency_overrides:
maplibre_gl_platform_interface:
Expand All @@ -32,5 +33,5 @@ dev_dependencies:
sdk: flutter

environment:
sdk: ">=2.1.0 <2.12.0"
sdk: ">=2.1.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4"
6 changes: 4 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ dependencies:
maplibre_gl_platform_interface:
git:
url: https://github.com/m0nac0/flutter-maplibre-gl.git
path: mpalibre_gl_platform_interface
path: maplibre_gl_platform_interface
ref: main
maplibre_gl_web:
git:
url: https://github.com/m0nac0/flutter-maplibre-gl.git
path: maplibre_gl_web
ref: main

dependency_overrides:
maplibre_gl_platform_interface:
Expand All @@ -33,6 +35,6 @@ flutter:
default_package: mapbox_gl_web

environment:
sdk: ">=2.1.0 <2.12.0"
sdk: ">=2.1.0 <3.0.0"
# Flutter versions prior to 1.10 did not support the flutter.plugin.platforms map.
flutter: ">=1.10.0"