diff --git a/.gitignore b/.gitignore
index 3a83c2f..fd6fc56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,27 +1,30 @@
-# See https://www.dartlang.org/guides/libraries/private-files
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
-# Files and directories created by pub
-.dart_tool/
-.packages
-build/
-# If you're building an application, you may want to check-in your pubspec.lock
-pubspec.lock
-
-# Directory created by dartdoc
-# If you don't generate documentation locally you can remove this line.
-doc/api/
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
-# dotenv environment variables file
-.env*
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
-# Avoid committing generated Javascript files:
-*.dart.js
-*.info.json # Produced by the --dump-info flag.
-*.js # When generated by dart2js. Don't specify *.js if your
- # project includes source files written in JavaScript.
-*.js_
-*.js.deps
-*.js.map
-
-.flutter-plugins
-.flutter-plugins-dependencies
+# Flutter/Dart/Pub related
+# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
+**/pubspec.lock <- breaks release pipeline for some reason
+**/doc/api/
+.dart_tool/
+.packages
+build/
\ No newline at end of file
diff --git a/.pubignore b/.pubignore
new file mode 100644
index 0000000..92dbd8e
--- /dev/null
+++ b/.pubignore
@@ -0,0 +1,31 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
+**/pubspec.lock
+**/doc/api/
+.dart_tool/
+.packages
+build/
+example/
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 328b15e..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "example",
- "cwd": "mapsindoors/example",
- "request": "launch",
- "type": "dart"
- },
- {
- "name": "example (profile mode)",
- "cwd": "mapsindoors/example",
- "request": "launch",
- "type": "dart",
- "flutterMode": "profile"
- },
- {
- "name": "example (release mode)",
- "cwd": "mapsindoors/example",
- "request": "launch",
- "type": "dart",
- "flutterMode": "release"
- }
- ]
-}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..a0ddf13
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,25 @@
+# Changelog
+
+## 2.1.0
+
+* Updated Mapsindoors SDKs
+ * Android to 4.2.10
+ * iOS to 4.2.13
+* Added `showRouteLegButtons` to `MPDirectionsRenderer`
+* Added `setLabelOptions` to `MapsindoorsWidget`
+
+## 2.0.1
+
+* RETRACTED
+
+## 2.0.0
+
+* Moved from mapsindoors to allow for multiple map providers
+* Changes to classes:
+ * MapControl
+ * MapControl has merged with the MapsIndoorsWidget, combining them into a single entity. the Widget will still be built in the build tree, and accepts a listener as a parameter to wait for the MapControl part to be initialized.
+* MapsIndoors
+ * Has been split up into functions on the namespace to align better with dart language standards. Some methods have changed naming to avoid collision with popular method and parameter naming (eg. MapsIndoors.load() is now loadMapsIndoors())
+* Changes to the Widget
+ * The MapsIndoorsWidget has been changed to be a UniqueWidget, this is to ensure that the underlying MapsIndoors in the platform code can function normally.
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 57109ca..900a227 100644
--- a/README.md
+++ b/README.md
@@ -9,60 +9,46 @@ A federated Flutter plugin for integrating with the native MapsIndoors SDK.
## Features
-
Use this plugin to:
-
- Show indoor mapping and navigation.
- Perform real-time wayfinding.
- See location live updates.
-
-This plugin is based on the MapsIndoors V4 SDK for Android and iOS. At the moment only Google Maps is supported.
+
+This plugin is based on the MapsIndoors-Mapbox V4 SDK for Android and iOS.
## Getting Started
-
-Add MapsIndoors version `1.0.0` to your `pubspec.yaml`.
-
+Add MapsIndoors to your `pubspec.yaml`.
```yaml
-mapsindoors: ^1.0.0
+mapsindoors_mapbox: ^2.0.1
```
### Android
-
+#### Setup
-#### Android Gooogle Maps Setup
-
-
-To get the underlying Google Map to function, you need to perform the following steps:
-
+To get the underlying Mapbox map to function, you need to perform the following steps:
1. Navigate to `android/app/src/main/res/value`.
-2. Create a file in this folder called `google_maps_api_key.xml`.
-3. Copy and paste the below code snippet and replace `YOUR_KEY_HERE` with your Google Maps API key.
-
-
+2. Create a file in this folder called `mapbox_api_key.xml`.
+3. Copy and paste the below code snippet and replace `YOUR_KEY_HERE` with your Mapbox API key.
```xml
- YOUR_KEY_HERE
+ YOUR_KEY_HERE
+ YOUR_KEY_HERE
```
-
-
#### MapsIndoors Gradle Setup
-
-The plugin Gradle project has trouble resolving the MapsIndoors dependency, so to ensure that it is resolved correctly, do the following:
-
+To ensure the plugin is able to resolve its MapsIndoors Gradle dependency, do the following:
1. Navigate to the app's project level `build.gradle`.
-2. add `maven { url 'https://maven.mapsindoors.com/' }` to `allprojects`/`repositories` after `mavenCentral()`
-
+2. add `maven { url 'https://maven.mapsindoors.com/' }` to `allprojects`/`repositories` after `mavenCentral()
```groovy
allprojects {
@@ -74,73 +60,95 @@ allprojects {
}
```
-
-
### iOS
-#### iOS Gooogle Maps Setup
+The MapsIndoors SDK requires iOS 13, so make sure that your podfile is configured for iOS 13. Add use_frameworks! inside your app target as well.
-
-To get the underlying Google Map to function, you need to perform the following steps:
+```
+platform :ios, '13.0
+
+target 'MyApp' do
+ use_frameworks!
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
+ end
+ ...
+end
+...
+```
#### Providing API key
-##### Swift
-
-1. Navigate to `iOS/Runner/AppDelegate.swift`.
-2. Import GoogleMaps on the class
-3. Add this code as the first line inside the application function: `GMSServices.provideAPIKey("YOUR GOOGLE MAPS API KEY HERE")`
-
-##### Objective-C
-
-1. Navigate to `iOS/Runner/AppDelegate.h`.
-2. Import `#import "GoogleMaps/GoogleMaps.h"` on the class.
-3. Add this code as the first line inside the application function: `[GMSServices provideAPIKey:@"YOUR GOOGLE MAPS API KEY HERE"];`
-
-#### Adding MapsIndoors script specific to Google Maps, to Podfile
-
-After this you should navigate into the iOS folder of your flutter project and add this script to the applications Podfile: [MapsIndoors podfile Post install](https://github.com/MapsIndoors/MapsIndoorsIOS/wiki/Podfile-post_install-v4)
+Navigate to your application settings and add your Mapbox public access token to info with the key MBXAccessToken
+Setup your secret access token for downloading the sdk. Read how to do this here: [Configure credentials](https://docs.mapbox.com/ios/maps/guides/install/#configure-credentials)
## Usage
-
This section has examples of code for the following tasks:
-
- [Showing your Map](#showing-your-map)
- [Showing a Route](#showing-a-route)
- [Searching Locations](#searching-locations)
- [Changing the look with DisplayRules](#changing-the-look-with-displayrules)
-
### Showing your Map
-
This snippet shows how to set up `MapsIndoors` in a Flutter application. First, the `MapsIndoorsWidget` is added to the application's build tree.
-
-Optionally we can add a `MPFloorSelector` to the map, here we use `MPDefaultFloorSelector` as it is provided with the MapsIndoors package. The selector must be added both to the build tree as well as to `MapControl` in order to function correctly.
-
+
+Optionally we can add a `MPFloorSelector` to the map. Here we use `MPDefaultFloorSelector` as it is provided with the MapsIndoors package. The selector must be added both to the build tree as well as to `MapControl` in order to function correctly.
+
Once `initState()` has been called, `MapsIndoors` begins initialization, and once that is done successfully, `MapControl` begins initialization.
-
-Once `MapControl` is initialize we can invoke the `goTo` method to move the camera to the default venue.
-
+
+Once `MapControl` is initialized we can invoke the `goTo` method to move the camera to the default venue.
```Dart
+import 'package:mapsindoors/mapsindoors.dart' as MapsIndoors;
+import 'package:mapsindoors/mapsindoors_library.dart';
+
+void main() {
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const MaterialApp(
+ // replace the string with your own api key
+ home: MapWidget("demo"),
+ );
+ }
+}
+
+class MapWidget extends StatefulWidget {
+ final String apiKey;
+
+ const MapWidget({Key? key, required this.apiKey}) : super(key: key);
+
+ @override
+ MapWidgetState createState() => MapWidgetState();
+}
+
class MapWidgetState extends State {
- // Lets build a floor selector widget here, we need to add this to MapControl later.
+ // Let's build a floor selector widget here, we need to add this to MapControl later.
final _floorSelectorWidget = MPDefaultFloorSelector();
// MapControl will be initialized after MapsIndoors.
- late final MapControl _mapControl;
+ late final MapsIndoorsWidget _mapController;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
// Add the MapsIndoors Widget to your Widget, it will automatically fill the container it is placed in.
- child: MapsIndoorsWidget(
+ child: _mapController = MapsIndoorsWidget(
// build with the default floor selector, this is optional.
floorSelector: _floorSelectorWidget,
+ readyListener: _mapControlReadyListener,
),
),
);
@@ -149,39 +157,30 @@ class MapWidgetState extends State {
@override
void initState() {
super.initState();
- // Start initializing mapsindoors, replace the string with your own api key.
- _mapsIndoorsReadyListener(MapsIndoors.load("your_mapsindoors_api_key"));
+ // Start initializing mapsindoors.
+ loadMapsIndoors(widget.apiKey);
}
- void _mapsIndoorsReadyListener(Future error) async {
- if ((await error) == null) {
- // if no errors occured during MapsIndoors load, then we can initialize MapControl
- // we use setFloorSelector to allow MapControl to fill out the floor selector widget with floor information
- MapControl.create(MPMapConfig().setFloorSelector(_floorSelectorWidget)).then((mc) async {
- _mapControl = mc;
- // After initialization, lets show some indoor maps, here we move the camera to the default venue.
- _mapControl.goTo(await MapsIndoors.getDefaultVenue());
- }).catchError((err) {
- print("Creating mapcontrol faced an issue: $err");
- });
+ void _mapControlReadyListener(MPError? error) async {
+ if (error == null) {
+ // if no errors occured during MapControl load, then we can start using the map
+ // Here we move the camera to the default venue.
+ _mapController.goTo(await getDefaultVenue());
+
} else {
- print("MapsIndoors faced an error: $error");
+ print("Creating mapcontrol faced an issue: $err");
}
}
}
```
-
-
### Showing a Route
-
-This code snippet initializes the `MPDirectionsService` and `MPDirectionsRenderer` classes, and uses `_mapControl` which have been initialized elsewhere.
-
+This code snippet initializes the `MPDirectionsService` and `MPDirectionsRenderer` classes, and uses `_mapControl` which has been initialized elsewhere.
+
The `showRouteToLocation` function is used to query a route from the user's current position to a specified location using `directionsService.getRoute()`.
-
+
If successful, the route is displayed on the map using `directionsRenderer.setRoute(route)`.
-
```Dart
// We assume MapControl has already been initialized
@@ -203,69 +202,61 @@ void showRouteToLocation(MPLocation location) async {
}
```
-
-
### Searching Locations
-
This code snippet shows a function called `searchForParking` that takes a single argument of type `MPPoint`. The function uses `MapsIndoors` to search for locations matching the query string `"parking"` near the point specified.
-
+
It mathces in the locations' descriptions, names, and external IDs to the query string. Once the search is complete, it is possible to update/get information from the locations (not specified in the code snippet).
-
```Dart
/// This method searches for locations
void searchForParking(MPPoint point) {
- final mpq = MPQueryBuilder();
+ final mpq = MPQuery.builder()
// Set the search string
- mpq.setQuery("parking");
+ ..setQuery("parking")
// Set the point where we would like to search around
- mpq.setNear(point);
+ ..setNear(point)
// We are searcing in the locations description, name and external id.
- mpq.setQueryProperties([MPLocationPropertyNames.description.name, MPLocationPropertyNames.name.name, MPLocationPropertyNames.externalId.name]);
+ ..setQueryProperties([MPLocationPropertyNames.description.name, MPLocationPropertyNames.name.name, MPLocationPropertyNames.externalId.name]);
// Apply the query on MapsIndoors.
- MapsIndoors.getLocationsByQuery(query: mpq.build()).then((locations) {
+ getLocationsByQuery(query: mpq.build()).then((locations) {
print("number of paring near the point: ${locations?.length}");
// do something with the locations
});
}
```
-
-
### Changing the look with DisplayRules
-
This code snippet shows three ways to manipulate display rules in the MapsIndoors SDK.
-
+
The `hideLocationsByDefault()` method hides all markers that are not explicitly visible by setting the main display rule to not visible.
-
+
The `showLocationsByDefault()` method ensures all markers are shown by setting the main display rule to visible.
-
+
The `changeTypePolygonColor(String type, String color)` method changes the fill color for all polygons belonging to a specific type. It gets the display rule for the specified type using `getDisplayRuleByName`, and sets the fill color using `setPolygonFillColor`.
-
+
These methods can all be used to customize the display of markers and polygons on the map.
-
```Dart
/// This method changes the main display rule to hide all markers,
/// This will cause all locations that are not explicitly visible to be hidden.
void hideLocationsByDefault() async {
- final MPDisplayRule? main = await MapsIndoors.getMainDisplayRule();
+ final MPDisplayRule? main = await getMainDisplayRule();
main?.setVisible(false);
}
/// This method changes the main display rule to show all markers,
/// This will cause all locations that are not explicitly visible to be shown.
void showLocationsByDefault() async {
- final MPDisplayRule? main = await MapsIndoors.getMainDisplayRule();
+ final MPDisplayRule? main = await getMainDisplayRule();
main?.setVisible(true);
}
/// This method changes the fill color for all polygons belonging to a specific [type]
/// the [color] MUST be a valid hex color string.
void changeTypePolygonColor(String type, String color) async {
- final MPDisplayRule? rule = await MapsIndoors.getDisplayRuleByName(type);
+ final MPDisplayRule? rule = await getDisplayRuleByName(type);
rule?.setPolygonFillColor(color);
}
-```
+```
\ No newline at end of file
diff --git a/mapsindoors_mapbox/dartdoc_options.yaml b/dartdoc_options.yaml
similarity index 100%
rename from mapsindoors_mapbox/dartdoc_options.yaml
rename to dartdoc_options.yaml
diff --git a/mapsindoors_mapbox/lib/core/mapsindoors.dart b/lib/core/mapsindoors.dart
similarity index 57%
rename from mapsindoors_mapbox/lib/core/mapsindoors.dart
rename to lib/core/mapsindoors.dart
index e6ccafd..095cc14 100644
--- a/mapsindoors_mapbox/lib/core/mapsindoors.dart
+++ b/lib/core/mapsindoors.dart
@@ -1,30 +1,37 @@
part of mapsindoors;
/// gets the platform name and build version
-Future getPlatformVersion() => UtilPlatform.instance.getPlatformVersion();
+Future getPlatformVersion() =>
+ UtilPlatform.instance.getPlatformVersion();
/// Loads content from the MapsIndoors solution matching the given API [key].
///
/// Use the [MPError] to determine if the SDK has loaded successfully.
-Future loadMapsIndoors(String key) => MapsindoorsPlatform.instance.load(key);
+Future loadMapsIndoors(String key) =>
+ MapsindoorsPlatform.instance.load(key);
/// Retrieve the default display rule (hardcoded display rule in the SDK).
///
/// Requires that [loadMapsIndoors] has successfully executed.
-Future getDefaultDisplayRule() => Future.value(MapsindoorsPlatform.instance.createDisplayRuleWithName("default"));
+Future getDefaultDisplayRule() => Future.value(
+ MapsindoorsPlatform.instance.createDisplayRuleWithName("default"));
/// Retrieve the main display rule (can be configured in the CMS).
///
/// Requires that [loadMapsIndoors] has successfully executed.
-Future getMainDisplayRule() => Future.value(MapsindoorsPlatform.instance.createDisplayRuleWithName("main"));
+Future getMainDisplayRule() => Future.value(
+ MapsindoorsPlatform.instance.createDisplayRuleWithName("main"));
/// Retrieve the display rule for the given [location]
///
/// Requires that [loadMapsIndoors] has successfully executed.
-Future getDisplayRuleByLocation(FutureOr location) async {
- final exists = await MapsindoorsPlatform.instance.locationDisplayRuleExists((await location).id);
+Future getDisplayRuleByLocation(
+ FutureOr location) async {
+ final exists = await MapsindoorsPlatform.instance
+ .locationDisplayRuleExists((await location).id);
if (exists == true) {
- return MapsindoorsPlatform.instance.createDisplayRuleWithName((await location).id.value);
+ return MapsindoorsPlatform.instance
+ .createDisplayRuleWithName((await location).id.value);
} else {
return null;
}
@@ -45,19 +52,25 @@ Future getDisplayRuleByName(String name) async {
/// Retrieve the corresponding display rule for the given [MPSolutionDisplayRuleEnum].
///
/// Requires that [loadMapsIndoors] has successfully executed.
-Future getSolutionDisplayRule(MPSolutionDisplayRuleEnum solutionDisplayRule) => Future.value(MapsindoorsPlatform.instance.createDisplayRuleWithName(solutionDisplayRule.name));
+Future getSolutionDisplayRule(
+ MPSolutionDisplayRuleEnum solutionDisplayRule) =>
+ Future.value(MapsindoorsPlatform.instance
+ .createDisplayRuleWithName(solutionDisplayRule.name));
/// Add a one time [listener] to be invoked when MapsIndoors is ready
-void addOnMapsIndoorsReadyListener(OnMapsIndoorsReadyListener listener) => MapsindoorsPlatform.instance.addOnMapsIndoorsReadyListener(listener);
+void addOnMapsIndoorsReadyListener(OnMapsIndoorsReadyListener listener) =>
+ MapsindoorsPlatform.instance.addOnMapsIndoorsReadyListener(listener);
/// Remove a MapsIndoors ready listener
-void removeOnMapsIndoorsReadyListener(OnMapsIndoorsReadyListener listener) => MapsindoorsPlatform.instance.removeOnMapsIndoorsReadyListener(listener);
+void removeOnMapsIndoorsReadyListener(OnMapsIndoorsReadyListener listener) =>
+ MapsindoorsPlatform.instance.removeOnMapsIndoorsReadyListener(listener);
/// Checks if there is on device data (embedded/locally stored) available. For this to return true,
/// data has to be available for all solution data types ([MPLocation], [MPBuilding]...)
///
/// Returns true if data is available, otherwise returns false
-Future checkOfflineDataAvailability() => MapsindoorsPlatform.instance.checkOfflineDataAvailability();
+Future checkOfflineDataAvailability() =>
+ MapsindoorsPlatform.instance.checkOfflineDataAvailability();
/// Clears the internal state of MapsIndoors SDK. Any loaded content is purged from memory.
///
@@ -67,7 +80,8 @@ void destroyMapsIndoors() => MapsindoorsPlatform.instance.destroy();
/// [disable] SDK event logging through MapsIndoors. No logs will be created or send with this disabled.
///
/// By default it is enabled. But disabled in the CMS meaning logs will be created but never uploaded.
-Future disableMapsIndoorsEventLogging(bool disable) => MapsindoorsPlatform.instance.disableEventLogging(disable);
+Future disableMapsIndoorsEventLogging(bool disable) =>
+ MapsindoorsPlatform.instance.disableEventLogging(disable);
/// Retrieves the API key that was set by using [loadMapsIndoors]
///
@@ -75,54 +89,69 @@ Future disableMapsIndoorsEventLogging(bool disable) => MapsindoorsPlatform
Future getAPIKey() => MapsindoorsPlatform.instance.getAPIKey();
/// Returns a list of the current solution's available languages
-Future?> getMapsIndoorsAvailableLanguages() => MapsindoorsPlatform.instance.getAvailableLanguages();
+Future?> getMapsIndoorsAvailableLanguages() =>
+ MapsindoorsPlatform.instance.getAvailableLanguages();
/// Gets a collection of all buildings for the current API key
-Future getBuildings() => MapsindoorsPlatform.instance.getBuildings();
+Future getBuildings() =>
+ MapsindoorsPlatform.instance.getBuildings();
/// Gets a collection of all categories for the current API key
-Future getCategories() => MapsindoorsPlatform.instance.getCategories();
+Future getCategories() =>
+ MapsindoorsPlatform.instance.getCategories();
/// Returns the current solution's default language
-Future getMapsIndoorsDefaultLanguage() => MapsindoorsPlatform.instance.getDefaultLanguage();
+Future getMapsIndoorsDefaultLanguage() =>
+ MapsindoorsPlatform.instance.getDefaultLanguage();
/// Gets the current SDK language
-Future getMapsIndoorsLanguage() => MapsindoorsPlatform.instance.getLanguage();
+Future getMapsIndoorsLanguage() =>
+ MapsindoorsPlatform.instance.getLanguage();
/// Retrieves a [MPLocation] by its [id]
-Future getLocationById(String id) => MapsindoorsPlatform.instance.getLocationById(id);
+Future getLocationById(String id) =>
+ MapsindoorsPlatform.instance.getLocationById(id);
/// Gets all locations (a list of [MPLocation] objects) for the current API Key
-Future?> getLocations() => MapsindoorsPlatform.instance.getLocations();
+Future?> getLocations() =>
+ MapsindoorsPlatform.instance.getLocations();
/// Runs a query on all the available [MPLocation]s with an optional [MPQuery] and/or [MPFilter]
-Future?> getLocationsByQuery({MPQuery? query, MPFilter? filter}) => MapsindoorsPlatform.instance.getLocationsByQuery(query, filter);
+Future?> getLocationsByQuery(
+ {MPQuery? query, MPFilter? filter}) =>
+ MapsindoorsPlatform.instance.getLocationsByQuery(query, filter);
/// Retrieves a list of [MPLocation]s by external [ids]
-Future?> getLocationsByExternalIds(List ids) => MapsindoorsPlatform.instance.getLocationsByExternalIds(ids);
+Future?> getLocationsByExternalIds(List ids) =>
+ MapsindoorsPlatform.instance.getLocationsByExternalIds(ids);
/// Gets a list of available map styles
-Future?> getMapStyles() => MapsindoorsPlatform.instance.getMapStyles();
+Future?> getMapStyles() =>
+ MapsindoorsPlatform.instance.getMapStyles();
/// Returns the current position provider, if any is set
-MPPositionProviderInterface? getPositionProvider() => MapsindoorsPlatform.instance.getPositionProvider();
+MPPositionProviderInterface? getPositionProvider() =>
+ MapsindoorsPlatform.instance.getPositionProvider();
/// Set a new position provider, or pass null to remove the current one
///
/// Positioning starts as soon as the provider is set and has produced a position
-void setPositionProvider(MPPositionProviderInterface? provider) => MapsindoorsPlatform.instance.setPositionProvider(provider);
+void setPositionProvider(MPPositionProviderInterface? provider) =>
+ MapsindoorsPlatform.instance.setPositionProvider(provider);
/// Gets the [MPSolution] for the current API key
Future getSolution() => MapsindoorsPlatform.instance.getSolution();
/// Gets a collection of all venues for the current API key
-Future getVenues() => MapsindoorsPlatform.instance.getVenues();
+Future getVenues() =>
+ MapsindoorsPlatform.instance.getVenues();
/// Check if the current API key is valid
Future isAPIKeyValid() => MapsindoorsPlatform.instance.isAPIKeyValid();
/// Check if [loadMapsIndoors] has been called
-Future isMapsIndoorsInitialized() => MapsindoorsPlatform.instance.isInitialized();
+Future isMapsIndoorsInitialized() =>
+ MapsindoorsPlatform.instance.isInitialized();
/// Check if the SDK is initialized and ready for use
Future isMapsIndoorsReady() => MapsindoorsPlatform.instance.isReady();
@@ -134,27 +163,34 @@ Future isMapsIndoorsReady() => MapsindoorsPlatform.instance.isReady();
/// the solution's default language ([MPSolution.defaultLanguage])
/// the current device language, if the MapsIndoors data isn't available (ie: first app run without network access)
///
-Future setMapsIndoorsLanguage(String language) => MapsindoorsPlatform.instance.setLanguage(language);
+Future setMapsIndoorsLanguage(String language) =>
+ MapsindoorsPlatform.instance.setLanguage(language);
/// Main data synchronization method
///
/// If not manually invoked, [MapsIndoorsWidget] will invoke it when built
-Future synchronizeMapsIndoorsContent() => MapsindoorsPlatform.instance.synchronizeContent();
+Future synchronizeMapsIndoorsContent() =>
+ MapsindoorsPlatform.instance.synchronizeContent();
/// Gets the User Roles for the current solution
///
/// Note that role names are localized
-Future getUserRoles() => MapsindoorsPlatform.instance.getUserRoles();
+Future getUserRoles() =>
+ MapsindoorsPlatform.instance.getUserRoles();
/// Returns the list of [MPUserRole] that is currently applied
-Future?> getAppliedUserRoles() => MapsindoorsPlatform.instance.getAppliedUserRoles();
+Future?> getAppliedUserRoles() =>
+ MapsindoorsPlatform.instance.getAppliedUserRoles();
/// Applies a list of [MPUserRole]s to the SDK which will get the UserRole specific locations.
-Future applyUserRoles(List userRoles) => MapsindoorsPlatform.instance.applyUserRoles(userRoles);
+Future applyUserRoles(List userRoles) =>
+ MapsindoorsPlatform.instance.applyUserRoles(userRoles);
/// Get a [MPGeocodeResult] that contains lists of [MPLocation] (grouped by [MPLocationType]),
/// where the [point] is inside the locations geometry. When no floor index is set, locations on all floors are queried.
-Future reverseGeoCode(MPPoint point) => MapsindoorsPlatform.instance.reverseGeoCode(point);
+Future reverseGeoCode(MPPoint point) =>
+ MapsindoorsPlatform.instance.reverseGeoCode(point);
/// Gets the default venue for this solution
-Future getDefaultVenue() => MapsindoorsPlatform.instance.getDefaultVenue();
+Future getDefaultVenue() =>
+ MapsindoorsPlatform.instance.getDefaultVenue();
diff --git a/mapsindoors_mapbox/lib/core/mapsindoors_widget.dart b/lib/core/mapsindoors_widget.dart
similarity index 84%
rename from mapsindoors_mapbox/lib/core/mapsindoors_widget.dart
rename to lib/core/mapsindoors_widget.dart
index 65bb730..0a11284 100644
--- a/mapsindoors_mapbox/lib/core/mapsindoors_widget.dart
+++ b/lib/core/mapsindoors_widget.dart
@@ -33,7 +33,8 @@ class MapsIndoorsWidget extends UniqueWidget {
this.useDefaultMapsIndoorsStyle = true,
}) : super(key: new GlobalObjectKey(MapsIndoorsWidget)) {
if (this.readyListener != null) {
- MapcontrolPlatform.instance.setOnMapControlReadyListener(this.readyListener!);
+ MapcontrolPlatform.instance
+ .setOnMapControlReadyListener(this.readyListener!);
}
}
@@ -56,8 +57,10 @@ class MapsIndoorsWidget extends UniqueWidget {
}
/// Select a building, optionally move the camera to the given building
- Future selectBuilding(FutureOr building, bool moveCamera) async {
- return MapcontrolPlatform.instance.selectBuilding(await building, moveCamera);
+ Future selectBuilding(
+ FutureOr building, bool moveCamera) async {
+ return MapcontrolPlatform.instance
+ .selectBuilding(await building, moveCamera);
}
/// Invoke this method to restore the map to its default state (POIs shown based on their display rules, etc.)
@@ -73,8 +76,10 @@ class MapsIndoorsWidget extends UniqueWidget {
}
/// Use this method to display temporary locations, not points of interests location. Use [clearFilter()] to exit this state
- Future setFilterWithLocations(List locations, MPFilterBehavior behavior) {
- return MapcontrolPlatform.instance.setFilterWithLocations(locations, behavior);
+ Future setFilterWithLocations(
+ List locations, MPFilterBehavior behavior) {
+ return MapcontrolPlatform.instance
+ .setFilterWithLocations(locations, behavior);
}
/// Shows or hides the [MPFloorSelectorInterface], i.e. hiding the View from [MapsIndoorsWidget]
@@ -165,8 +170,10 @@ class MapsIndoorsWidget extends UniqueWidget {
/// Optionally apply a [MPSelectionBehavior]
///
/// Use [deSelectLocation()] or send null instead of a [MPLocation] to un-select the location.
- Future selectLocation(FutureOr location, [MPSelectionBehavior? behavior]) async {
- return MapcontrolPlatform.instance.selectLocation(await location, behavior ?? MPSelectionBehavior.DEFAULT);
+ Future selectLocation(FutureOr location,
+ [MPSelectionBehavior? behavior]) async {
+ return MapcontrolPlatform.instance.selectLocation(
+ await location, behavior ?? MPSelectionBehavior.DEFAULT);
}
/// Selects a location based on a id string object.
@@ -175,7 +182,8 @@ class MapsIndoorsWidget extends UniqueWidget {
///
/// Use [deSelectLocation] or send null instead of a [MPLocation] to un-select the location.
Future selectLocationById(String id, [MPSelectionBehavior? behavior]) {
- return MapcontrolPlatform.instance.selectLocationById(id, behavior ?? MPSelectionBehavior.DEFAULT);
+ return MapcontrolPlatform.instance
+ .selectLocationById(id, behavior ?? MPSelectionBehavior.DEFAULT);
}
/// Returns the current [MPFloor] of the current [MPBuilding] in focus
@@ -211,7 +219,8 @@ class MapsIndoorsWidget extends UniqueWidget {
/// Enables live data on a specific domain and uses MapsIndoors standard graphic implementation
///
/// Uses a domainType string, use [LiveDataDomainTypes] to get supported strings
- Future enableLiveData(String domainType, [OnLiveLocationUpdateListener? listener]) {
+ Future enableLiveData(String domainType,
+ [OnLiveLocationUpdateListener? listener]) {
return MapcontrolPlatform.instance.enableLiveData(domainType, listener);
}
@@ -242,22 +251,28 @@ class MapsIndoorsWidget extends UniqueWidget {
/// Set a location selection listener, invoked when a location is selected,
/// either by tapping on it, or programmatically with [selectLocation]
- void setOnLocationSelectedListener(OnLocationSelectedListener? listener, [bool? consumeEvent]) {
- MapcontrolPlatform.instance.setOnLocationSelectedListener(listener, consumeEvent);
+ void setOnLocationSelectedListener(OnLocationSelectedListener? listener,
+ [bool? consumeEvent]) {
+ MapcontrolPlatform.instance
+ .setOnLocationSelectedListener(listener, consumeEvent);
}
/// Set a listener for when the map has been tapped
- void setOnMapClickListener(OnMapClickListener? listener, [bool? consumeEvent]) {
+ void setOnMapClickListener(OnMapClickListener? listener,
+ [bool? consumeEvent]) {
MapcontrolPlatform.instance.setOnMapClickListener(listener, consumeEvent);
}
/// Set a marker click event listener, invoked when a marker is clicked
- void setOnMarkerClickListener(OnMarkerClickListener? listener, [bool? consumeEvent]) {
- MapcontrolPlatform.instance.setOnMarkerClickListener(listener, consumeEvent);
+ void setOnMarkerClickListener(OnMarkerClickListener? listener,
+ [bool? consumeEvent]) {
+ MapcontrolPlatform.instance
+ .setOnMarkerClickListener(listener, consumeEvent);
}
/// Set a info window click listener, invoked when an info window is clicked
- void setOnMarkerInfoWindowClickListener(OnMarkerInfoWindowClickListener? listener) {
+ void setOnMarkerInfoWindowClickListener(
+ OnMarkerInfoWindowClickListener? listener) {
MapcontrolPlatform.instance.setOnMarkerInfoWindowClickListener(listener);
}
@@ -279,14 +294,29 @@ class MapsIndoorsWidget extends UniqueWidget {
}
/// Set a current building changed event listener, which is invoked when the currently selected building changes
- void setOnCurrentBuildingChangedListener(OnBuildingFoundAtCameraTargetListener? listener) {
+ void setOnCurrentBuildingChangedListener(
+ OnBuildingFoundAtCameraTargetListener? listener) {
MapcontrolPlatform.instance.setOnCurrentBuildingChangedListener(listener);
}
/// Set a current venue changed event listener, which is invoked when the currently selected venue changes
- void setOnCurrentVenueChangedListener(OnVenueFoundAtCameraTargetListener? listener) {
+ void setOnCurrentVenueChangedListener(
+ OnVenueFoundAtCameraTargetListener? listener) {
MapcontrolPlatform.instance.setOnCurrentVenueChangedListener(listener);
}
+
+ /// Change the appearance of the labels of POIs.
+ ///
+ /// [textSize] changes the size of the text in pts.
+ /// [color] changes the color of the text in RGB format.
+ /// [showHalo] enables/disables the white halo around the text.
+ ///
+ /// If any value is null, the corresponding field will not be updated.
+ Future setLabelOptions(
+ {num? textSize, String? color, bool showHalo = false}) {
+ return MapcontrolPlatform.instance
+ .setLabelOptions(textSize, color, showHalo);
+ }
}
class _MapsIndoorsState extends State {
@@ -308,7 +338,8 @@ class _MapsIndoorsState extends State {
"tileFadeInEnabled": widget.enabletileFadeIn,
"useDefaultMapsIndoorsStyle": widget.useDefaultMapsIndoorsStyle
}),
- "floorSelectorAutoFloorChange": widget.floorSelector?.isAutoFloorChangeEnabled == true
+ "floorSelectorAutoFloorChange":
+ widget.floorSelector?.isAutoFloorChangeEnabled == true
};
final floorSelector = widget.floorSelector ?? MPDefaultFloorSelector();
diff --git a/mapsindoors_mapbox/lib/core/mp_default_floor_selector.dart b/lib/core/mp_default_floor_selector.dart
similarity index 72%
rename from mapsindoors_mapbox/lib/core/mp_default_floor_selector.dart
rename to lib/core/mp_default_floor_selector.dart
index f22e7af..56ef8b4 100644
--- a/mapsindoors_mapbox/lib/core/mp_default_floor_selector.dart
+++ b/lib/core/mp_default_floor_selector.dart
@@ -11,7 +11,8 @@ class MPDefaultFloorSelector extends StatefulWidget with MPFloorSelector {
@override
set floors(List? floors) => callForwarder.setFloors?.call(floors);
@override
- set onFloorSelectionChangedListener(OnFloorSelectionChangedListener listener) {
+ set onFloorSelectionChangedListener(
+ OnFloorSelectionChangedListener listener) {
if (callForwarder.setOnFloorSelectionChangedListener != null) {
callForwarder.setOnFloorSelectionChangedListener?.call(listener);
} else {
@@ -20,15 +21,19 @@ class MPDefaultFloorSelector extends StatefulWidget with MPFloorSelector {
}
@override
- void setSelectedFloor(MPFloor floor) => callForwarder.setSelectedFloor?.call(floor);
+ void setSelectedFloor(MPFloor floor) =>
+ callForwarder.setSelectedFloor?.call(floor);
@override
- void setSelectedFloorByFloorIndex(int floorIndex) => callForwarder.setSelectedFloorByFloorIndex?.call(floorIndex);
+ void setSelectedFloorByFloorIndex(int floorIndex) =>
+ callForwarder.setSelectedFloorByFloorIndex?.call(floorIndex);
@override
- set userPositionFloor(int floorIndex) => callForwarder.setUserPositionFloor?.call(floorIndex);
+ set userPositionFloor(int floorIndex) =>
+ callForwarder.setUserPositionFloor?.call(floorIndex);
@override
void show(bool show) => callForwarder.show?.call(show);
@override
- void zoomLevelChanged(num newZoomLevel) => callForwarder.zoomLevelChanged?.call(newZoomLevel);
+ void zoomLevelChanged(num newZoomLevel) =>
+ callForwarder.zoomLevelChanged?.call(newZoomLevel);
@override
_FloorSelectorState createState() => _FloorSelectorState();
@@ -37,7 +42,8 @@ class MPDefaultFloorSelector extends StatefulWidget with MPFloorSelector {
class _Forwarder {
OnFloorSelectionChangedListener? listener;
Function(List? floors)? setFloors;
- Function(OnFloorSelectionChangedListener listener)? setOnFloorSelectionChangedListener;
+ Function(OnFloorSelectionChangedListener listener)?
+ setOnFloorSelectionChangedListener;
Function(MPFloor floor)? setSelectedFloor;
Function(int floorIndex)? setSelectedFloorByFloorIndex;
Function(int floorIndex)? setUserPositionFloor;
@@ -45,7 +51,8 @@ class _Forwarder {
Function(num newZoomLevel)? zoomLevelChanged;
}
-class _FloorSelectorState extends State implements MPFloorSelectorInterface {
+class _FloorSelectorState extends State
+ implements MPFloorSelectorInterface {
final List _floors = List.empty(growable: true);
OnFloorSelectionChangedListener? _listener;
bool _visible = true;
@@ -57,12 +64,16 @@ class _FloorSelectorState extends State implements MPFlo
void initState() {
super.initState();
widget.callForwarder.setFloors = (floors) => this.floors = floors;
- widget.callForwarder.setOnFloorSelectionChangedListener = (listener) => this.onFloorSelectionChangedListener = listener;
+ widget.callForwarder.setOnFloorSelectionChangedListener =
+ (listener) => this.onFloorSelectionChangedListener = listener;
widget.callForwarder.setSelectedFloor = (floor) => setSelectedFloor(floor);
- widget.callForwarder.setSelectedFloorByFloorIndex = (floorIndex) => setSelectedFloorByFloorIndex(floorIndex);
- widget.callForwarder.setUserPositionFloor = (floorIndex) => userPositionFloor = floorIndex;
+ widget.callForwarder.setSelectedFloorByFloorIndex =
+ (floorIndex) => setSelectedFloorByFloorIndex(floorIndex);
+ widget.callForwarder.setUserPositionFloor =
+ (floorIndex) => userPositionFloor = floorIndex;
widget.callForwarder.show = (show) => this.show(show);
- widget.callForwarder.zoomLevelChanged = (newZoomLevel) => zoomLevelChanged(newZoomLevel);
+ widget.callForwarder.zoomLevelChanged =
+ (newZoomLevel) => zoomLevelChanged(newZoomLevel);
if (widget.callForwarder.listener != null) {
this.onFloorSelectionChangedListener = widget.callForwarder.listener!;
}
@@ -92,7 +103,8 @@ class _FloorSelectorState extends State implements MPFlo
}
@override
- set onFloorSelectionChangedListener(OnFloorSelectionChangedListener listener) {
+ set onFloorSelectionChangedListener(
+ OnFloorSelectionChangedListener listener) {
setState(() {
_listener = listener;
});
@@ -137,7 +149,8 @@ class _FloorSelectorState extends State implements MPFlo
}
@override
- void zoomLevelChanged(num newZoomLevel) => show(newZoomLevel >= showOnZoomLevel);
+ void zoomLevelChanged(num newZoomLevel) =>
+ show(newZoomLevel >= showOnZoomLevel);
@override
Widget build(BuildContext context) {
@@ -166,5 +179,6 @@ class _FloorSelectorState extends State implements MPFlo
}
ButtonStyle _buttonStyleWithColor(Color color) {
- return ButtonStyle(backgroundColor: MaterialStateProperty.resolveWith((states) => color));
+ return ButtonStyle(
+ backgroundColor: MaterialStateProperty.resolveWith((states) => color));
}
diff --git a/mapsindoors_mapbox/lib/core/mp_directions_renderer.dart b/lib/core/mp_directions_renderer.dart
similarity index 50%
rename from mapsindoors_mapbox/lib/core/mp_directions_renderer.dart
rename to lib/core/mp_directions_renderer.dart
index ea613d0..5e2b0e6 100644
--- a/mapsindoors_mapbox/lib/core/mp_directions_renderer.dart
+++ b/lib/core/mp_directions_renderer.dart
@@ -2,7 +2,8 @@ part of mapsindoors;
class MPDirectionsRenderer {
/// Set a route to be rendered. This also resets the selected leg and step indices to 0.
- Future setRoute(MPRoute? route) => DirectionsRendererPlatform.instance.setRoute(route);
+ Future setRoute(MPRoute? route) =>
+ DirectionsRendererPlatform.instance.setRoute(route);
/// Clears the route from the map
Future clear() => DirectionsRendererPlatform.instance.clear();
@@ -15,37 +16,58 @@ class MPDirectionsRenderer {
/// Selects the previous leg if possible.
///
/// Has no effect if the first leg is selected
- Future previousLeg() => DirectionsRendererPlatform.instance.previousLeg();
+ Future previousLeg() =>
+ DirectionsRendererPlatform.instance.previousLeg();
/// Enable/Disable the polyline animation when displaying a route element on the map
- Future setAnimatedPolyline(bool animated, bool repeating, int durationMs) => DirectionsRendererPlatform.instance.setAnimatedPolyline(animated, repeating, durationMs);
+ Future setAnimatedPolyline(
+ bool animated, bool repeating, int durationMs) =>
+ DirectionsRendererPlatform.instance
+ .setAnimatedPolyline(animated, repeating, durationMs);
/// Set the colors of the polyline
- Future setPolyLineColors(String foreground, String background) => DirectionsRendererPlatform.instance.setPolyLineColors(foreground, background);
+ Future setPolyLineColors(String foreground, String background) =>
+ DirectionsRendererPlatform.instance
+ .setPolyLineColors(foreground, background);
/// Manually set the selected leg index on the route.
///
/// This may throw an exception if the resulting internal state is invalid (parsed index is out of bounds)
- Future selectLegIndex(int legIndex) => DirectionsRendererPlatform.instance.selectLegIndex(legIndex);
+ Future selectLegIndex(int legIndex) =>
+ DirectionsRendererPlatform.instance.selectLegIndex(legIndex);
/// Gets the currently selected leg's floor index.
- Future getSelectedLegFloorIndex() => DirectionsRendererPlatform.instance.getSelectedLegFloorIndex();
+ Future getSelectedLegFloorIndex() =>
+ DirectionsRendererPlatform.instance.getSelectedLegFloorIndex();
/// Set the duration of camera animations (ms).
///
/// If a duration < 0 then camera animations are disabled, and the camera will move instantly.
///
/// The value is 1000 ms by default
- Future setCameraAnimationDuration(int durationMs) => DirectionsRendererPlatform.instance.setCameraAnimationDuration(durationMs);
+ Future setCameraAnimationDuration(int durationMs) =>
+ DirectionsRendererPlatform.instance
+ .setCameraAnimationDuration(durationMs);
/// Set the [MPCameraViewFitMode] of the camera, when displaying route elements on the map.
///
/// The camera may be aligned to north, aligned with the first step, or aligned from
/// start point to end point.
- Future setCameraViewFitMode(MPCameraViewFitMode mpCameraViewFitMode) => DirectionsRendererPlatform.instance.setCameraViewFitMode(mpCameraViewFitMode);
+ Future setCameraViewFitMode(MPCameraViewFitMode mpCameraViewFitMode) =>
+ DirectionsRendererPlatform.instance
+ .setCameraViewFitMode(mpCameraViewFitMode);
/// Set a listener, which will be invoked when a new leg has been selected
///
/// This is used for when the forward/back markers are selected on the map
- Future setOnLegSelectedListener(OnLegSelectedListener? onLegSelectedListener) => DirectionsRendererPlatform.instance.setOnLegSelectedListener(onLegSelectedListener);
+ Future setOnLegSelectedListener(
+ OnLegSelectedListener? onLegSelectedListener) =>
+ DirectionsRendererPlatform.instance
+ .setOnLegSelectedListener(onLegSelectedListener);
+
+ /// Enable/Disable route leg buttons that are shown at the start and end of each leg.
+ ///
+ /// It is recommended to only disable these buttons in the case alternative UI has been created to allow for switching route legs.
+ Future showRouteLegButtons(bool show) =>
+ DirectionsRendererPlatform.instance.showRouteLegButtons(show);
}
diff --git a/mapsindoors_mapbox/lib/core/mp_directions_service.dart b/lib/core/mp_directions_service.dart
similarity index 64%
rename from mapsindoors_mapbox/lib/core/mp_directions_service.dart
rename to lib/core/mp_directions_service.dart
index e72cda0..7ba6b9e 100644
--- a/mapsindoors_mapbox/lib/core/mp_directions_service.dart
+++ b/lib/core/mp_directions_service.dart
@@ -18,18 +18,23 @@ class MPDirectionsService {
/// Add an avoidWayType, these are based on [OSM highways](https://wiki.openstreetmap.org/wiki/Key:highway)
///
/// Supported types are defined in [MPHighway]
- Future addAvoidWayType(String avoidWayType) => DirectionsServicePlatform.instance.addAvoidWayType(avoidWayType);
+ Future addAvoidWayType(String avoidWayType) =>
+ DirectionsServicePlatform.instance.addAvoidWayType(avoidWayType);
/// Clears all added avoidWayTypes
- Future clearWayType() => DirectionsServicePlatform.instance.clearWayType();
+ Future clearWayType() =>
+ DirectionsServicePlatform.instance.clearWayType();
/// Sets whether routes should use departure time or arrival time when using the transit travel mode
- Future setIsDeparture(bool isDeparture) => DirectionsServicePlatform.instance.setIsDeparture(isDeparture);
+ Future setIsDeparture(bool isDeparture) =>
+ DirectionsServicePlatform.instance.setIsDeparture(isDeparture);
/// Queries the routing network to generate a route from the [origin] to the [destination].
///
/// Can throw an [MPError] if unable to generate the route.
- Future getRoute({required MPPoint origin, required MPPoint destination}) => DirectionsServicePlatform.instance.getRoute(origin, destination);
+ Future getRoute(
+ {required MPPoint origin, required MPPoint destination}) =>
+ DirectionsServicePlatform.instance.getRoute(origin, destination);
/// defines the travel mode for routes, can be one of the following:
///
@@ -40,9 +45,11 @@ class MPDirectionsService {
/// driving
///
/// transit
- Future setTravelMode(String travelMode) => DirectionsServicePlatform.instance.setTravelMode(travelMode);
+ Future setTravelMode(String travelMode) =>
+ DirectionsServicePlatform.instance.setTravelMode(travelMode);
/// sets the wanted arrival/departure time for routes generated with this [MPDirectionsService],
/// this setting is used in conjunction with [setIsDeparture] and [setTravelMode]
- Future setTime(int time) => DirectionsServicePlatform.instance.setTime(time);
+ Future setTime(int time) =>
+ DirectionsServicePlatform.instance.setTime(time);
}
diff --git a/mapsindoors_mapbox/lib/core/mp_floor_selector.dart b/lib/core/mp_floor_selector.dart
similarity index 100%
rename from mapsindoors_mapbox/lib/core/mp_floor_selector.dart
rename to lib/core/mp_floor_selector.dart
diff --git a/mapsindoors_mapbox/lib/core/mp_map_label_font.dart b/lib/core/mp_map_label_font.dart
similarity index 100%
rename from mapsindoors_mapbox/lib/core/mp_map_label_font.dart
rename to lib/core/mp_map_label_font.dart
diff --git a/mapsindoors_mapbox/lib/mapsindoors.dart b/lib/mapsindoors.dart
similarity index 100%
rename from mapsindoors_mapbox/lib/mapsindoors.dart
rename to lib/mapsindoors.dart
diff --git a/mapsindoors_mapbox/CHANGELOG.md b/mapsindoors_mapbox/CHANGELOG.md
deleted file mode 100644
index 254eae5..0000000
--- a/mapsindoors_mapbox/CHANGELOG.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Changelog
-
-## 2.0.0
-
-* Moved from [mapsindoors](https://pub.dev/packages/mapsindoors) to allow for multiple map providers
-* Changes to classes:
- * MapControl
- * ``MapControl`` has merged with the ``MapsIndoorsWidget``, combining them into a single entity. the ``Widget`` will still be built in the build tree, and accepts a listener as a parameter to wait for the MapControl part to be initialized.
- * MapsIndoors
- * Has been split up into functions on the namespace to align better with dart language standards. Some methods have changed naming to avoid collision with popular method and parameter naming (eg. ``MapsIndoors.load()`` is now ``loadMapsIndoors()``)
-* Changes to the Widget
- * The ``MapsIndoorsWidget`` has been changed to be a [``UniqueWidget``](https://api.flutter.dev/flutter/widgets/UniqueWidget-class.html), this is to ensure that the underlying MapsIndoors in the platform code can function normally.
\ No newline at end of file
diff --git a/mapsindoors_mapbox/LICENSE b/mapsindoors_mapbox/LICENSE
deleted file mode 100644
index 75757d5..0000000
--- a/mapsindoors_mapbox/LICENSE
+++ /dev/null
@@ -1,11 +0,0 @@
-Copyright 2023 Mapspeople
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mapsindoors_mapbox/README.md b/mapsindoors_mapbox/README.md
deleted file mode 100644
index 8439be2..0000000
--- a/mapsindoors_mapbox/README.md
+++ /dev/null
@@ -1,293 +0,0 @@
-
-A federated Flutter plugin for integrating with the native MapsIndoors SDK.
-
-| Platform | Android | iOS |
-| ------------ | ------- | ----- |
-| **Supports** | SDK 21+ | 13.0+ |
-
-# ReadMe
-
-## Features
-
-
-Use this plugin to:
-
-
-- Show indoor mapping and navigation.
-- Perform real-time wayfinding.
-- See location live updates.
-
-This plugin is based on the MapsIndoors-Mabox V4 SDK for Android and iOS.
-
-## Getting Started
-
-
-Add MapsIndoors version `2.0.0` to your `pubspec.yaml`.
-
-
-```yaml
-mapsindoors_mapbox: ^2.0.0
-```
-
-### Android
-
-
-
-#### Android Gooogle Maps Setup
-
-
-To get the underlying Mapbox map to function, you need to perform the following steps:
-
-
-1. Navigate to `android/app/src/main/res/value`.
-2. Create a file in this folder called `mapbox_api_key.xml`.
-3. Copy and paste the below code snippet and replace `YOUR_KEY_HERE` with your Mapbox API key.
-
-
-
-```xml
-
-
- YOUR_KEY_HERE
- YOUR_KEY_HERE
-
-
-```
-
-
-
-#### MapsIndoors Gradle Setup
-
-
-The plugin Gradle project has trouble resolving the MapsIndoors dependency, so to ensure that it is resolved correctly, do the following:
-
-
-1. Navigate to the app's project level `build.gradle`.
-2. add `maven { url 'https://maven.mapsindoors.com/' }` to `allprojects`/`repositories` after `mavenCentral()`
-
-
-```groovy
-allprojects {
- repositories {
- google()
- mavenCentral()
- maven { url 'https://maven.mapsindoors.com/' }
- }
-}
-```
-
-
-
-### iOS
-
-The MapsIndoors SDK requires iOS 13, so make sure that your podfile is configured for iOS 13. Add !use_frameworks inside your app target as well.
-
-```
-platform :ios, '13.0
-
-target 'MyApp' do
- use_frameworks!
-
-post_install do |installer|
- installer.pods_project.targets.each do |target|
- target.build_configurations.each do |config|
- config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
- end
- ...
-end
-...
-```
-
-#### Providing API key
-Navigate to your application settings and add your Mapbox public access token to info with the key MBXAccessToken
-Setup your secret access token for downloading the sdk. Read how to do this here: [Configure credentials](https://docs.mapbox.com/ios/maps/guides/install/#configure-credentials)
-
-## Usage
-
-
-This section has examples of code for the following tasks:
-
-
-- [Showing your Map](#showing-your-map)
-- [Showing a Route](#showing-a-route)
-- [Searching Locations](#searching-locations)
-- [Changing the look with DisplayRules](#changing-the-look-with-displayrules)
-
-
-
-### Showing your Map
-
-
-This snippet shows how to set up `MapsIndoors` in a Flutter application. First, the `MapsIndoorsWidget` is added to the application's build tree.
-
-Optionally we can add a `MPFloorSelector` to the map. Here we use `MPDefaultFloorSelector` as it is provided with the MapsIndoors package. The selector must be added both to the build tree as well as to `MapControl` in order to function correctly.
-
-Once `initState()` has been called, `MapsIndoors` begins initialization, and once that is done successfully, `MapControl` begins initialization.
-
-Once `MapControl` is initialized we can invoke the `goTo` method to move the camera to the default venue.
-
-
-```Dart
-import 'package:mapsindoors/mapsindoors.dart' as MapsIndoors;
-import 'package:mapsindoors/mapsindoors_library.dart';
-
-void main() {
- runApp(const MyApp());
-}
-
-class MyApp extends StatelessWidget {
- const MyApp({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const MaterialApp(
- // replace the string with your own api key
- home: MapWidget("demo"),
- );
- }
-}
-
-class MapWidget extends StatefulWidget {
- final String apiKey;
-
- const MapWidget({Key? key, required this.apiKey}) : super(key: key);
-
- @override
- MapWidgetState createState() => MapWidgetState();
-}
-
-class MapWidgetState extends State {
- // Let's build a floor selector widget here, we need to add this to MapControl later.
- final _floorSelectorWidget = MPDefaultFloorSelector();
- // MapControl will be initialized after MapsIndoors.
- late final MapsIndoorsWidget _mapController;
-
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Container(
- // Add the MapsIndoors Widget to your Widget, it will automatically fill the container it is placed in.
- child: _mapController = MapsIndoorsWidget(
- // build with the default floor selector, this is optional.
- floorSelector: _floorSelectorWidget,
- readyListener: _mapControlReadyListener,
- ),
- ),
- );
- }
-
- @override
- void initState() {
- super.initState();
- // Start initializing mapsindoors.
- loadMapsIndoors(widget.apiKey);
- }
-
- void _mapControlReadyListener(MPError? error) async {
- if (error == null) {
- // if no errors occured during MapControl load, then we can start using the map
- // Here we move the camera to the default venue.
- _mapController.goTo(await getDefaultVenue());
-
- } else {
- print("Creating mapcontrol faced an issue: $err");
- }
- }
-}
-```
-
-### Showing a Route
-
-This code snippet initializes the `MPDirectionsService` and `MPDirectionsRenderer` classes, and uses `_mapControl` which has been initialized elsewhere.
-
-The `showRouteToLocation` function is used to query a route from the user's current position to a specified location using `directionsService.getRoute()`.
-
-If successful, the route is displayed on the map using `directionsRenderer.setRoute(route)`.
-
-
-```Dart
-// We assume MapControl has already been initialized
-late final _mapControl;
-
-// The user is positioned somewhere in the world
-var _userLocation = MPPoint.withCoordinates(longitude: -98.44, latitude: 35.16);
-/// Query a route to a location from the user's position
-void showRouteToLocation(MPLocation location) async {
- // initialize services
- final directionsService = MPDirectionsService();
- final directionsRenderer = MPDirectionsRenderer();
-
- // get the route from userlocation to the location
- directionsService.getRoute(origin: _userPosition, destination: location.point).then((route) {
- // When we have the route, we can show it on the map
- directionsRenderer.setRoute(route);
- }).catchError((err) => print("An error occured: $err")); // otherwise handle the error
-}
-```
-
-
-
-### Searching Locations
-
-
-This code snippet shows a function called `searchForParking` that takes a single argument of type `MPPoint`. The function uses `MapsIndoors` to search for locations matching the query string `"parking"` near the point specified.
-
-It mathces in the locations' descriptions, names, and external IDs to the query string. Once the search is complete, it is possible to update/get information from the locations (not specified in the code snippet).
-
-
-```Dart
-/// This method searches for locations
-void searchForParking(MPPoint point) {
- final mpq = MPQuery.builder()
- // Set the search string
- ..setQuery("parking")
- // Set the point where we would like to search around
- ..setNear(point)
- // We are searcing in the locations description, name and external id.
- ..setQueryProperties([MPLocationPropertyNames.description.name, MPLocationPropertyNames.name.name, MPLocationPropertyNames.externalId.name]);
- // Apply the query on MapsIndoors.
- getLocationsByQuery(query: mpq.build()).then((locations) {
- print("number of paring near the point: ${locations?.length}");
- // do something with the locations
- });
-}
-```
-
-
-
-### Changing the look with DisplayRules
-
-
-This code snippet shows three ways to manipulate display rules in the MapsIndoors SDK.
-
-The `hideLocationsByDefault()` method hides all markers that are not explicitly visible by setting the main display rule to not visible.
-
-The `showLocationsByDefault()` method ensures all markers are shown by setting the main display rule to visible.
-
-The `changeTypePolygonColor(String type, String color)` method changes the fill color for all polygons belonging to a specific type. It gets the display rule for the specified type using `getDisplayRuleByName`, and sets the fill color using `setPolygonFillColor`.
-
-These methods can all be used to customize the display of markers and polygons on the map.
-
-
-```Dart
-/// This method changes the main display rule to hide all markers,
-/// This will cause all locations that are not explicitly visible to be hidden.
-void hideLocationsByDefault() async {
- final MPDisplayRule? main = await getMainDisplayRule();
- main?.setVisible(false);
-}
-
-/// This method changes the main display rule to show all markers,
-/// This will cause all locations that are not explicitly visible to be shown.
-void showLocationsByDefault() async {
- final MPDisplayRule? main = await getMainDisplayRule();
- main?.setVisible(true);
-}
-
-/// This method changes the fill color for all polygons belonging to a specific [type]
-/// the [color] MUST be a valid hex color string.
-void changeTypePolygonColor(String type, String color) async {
- final MPDisplayRule? rule = await getDisplayRuleByName(type);
- rule?.setPolygonFillColor(color);
-}
-```
diff --git a/mapsindoors_mapbox/example/LICENSE b/mapsindoors_mapbox/example/LICENSE
deleted file mode 100644
index 75757d5..0000000
--- a/mapsindoors_mapbox/example/LICENSE
+++ /dev/null
@@ -1,11 +0,0 @@
-Copyright 2023 Mapspeople
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mapsindoors_mapbox/example/README.md b/mapsindoors_mapbox/example/README.md
deleted file mode 100644
index abdbdec..0000000
--- a/mapsindoors_mapbox/example/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# mapsindoors_example
-
-Demonstrates how to use the mapsindoors plugin.
-
-## Getting Started
-
-This project is a starting point for a Flutter application.
-
-A few resources to get you started if this is your first Flutter project:
-
-- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
-- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
-
-For help getting started with Flutter development, view the
-[online documentation](https://docs.flutter.dev/), which offers tutorials,
-samples, guidance on mobile development, and a full API reference.
diff --git a/mapsindoors_mapbox/example/analysis_options.yaml b/mapsindoors_mapbox/example/analysis_options.yaml
deleted file mode 100644
index 61b6c4d..0000000
--- a/mapsindoors_mapbox/example/analysis_options.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-# This file configures the analyzer, which statically analyzes Dart code to
-# check for errors, warnings, and lints.
-#
-# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
-# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
-# invoked from the command line by running `flutter analyze`.
-
-# The following line activates a set of recommended lints for Flutter apps,
-# packages, and plugins designed to encourage good coding practices.
-include: package:flutter_lints/flutter.yaml
-
-linter:
- # The lint rules applied to this project can be customized in the
- # section below to disable rules from the `package:flutter_lints/flutter.yaml`
- # included above or to enable additional rules. A list of all available lints
- # and their documentation is published at
- # https://dart-lang.github.io/linter/lints/index.html.
- #
- # Instead of disabling a lint rule for the entire project in the
- # section below, it can also be suppressed for a single line of code
- # or a specific dart file by using the `// ignore: name_of_lint` and
- # `// ignore_for_file: name_of_lint` syntax on the line or in the file
- # producing the lint.
- rules:
- # avoid_print: false # Uncomment to disable the `avoid_print` rule
- # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
-
-# Additional information about this file can be found at
-# https://dart.dev/guides/language/analysis-options
diff --git a/mapsindoors_mapbox/example/android/.gitignore b/mapsindoors_mapbox/example/android/.gitignore
deleted file mode 100644
index 6f56801..0000000
--- a/mapsindoors_mapbox/example/android/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-gradle-wrapper.jar
-/.gradle
-/captures/
-/gradlew
-/gradlew.bat
-/local.properties
-GeneratedPluginRegistrant.java
-
-# Remember to never publicly share your keystore.
-# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
-key.properties
-**/*.keystore
-**/*.jks
diff --git a/mapsindoors_mapbox/example/android/app/build.gradle b/mapsindoors_mapbox/example/android/app/build.gradle
deleted file mode 100644
index d9d574a..0000000
--- a/mapsindoors_mapbox/example/android/app/build.gradle
+++ /dev/null
@@ -1,71 +0,0 @@
-def localProperties = new Properties()
-def localPropertiesFile = rootProject.file('local.properties')
-if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
- }
-}
-
-def flutterRoot = localProperties.getProperty('flutter.sdk')
-if (flutterRoot == null) {
- throw new FileNotFoundException()("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
-}
-
-def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
-if (flutterVersionCode == null) {
- flutterVersionCode = '1'
-}
-
-def flutterVersionName = localProperties.getProperty('flutter.versionName')
-if (flutterVersionName == null) {
- flutterVersionName = '1.0'
-}
-
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
-
-android {
- compileSdkVersion flutter.compileSdkVersion
- ndkVersion flutter.ndkVersion
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- kotlinOptions {
- jvmTarget = '1.8'
- }
-
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
-
- defaultConfig {
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.mapspeople.mapsindoors_example"
- // You can update the following values to match your application needs.
- // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
- minSdkVersion 21
- targetSdkVersion flutter.targetSdkVersion
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
- }
-
- buildTypes {
- release {
- // TODO: Add your own signing config for the release build.
- // Signing with the debug keys for now, so `flutter run --release` works.
- signingConfig signingConfigs.debug
- }
- }
-}
-
-flutter {
- source '../..'
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-}
diff --git a/mapsindoors_mapbox/example/android/app/src/debug/AndroidManifest.xml b/mapsindoors_mapbox/example/android/app/src/debug/AndroidManifest.xml
deleted file mode 100644
index b7a9a99..0000000
--- a/mapsindoors_mapbox/example/android/app/src/debug/AndroidManifest.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
diff --git a/mapsindoors_mapbox/example/android/app/src/main/AndroidManifest.xml b/mapsindoors_mapbox/example/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 990a02d..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/android/app/src/main/kotlin/com/mapspeople/mapsindoors_example/MainActivity.kt b/mapsindoors_mapbox/example/android/app/src/main/kotlin/com/mapspeople/mapsindoors_example/MainActivity.kt
deleted file mode 100644
index 1a7080b..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/kotlin/com/mapspeople/mapsindoors_example/MainActivity.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.mapspeople.mapsindoors_example
-
-import io.flutter.embedding.android.FlutterActivity
-
-class MainActivity: FlutterActivity() {
-}
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/drawable-v21/launch_background.xml b/mapsindoors_mapbox/example/android/app/src/main/res/drawable-v21/launch_background.xml
deleted file mode 100644
index f74085f..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/res/drawable-v21/launch_background.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/drawable/launch_background.xml b/mapsindoors_mapbox/example/android/app/src/main/res/drawable/launch_background.xml
deleted file mode 100644
index 304732f..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/res/drawable/launch_background.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index db77bb4..0000000
Binary files a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index 17987b7..0000000
Binary files a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 09d4391..0000000
Binary files a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index d5f1c8d..0000000
Binary files a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 4d6372e..0000000
Binary files a/mapsindoors_mapbox/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/values-night/styles.xml b/mapsindoors_mapbox/example/android/app/src/main/res/values-night/styles.xml
deleted file mode 100644
index 06952be..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/res/values-night/styles.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/values/mapbox_api_key.xml b/mapsindoors_mapbox/example/android/app/src/main/res/values/mapbox_api_key.xml
deleted file mode 100644
index 02474a9..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/res/values/mapbox_api_key.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- YOUR_KEY_HERE
- YOUR_KEY_HERE
-
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/values/strings.xml b/mapsindoors_mapbox/example/android/app/src/main/res/values/strings.xml
deleted file mode 100644
index 0d2c4cc..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/mapsindoors_mapbox/example/android/app/src/main/res/values/styles.xml b/mapsindoors_mapbox/example/android/app/src/main/res/values/styles.xml
deleted file mode 100644
index cb1ef88..0000000
--- a/mapsindoors_mapbox/example/android/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/android/app/src/profile/AndroidManifest.xml b/mapsindoors_mapbox/example/android/app/src/profile/AndroidManifest.xml
deleted file mode 100644
index b7a9a99..0000000
--- a/mapsindoors_mapbox/example/android/app/src/profile/AndroidManifest.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
diff --git a/mapsindoors_mapbox/example/android/build.gradle b/mapsindoors_mapbox/example/android/build.gradle
deleted file mode 100644
index 735e7c1..0000000
--- a/mapsindoors_mapbox/example/android/build.gradle
+++ /dev/null
@@ -1,45 +0,0 @@
-buildscript {
- ext.kotlin_version = '1.6.10'
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.1.2'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- maven { url 'https://maven.mapsindoors.com/' }
- maven {
- url 'https://api.mapbox.com/downloads/v2/releases/maven'
- authentication {
- basic(BasicAuthentication)
- }
- credentials {
- // Do not change the username below.
- // This should always be `mapbox` (not your username).
- username = "mapbox"
- // Use the secret token you stored in gradle.properties as the password
- password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
- }
- }
- }
-}
-
-rootProject.buildDir = '../build'
-subprojects {
- project.buildDir = "${rootProject.buildDir}/${project.name}"
-}
-subprojects {
- project.evaluationDependsOn(':app')
-}
-
-tasks.register("clean", Delete) {
- delete rootProject.buildDir
-}
diff --git a/mapsindoors_mapbox/example/android/gradle.properties b/mapsindoors_mapbox/example/android/gradle.properties
deleted file mode 100644
index 7a0bbf3..0000000
--- a/mapsindoors_mapbox/example/android/gradle.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-org.gradle.jvmargs=-Xmx1536M
-android.useAndroidX=true
-android.enableJetifier=true
-MAPBOX_DOWNLOADS_TOKEN=YOUR_KEY_HERE
\ No newline at end of file
diff --git a/mapsindoors_mapbox/example/android/gradle/wrapper/gradle-wrapper.properties b/mapsindoors_mapbox/example/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index cb24abd..0000000
--- a/mapsindoors_mapbox/example/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/mapsindoors_mapbox/example/android/settings.gradle b/mapsindoors_mapbox/example/android/settings.gradle
deleted file mode 100644
index 44e62bc..0000000
--- a/mapsindoors_mapbox/example/android/settings.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-include ':app'
-
-def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
-def properties = new Properties()
-
-assert localPropertiesFile.exists()
-localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
-
-def flutterSdkPath = properties.getProperty("flutter.sdk")
-assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
-apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/mapsindoors_mapbox/example/integration_test/directions_test.dart b/mapsindoors_mapbox/example/integration_test/directions_test.dart
deleted file mode 100644
index 348450f..0000000
--- a/mapsindoors_mapbox/example/integration_test/directions_test.dart
+++ /dev/null
@@ -1,139 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:flutter_test/flutter_test.dart';
-import 'package:integration_test/integration_test.dart';
-import 'package:mapsindoors_mapbox/mapsindoors.dart';
-
-import 'package:mapsindoors_example/main.dart' as app;
-
-void main() {
- IntegrationTestWidgetsFlutterBinding.ensureInitialized();
-
- group('end-to-end test', () {
- testWidgets('Directions', (tester) async {
- app.main();
- await tester.pumpAndSettle();
- final Finder fab = find.byType(ElevatedButton);
- // Emulate a tap on the floating action button.
- await tester.tap(fab);
-
- // Trigger a frame.
- await tester.pumpAndSettle(const Duration(seconds: 4));
-
- final app.MapWidgetState state = tester.state(find.byType(app.MapWidget));
-
- MapsIndoorsWidget? mapControl = state.mapController;
-
- expect(mapControl, isNot(null));
-
- MPDirectionsService service = MPDirectionsService();
- MPDirectionsRenderer renderer = MPDirectionsRenderer();
-
- await service.addAvoidWayType(MPHighway.steps.name);
- await service.addAvoidWayType("gert");
- await service.clearWayType();
-
- await service.setIsDeparture(false);
- await service.setIsDeparture(true);
- await service.setTime(1675764926);
-
- await service.setTravelMode(MPDirectionsService.travelModeTransit);
- await service.setTravelMode(MPDirectionsService.travelModeDriving);
- await service.setTravelMode(MPDirectionsService.travelModeBicycling);
- await service.setTravelMode(MPDirectionsService.travelModeWalking);
-
- // ensure null route does not throw an error
- //TODO: this throws an error on android
- //await service.getRoute(origin: MPPoint(), destination: MPPoint());
-
- final MPPoint insideFloor10 = MPPoint.withCoordinates(longitude: 9.950697439483086, latitude: 57.05813516976602, floorIndex: 10);
- final MPPoint insideFloor0 = MPPoint.withCoordinates(longitude: 9.950444542549313, latitude: 57.05799928441941, floorIndex: 0);
- final MPPoint insideNoIndex = MPPoint.withCoordinates(longitude: 9.950444542549313, latitude: 57.05799928441941);
- final MPPoint outside = MPPoint.withCoordinates(longitude: 9.948246747758377, latitude: 57.05846751376223, floorIndex: 0);
- final MPPoint outsideNoIndex = MPPoint.withCoordinates(longitude: 9.948246747758377, latitude: 57.05846751376223);
- final MPPoint outsideOther = MPPoint.withCoordinates(longitude: 9.94501902681362, latitude: 57.05904322246081, floorIndex: 0);
-
- // In/In (save route for renderer test)
- MPRoute route1 = await service.getRoute(origin: insideFloor0, destination: insideFloor10);
- // In/In reverse (also save this route)
- MPRoute route2 = await service.getRoute(origin: insideFloor10, destination: insideFloor0);
- // In/In one without floorIndex
- await service.getRoute(origin: insideNoIndex, destination: insideFloor10);
- // Out/In (see if the allows this)
- MPRoute routeOutside = await service.getRoute(origin: outside, destination: insideFloor0);
- // Out/In in without floorIndex
- await service.getRoute(origin: outside, destination: insideNoIndex);
- // In/Out
- await service.getRoute(origin: insideFloor0, destination: outside);
- // Out/In no floorIndex
- await service.getRoute(origin: outsideNoIndex, destination: insideNoIndex);
- // Out/Out
- await service.getRoute(origin: outside, destination: outsideOther);
- // In/In same point
- await service.getRoute(origin: insideFloor0, destination: insideFloor0);
-
- // The route should work
- expect(route1, isNot(null));
- expect(route2, isNot(null));
- expect(routeOutside, isNot(null));
-
- int index = 0;
- await renderer.setOnLegSelectedListener((legIndex) => index = legIndex);
-
- await renderer.setRoute(route1);
-
- expect(index, 0);
-
- // Should already be the first leg, test if previousLeg causes an issue
- await renderer.previousLeg();
-
- expect(index, 0);
-
- // Go back and forth
- await renderer.nextLeg();
- expect(index, 1);
- await renderer.previousLeg();
- expect(index, 0);
-
- await renderer.selectLegIndex(0);
- expect(index, 0);
-
- var selectedLegFloorIndex = await renderer.getSelectedLegFloorIndex();
- expect(selectedLegFloorIndex, 0);
-
- await renderer.selectLegIndex(1);
- expect(index, 1);
-
- selectedLegFloorIndex = await renderer.getSelectedLegFloorIndex();
- expect(selectedLegFloorIndex, 10);
-
- // These works because the SDK is not in debug mode
- await renderer.selectLegIndex(-1);
- await renderer.selectLegIndex(99);
-
- await renderer.setAnimatedPolyline(true, true, 600);
-
- await renderer.setAnimatedPolyline(false, true, 0);
-
- await renderer.setCameraAnimationDuration(0);
- await renderer.setCameraAnimationDuration(50000);
- await renderer.setCameraViewFitMode(MPCameraViewFitMode.firstStepAligned);
- await renderer.setCameraViewFitMode(MPCameraViewFitMode.northAligned);
-
- await renderer.setRoute(route1);
- await renderer.setRoute(route2);
-
- await renderer.setOnLegSelectedListener(null);
-
- await renderer.setPolyLineColors("#554433", "#667788");
- await renderer.setPolyLineColors("#FF554433", "#00667788");
-
- try {
- await renderer.setPolyLineColors("Gert", "Berthe");
- fail("Exception not thrown");
- } catch (e) {
- expect(e, isInstanceOf());
- }
- });
- });
-}
diff --git a/mapsindoors_mapbox/example/integration_test/displayrule_test.dart b/mapsindoors_mapbox/example/integration_test/displayrule_test.dart
deleted file mode 100644
index 1ffe58f..0000000
--- a/mapsindoors_mapbox/example/integration_test/displayrule_test.dart
+++ /dev/null
@@ -1,424 +0,0 @@
-import 'package:flutter_test/flutter_test.dart';
-import 'package:integration_test/integration_test.dart';
-import 'package:mapsindoors_mapbox/mapsindoors.dart';
-
-import 'package:mapsindoors_example/main.dart' as app;
-
-void main() {
- IntegrationTestWidgetsFlutterBinding.ensureInitialized();
-
- group('end-to-end test', () {
- testWidgets('DisplayRule', (tester) async {
- app.main();
- await tester.pumpAndSettle();
-
- MPError? loaded = await loadMapsIndoors("mapspeople");
- expect(loaded, null);
-
- final MPLocation? loc = (await getLocations())?.last;
- final MPDisplayRule? rule = await getDisplayRuleByLocation(loc!);
- //displayRuleTester(rule1);
-
- expect(rule, isNot(null));
-
- // neede to remove ?. notation
- if (rule != null) {
- /// IsVisible
- {
- bool? isVisible = await rule.isVisible();
- expect(isVisible, isNot(null));
-
- await rule.setVisible(!isVisible!);
-
- bool? newIsVisible = await rule.isVisible();
- expect(newIsVisible, isNot(isVisible));
- }
-
- /// IsIconVisible
- {
- bool? isVisible = await rule.isIconVisible();
- expect(isVisible, isNot(null));
-
- await rule.setIconVisible(!isVisible!);
-
- bool? newIsVisible = await rule.isIconVisible();
- expect(newIsVisible, isNot(isVisible));
- }
-
- /// ZoomFrom
- {
- num? zoomFrom = await rule.getZoomFrom();
- expect(zoomFrom, isNot(null));
-
- await rule.setZoomFrom(zoomFrom! - 1.0);
-
- num? newZoomFrom = await rule.getZoomFrom();
- expect(newZoomFrom, isNot(zoomFrom));
- }
-
- /// ZoomTo
- {
- num? zoomTo = await rule.getZoomTo();
- expect(zoomTo, isNot(null));
-
- await rule.setZoomTo(zoomTo! + 1.0);
-
- num? newZoomTo = await rule.getZoomTo();
- expect(newZoomTo, isNot(zoomTo));
- }
-
- /// IconUrl
- {
- String? url = await rule.getIconUrl();
- expect(url, isNot(null));
-
- await rule.setIcon("${url!}new");
-
- String? newUrl = await rule.getIconUrl();
- expect(newUrl, isNot(url));
- }
-
- /// IconSize
- {
- MPIconSize? size = await rule.getIconSize();
- expect(size, isNot(null));
-
- await rule.setIconSize(MPIconSize(height: size!.height + 1, width: size.width + 1));
-
- MPIconSize? newSize = await rule.getIconSize();
- expect(newSize, isNot(size));
- }
-
- /// IsLabelVisible
- {
- bool? isVisible = await rule.isLabelVisible();
- expect(isVisible, isNot(null));
-
- await rule.setLabelVisible(!isVisible!);
-
- bool? newIsVisible = await rule.isLabelVisible();
- expect(newIsVisible, isNot(isVisible));
- }
-
- /// Label
- {
- String? label = await rule.getLabel();
- expect(label, isNot(null));
-
- await rule.setLabel("${label!}new");
-
- String? newLabel = await rule.getLabel();
- expect(newLabel, isNot(label));
- }
-
- /// LabelZoomFrom
- {
- num? zoomFrom = await rule.getLabelZoomFrom();
- expect(zoomFrom, isNot(null));
-
- await rule.setLabelZoomFrom(zoomFrom! - 1.0);
-
- num? newZoomFrom = await rule.getLabelZoomFrom();
- expect(newZoomFrom, isNot(zoomFrom));
- }
-
- /// LabelZoomTo
- {
- num? zoomTo = await rule.getLabelZoomTo();
- expect(zoomTo, isNot(null));
-
- await rule.setLabelZoomTo(zoomTo! + 1.0);
-
- num? newZoomTo = await rule.getLabelZoomTo();
- expect(newZoomTo, isNot(zoomTo));
- }
-
- /// LabelMaxWidth
- {
- int? maxWidth = await rule.getLabelMaxWidth();
- expect(maxWidth, isNot(null));
-
- await rule.setLabelMaxWidth(maxWidth! + 1);
-
- int? newMaxWidth = await rule.getLabelMaxWidth();
- expect(newMaxWidth, isNot(maxWidth));
- }
-
- /// IsPolygonVisible
- {
- bool? isVisible = await rule.isPolygonVisible();
- expect(isVisible, isNot(null));
-
- await rule.setPolygonVisible(!isVisible!);
-
- bool? newIsVisible = await rule.isPolygonVisible();
- expect(newIsVisible, isNot(isVisible));
- }
-
- /// PolygonZoomFrom
- {
- num? zoomFrom = await rule.getPolygonZoomFrom();
- expect(zoomFrom, isNot(null));
-
- await rule.setPolygonZoomFrom(zoomFrom! - 1.0);
-
- num? newZoomFrom = await rule.getPolygonZoomFrom();
- expect(newZoomFrom, isNot(zoomFrom));
- }
-
- /// PolygonZoomTo
- {
- num? zoomTo = await rule.getPolygonZoomTo();
- expect(zoomTo, isNot(null));
-
- await rule.setPolygonZoomTo(zoomTo! + 1.0);
-
- num? newZoomTo = await rule.getPolygonZoomTo();
- expect(newZoomTo, isNot(zoomTo));
- }
-
- /// PolygonStrokeWidth
- {
- num? strokeWidth = await rule.getPolygonStrokeWidth();
- expect(strokeWidth, isNot(null));
-
- await rule.setPolygonStrokeWidth(strokeWidth! + 1.0);
- num? newStrokeWidth = await rule.getPolygonStrokeWidth();
- expect(newStrokeWidth, isNot(strokeWidth));
- }
-
- /// PolygonStrokeColor
- {
- String? color = await rule.getPolygonStrokeColor();
- expect(color, isNot(null));
- await rule.setPolygonStrokeColor("#3071D3");
- String? newColor = await rule.getPolygonStrokeColor();
- expect(newColor, isNot(color));
- }
-
- /// PolygonStrokeOpacity
- {
- num? opacity = await rule.getPolygonStrokeOpacity();
- expect(opacity, isNot(null));
-
- await rule.setPolygonStrokeOpacity(opacity! + 0.1);
-
- num? newOpacity = await rule.getPolygonStrokeOpacity();
- expect(newOpacity, isNot(opacity));
- }
-
- /// PolygonFillColor
- {
- String? color = await rule.getPolygonFillColor();
- expect(color, isNot(null));
-
- await rule.setPolygonFillColor("#3071D2");
-
- String? newColor = await rule.getPolygonFillColor();
- expect(newColor, isNot(color));
- }
-
- /// PolygonFillOpacity
- {
- num? opacity = await rule.getPolygonFillOpacity();
- expect(opacity, isNot(null));
-
- await rule.setPolygonFillOpacity(opacity! + 0.1);
-
- num? newOpacity = await rule.getPolygonFillOpacity();
- expect(newOpacity, isNot(opacity));
- }
-
- /// IsWallVisible
- {
- bool? isVisible = await rule.isWallVisible();
- expect(isVisible, isNot(null));
-
- await rule.setWallVisible(!isVisible!);
-
- bool? newIsVisible = await rule.isWallVisible();
- expect(newIsVisible, isNot(isVisible));
- }
-
- /// WallColor
- {
- String? color = await rule.getWallColor();
- expect(color, isNot(null));
-
- await rule.setWallColor("#3071D9");
-
- String? newColor = await rule.getWallColor();
- expect(newColor, isNot(color));
- }
-
- /// WallHeight
- {
- num? height = await rule.getWallHeight();
- expect(height, isNot(null));
-
- await rule.setWallHeight(height! + 0.1);
-
- num? newHeight = await rule.getWallHeight();
- expect(newHeight, isNot(height));
- }
-
- /// WallZoomFrom
- {
- num? zoomFrom = await rule.getWallZoomFrom();
- expect(zoomFrom, isNot(null));
-
- await rule.setWallZoomFrom(zoomFrom! - 1.0);
-
- num? newZoomFrom = await rule.getWallZoomFrom();
- expect(newZoomFrom, isNot(zoomFrom));
- }
-
- /// WallZoomTo
- {
- num? zoomTo = await rule.getWallZoomTo();
- expect(zoomTo, isNot(null));
-
- await rule.setWallZoomTo(zoomTo! + 1.0);
-
- num? newZoomTo = await rule.getWallZoomTo();
- expect(newZoomTo, isNot(zoomTo));
- }
-
- /// IsExtrusionVisible
- {
- bool? isVisible = await rule.isExtrusionVisible();
- expect(isVisible, isNot(null));
-
- await rule.setExtrusionVisible(!isVisible!);
-
- bool? newIsVisible = await rule.isExtrusionVisible();
- expect(newIsVisible, isNot(isVisible));
- }
-
- /// ExtrusionColor
- {
- String? color = await rule.getExtrusionColor();
- expect(color, isNot(null));
-
- await rule.setExtrusionColor("#3071D9");
-
- String? newColor = await rule.getExtrusionColor();
- expect(newColor, isNot(color));
- }
-
- /// ExtrusionHeight
- {
- num? height = await rule.getExtrusionHeight();
- expect(height, isNot(null));
-
- await rule.setExtrusionHeight(height! + 0.1);
-
- num? newHeight = await rule.getExtrusionHeight();
- expect(newHeight, isNot(height));
- }
-
- /// ExtrusionZoomFrom
- {
- num? zoomFrom = await rule.getExtrusionZoomFrom();
- expect(zoomFrom, isNot(null));
-
- await rule.setExtrusionZoomFrom(zoomFrom! - 1.0);
-
- num? newZoomFrom = await rule.getExtrusionZoomFrom();
- expect(newZoomFrom, isNot(zoomFrom));
- }
-
- /// ExtrusionZoomTo
- {
- num? zoomTo = await rule.getExtrusionZoomTo();
- expect(zoomTo, isNot(null));
-
- await rule.setExtrusionZoomTo(zoomTo! + 1.0);
-
- num? newZoomTo = await rule.getExtrusionZoomTo();
- expect(newZoomTo, isNot(zoomTo));
- }
-
- /// Is2DModelVisible
- {
- bool? isVisible = await rule.isModel2DVisible();
- expect(isVisible, isNot(null));
-
- await rule.setModel2DVisible(!isVisible!);
-
- bool? newIsVisible = await rule.isModel2DVisible();
- expect(newIsVisible, isNot(isVisible));
- }
-
- /// 2DModelZoomFrom
- {
- num? zoomFrom = await rule.getModel2DZoomFrom();
- expect(zoomFrom, isNot(null));
-
- await rule.setModel2DZoomFrom(zoomFrom! - 1.0);
-
- num? newZoomFrom = await rule.getModel2DZoomFrom();
- expect(newZoomFrom, isNot(zoomFrom));
- }
-
- /// 2DModelZoomTo
- {
- num? zoomTo = await rule.getModel2DZoomTo();
- expect(zoomTo, isNot(null));
-
- await rule.setModel2DZoomTo(zoomTo! + 1.0);
-
- num? newZoomTo = await rule.getModel2DZoomTo();
- expect(newZoomTo, isNot(zoomTo));
- }
-
- /// 2DModelModel
- {
- String? name = await rule.getModel2DModel();
- expect(name, null);
-
- await rule.setModel2DModel("new");
-
- String? newName = await rule.getModel2DModel();
- expect(newName, isNot(name));
- }
-
- /// 2DModelHeight
- {
- num? height = await rule.getModel2DHeightMeters();
- expect(height, isNot(null));
-
- await rule.setModel2DHeightMeters(height! + 1.0);
-
- num? newHeight = await rule.getModel2DHeightMeters();
- expect(newHeight, isNot(height));
- }
-
- /// 2DModelWidth
- {
- num? width = await rule.getModel2DWidthMeters();
- expect(width, isNot(null));
-
- await rule.setModel2DWidthMeters(width! + 1.0);
-
- num? newWidth = await rule.getModel2DWidthMeters();
- expect(newWidth, isNot(width));
- }
-
- /// 2DModelBearing
- {
- num? bearing = await rule.getModel2DBearing();
- expect(bearing, isNot(null));
-
- await rule.setModel2DBearing(bearing! + 1.0);
-
- num? newBearing = await rule.getModel2DBearing();
- expect(newBearing, isNot(bearing));
- }
-
- // reset the rule after validating again
- await rule.reset();
- }
- });
- });
-}
diff --git a/mapsindoors_mapbox/example/integration_test/mapcontrol_test.dart b/mapsindoors_mapbox/example/integration_test/mapcontrol_test.dart
deleted file mode 100644
index 063789a..0000000
--- a/mapsindoors_mapbox/example/integration_test/mapcontrol_test.dart
+++ /dev/null
@@ -1,366 +0,0 @@
-import 'dart:io';
-
-import 'package:flutter/material.dart';
-import 'package:flutter_test/flutter_test.dart';
-import 'package:integration_test/integration_test.dart';
-import 'package:mapsindoors_mapbox/mapsindoors.dart';
-
-import 'package:mapsindoors_example/main.dart' as app;
-
-void main() {
- IntegrationTestWidgetsFlutterBinding.ensureInitialized();
-
- group('end-to-end test', () {
- testWidgets('MapControl', (tester) async {
- app.main();
- await tester.pumpAndSettle();
- final Finder fab = find.byType(ElevatedButton);
- await tester.pumpAndSettle(const Duration(seconds: 1));
- // Emulate a tap on the floating action button.
- await tester.tap(fab);
-
- // Trigger a frame.
- await tester.pumpAndSettle(const Duration(seconds: 4));
-
- var ready = false;
- while (ready == false) {
- await tester.pumpAndSettle(const Duration(seconds: 1));
- ready = await isMapsIndoorsReady() ?? false;
- }
-
- final app.MapWidgetState state = tester.state(find.byType(app.MapWidget));
-
- MapsIndoorsWidget mapControl = state.mapController;
-
- expect(mapControl, isNot(null));
-
- /// Get venue from mapsindoors and move towards it
- ///
- /// expected get current venue to return the venue
- {
- MPVenue? fetchedVenue = (await getVenues())?.getAll().first;
-
- expect(fetchedVenue, isNot(null));
-
- await mapControl.selectVenue(fetchedVenue!, true);
-
- MPVenue? venue = await mapControl.getCurrentVenue();
-
- expect(venue, equals(fetchedVenue));
- }
-
- /// Get building from mapsindoors and move towards it
- ///
- /// expected get current building to return the building
- {
- MPBuilding? fetchedBuilding = (await getBuildings())?.getAll().first;
-
- expect(fetchedBuilding, isNot(null));
-
- mapControl.selectBuilding(fetchedBuilding!, true);
- await tester.pumpAndSettle(const Duration(seconds: 1));
-
- MPBuilding? building = await mapControl.getCurrentBuilding();
-
- expect(building, equals(fetchedBuilding));
-
- // we know there is a building with a floor here, check that now
- MPFloor? floor = await mapControl.getCurrentBuildingFloor();
-
- expect(floor?.floorIndex, building?.initialFloorIndex);
- }
-
- /// Set map padding, then get it again
- ///
- /// expected get returns padding
- {
- expect(mapControl.mapViewPaddingBottom, isNot(99));
-
- await mapControl.setMapPadding(55, 66, 77, 99);
-
- expect(await mapControl.mapViewPaddingStart, equals(55));
-
- expect(await mapControl.mapViewPaddingTop, equals(66));
-
- expect(await mapControl.mapViewPaddingEnd, equals(77));
-
- expect(await mapControl.mapViewPaddingBottom, equals(99));
- }
-
- /// get map style
- ///
- /// expected: mapstyle on mapcontrol is contained in mapsindoors
- {
- List? styles = await getMapStyles();
-
- expect(styles, isNot(null));
- expect(styles?.length, isNot(0));
-
- MPMapStyle? currentStyle = await mapControl.mapStyle;
-
- expect(currentStyle, isNot(null));
-
- expect(styles?.contains(currentStyle), equals(true));
-
- // Test is conditioned on more than 1 style for the current solution
- if (styles!.length > 1) {
- styles.remove(currentStyle);
-
- MPMapStyle? newStyle = await mapControl.mapStyle;
-
- expect(newStyle, isNot(currentStyle));
- }
- }
-
- /// is floor selector hidden
- ///
- /// expected: not hidden, then hidden
- {
- bool? isFloorSelectorHidden = await mapControl.isFloorSelectorHidden;
-
- expect(isFloorSelectorHidden, false);
-
- await mapControl.hideFloorSelector(true);
-
- isFloorSelectorHidden = await mapControl.isFloorSelectorHidden;
-
- expect(isFloorSelectorHidden, true);
- }
-
- /// Filter
- ///
- /// expected: nothing, test is to ensure the platform does not crash
- {
- // check that it does not crash when no filter is in use
- await mapControl.clearFilter();
-
- // filter with all values filled
- MPFilter filterFilled = (MPFilterBuilder()
- ..setCategories(["one", "two"])
- ..setDepth(2)
- ..setFloorIndex(10)
- ..setGeometry(MPBounds(northeast: MPPoint.withCoordinates(longitude: 89.0, latitude: 90.0), southwest: MPPoint.withCoordinates(longitude: 1.0, latitude: 2.0)))
- ..setIgnoreLocationActiveStatus(true)
- ..setIgnoreLocationSearchableStatus(false)
- ..setLocations(["location"])
- ..setParents(["venue"])
- ..setSkip(20)
- ..setTake(3)
- ..setMapExtend(MPBounds(northeast: MPPoint.withCoordinates(longitude: 56.55467, latitude: 91.2345234), southwest: MPPoint.withCoordinates(longitude: -45.213342634, latitude: -20.4234))))
- .build();
-
- // filter with some values filled
- MPFilter filterSemi = (MPFilterBuilder()
- ..setDepth(2)
- ..setFloorIndex(10)
- ..setMapExtend(MPBounds(northeast: MPPoint.withCoordinates(longitude: 56.55467, latitude: 91.2345234), southwest: MPPoint.withCoordinates(longitude: -45.213342634, latitude: -20.4234))))
- .build();
-
- // filter with no values filled
- MPFilter filterNone = MPFilterBuilder().build();
-
- // behavior with values filled
- MPFilterBehavior behavior = (MPFilterBehavior.builder()
- ..setAllowFloorChange(false)
- ..setAnimationDuration(20000)
- ..setMoveCamera(true)
- ..setShowInfoWindow(false)
- ..setZoomToFit(false))
- .build();
-
- await mapControl.setFilter(filterFilled, behavior);
- await mapControl.setFilter(filterSemi, behavior);
- await mapControl.clearFilter();
- await mapControl.setFilter(filterNone, behavior);
-
- await mapControl.clearFilter();
-
- await mapControl.setFilter(filterFilled, MPFilterBehavior.DEFAULT);
- await mapControl.setFilter(filterSemi, MPFilterBehavior.DEFAULT);
- await mapControl.clearFilter();
- await mapControl.setFilter(filterNone, MPFilterBehavior.DEFAULT);
-
- // cleanup
- await mapControl.clearFilter();
-
- // Check the other setFilter
- List? locations = (await getLocations())?.take(5).toList();
-
- await mapControl.setFilterWithLocations(locations!, behavior);
- await mapControl.setFilterWithLocations(locations, MPFilterBehavior.DEFAULT);
- await mapControl.clearFilter();
-
- await mapControl.setFilterWithLocations([], behavior);
- await mapControl.clearFilter();
- }
-
- {
- // Reset the listener as it might cause havoc in the app otherwise
- mapControl.setOnLocationSelectedListener(null, true);
-
- MPLocation? location = (await getLocations())?.first;
-
- await mapControl.selectLocation(location);
- await mapControl.deSelectLocation();
- await mapControl.selectLocation(location);
- await mapControl.selectLocation(null);
-
- MPSelectionBehavior behavior = (MPSelectionBehavior.builder()
- ..setAllowFloorChange(false)
- ..setAnimationDuration(0)
- ..setMoveCamera(false)
- ..setZoomToFit(true)
- ..setShowInfoWindow(true))
- .build();
-
- await mapControl.selectLocation(location, behavior);
- await mapControl.selectLocation(null, behavior);
-
- await mapControl.deSelectLocation();
-
- await mapControl.selectLocation(location, MPSelectionBehavior.DEFAULT);
- await mapControl.selectLocation(null, MPSelectionBehavior.DEFAULT);
-
- await mapControl.deSelectLocation();
- }
-
- /// goto
- {
- MPVenue? venue = (await getVenues())?.getAll().last;
- MPBuilding? building = (await getBuildings())?.getAll().last;
- MPFloor? floor = building?.floors.last;
- MPLocation? location = (await getLocations())?.last;
-
- await mapControl.goTo(venue);
- await mapControl.goTo(building);
- await mapControl.goTo(location);
- await mapControl.goTo(null);
- // This is temporary until iOS has implemented floor as an entity
- if (Platform.isAndroid) {
- await mapControl.goTo(floor);
- }
- }
-
- /// getcurrentzoom
- {
- final zoom = await mapControl.getCurrentMapsindoorsZoom();
-
- expect(zoom, isNot(null));
- }
-
- /// user position
- {
- bool? isPositionShown = await mapControl.isUserPositionShown;
-
- expect(isPositionShown, true);
-
- await mapControl.setShowUserPosition(false);
-
- isPositionShown = await mapControl.isUserPositionShown;
-
- expect(isPositionShown, false);
- }
-
- /// livedata
- {
- // disable something that has not been set
- mapControl.disableLiveData(LiveDataDomainTypes.count.name);
- // enable all
- mapControl.enableLiveData(LiveDataDomainTypes.any.name);
- // enable one
- mapControl.enableLiveData(LiveDataDomainTypes.availability.name);
- // remove the one
- mapControl.disableLiveData(LiveDataDomainTypes.availability.name);
- // remove all
- mapControl.disableLiveData(LiveDataDomainTypes.any.name);
- }
-
- // listeners
- {
- // check case where listener has not been added yet
- mapControl.removeOnCameraEventListner((event) => {});
-
- mapControl.addOnCameraEventListner((event) => {});
- mapControl.removeOnCameraEventListner((event) => {});
-
- mapControl.addOnFloorUpdateListener((floor) => {});
- mapControl.removeOnFloorUpdateListener((floor) => {});
-
- mapControl.setOnCurrentVenueChangedListener((venue) => {});
-
- mapControl.setOnCurrentBuildingChangedListener((building) => {});
-
- // check in case the initial value has not been set
- mapControl.setOnLocationSelectedListener((location) => {}, true);
- mapControl.setOnLocationSelectedListener((locaiton) => {}, true);
-
- mapControl.setOnMapClickListener((point, locations) => {}, true);
- mapControl.setOnMapClickListener(null, true);
-
- mapControl.setOnMarkerClickListener((locId) => {}, true);
- mapControl.setOnMarkerClickListener(null, true);
-
- mapControl.setOnMarkerInfoWindowClickListener((locId) => {});
- mapControl.setOnMarkerInfoWindowClickListener(null);
- }
-
- /// Camera mainpulation
- {
- final MPCameraPosition originalPosition = await mapControl.getCurrentCameraPosition();
- final MPCameraPosition copyPosition = (MPCameraPositionBuilder.fromPosition(originalPosition)..tilt = 20).build();
-
- expect(originalPosition.bearing, copyPosition.bearing);
- expect(originalPosition.zoom, copyPosition.zoom);
- expect(originalPosition.tilt, isNot(copyPosition.tilt));
-
- MPCameraPosition position = MPCameraPosition(zoom: 20, target: MPPoint.withCoordinates(longitude: 0, latitude: 0));
-
- await mapControl.moveCamera(MPCameraUpdate.fromCameraPosition(position));
-
- MPCameraUpdate update = MPCameraUpdate.fromPoint(MPPoint.withCoordinates(longitude: 10, latitude: 10));
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.fromPoint(MPPoint.withCoordinates(longitude: 1000, latitude: -1000));
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.fromBounds(bounds: MPBounds(northeast: MPPoint.withCoordinates(longitude: 20, latitude: 20), southwest: MPPoint.withCoordinates(longitude: -20, latitude: -20)), padding: 200);
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.zoomBy(2);
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.zoomBy(-2);
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.zoomBy(2000);
-
- update = MPCameraUpdate.zoomTo(1);
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.zoomTo(22);
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.zoomTo(2000);
-
- await mapControl.moveCamera(update);
-
- update = MPCameraUpdate.zoomTo(-1);
-
- await mapControl.moveCamera(update);
-
- await mapControl.animateCamera(MPCameraUpdate.fromCameraPosition(originalPosition), 20000);
-
- await mapControl.animateCamera(MPCameraUpdate.fromCameraPosition(position));
-
- await mapControl.animateCamera(MPCameraUpdate.fromCameraPosition(originalPosition), 100);
- }
- });
- });
-}
diff --git a/mapsindoors_mapbox/example/integration_test/mapsindoors_test.dart b/mapsindoors_mapbox/example/integration_test/mapsindoors_test.dart
deleted file mode 100644
index c2d7439..0000000
--- a/mapsindoors_mapbox/example/integration_test/mapsindoors_test.dart
+++ /dev/null
@@ -1,127 +0,0 @@
-import 'dart:io';
-
-import 'package:flutter_test/flutter_test.dart';
-import 'package:integration_test/integration_test.dart';
-import 'package:mapsindoors_mapbox/mapsindoors.dart';
-import 'package:mapsindoors_example/example_position_provider.dart';
-
-import 'package:mapsindoors_example/main.dart' as app;
-
-void main() {
- IntegrationTestWidgetsFlutterBinding.ensureInitialized();
-
- group('end-to-end test', () {
- testWidgets('MapsIndoors', (tester) async {
- app.main();
- await tester.pumpAndSettle();
-
- MPError? loaded = await loadMapsIndoors("mapspeople");
- expect(loaded, null);
-
- MPDisplayRule? defaultDisplayRule = await getDefaultDisplayRule();
- expect(defaultDisplayRule?.dispalyRuleName, "default");
-
- MPDisplayRule? mainDisplayRule = await getMainDisplayRule();
- expect(mainDisplayRule?.dispalyRuleName, "main");
-
- MPDisplayRule? mainByName = await getDisplayRuleByName("main");
- expect(mainByName?.dispalyRuleName, "main");
-
- String? apiKey = await getAPIKey();
- expect(apiKey, "mapspeople");
-
- List? languages = await getMapsIndoorsAvailableLanguages();
- expect(languages?.length, 3);
-
- MPBuildingCollection? buildings = await getBuildings();
- expect(buildings?.size, 5);
-
- MPVenueCollection? venues = await getVenues();
- expect(venues?.size, 5);
-
- MPVenue? defaultVenue = await getDefaultVenue();
- expect(defaultVenue, isNotNull);
- expect(defaultVenue?.administrativeId, "Stigsborgvej");
-
- MPCategoryCollection? categories = await getCategories();
- expect(categories?.size, 18);
-
- String? language = await getMapsIndoorsLanguage();
- expect(language, "en");
-
- MPSolution? solution = await getSolution();
- expect(solution?.availableLanguages.length, 3);
-
- MPLocation? location = await getLocationById("296994c98023439eac1f20d4");
- expect(location?.name, "Canteen");
-
- List? locations = await getLocations();
- expect(locations?.isNotEmpty, true);
-
- List externalIds = ["0.32.05"];
- List? externalIdLocations = await getLocationsByExternalIds(externalIds);
-
- expect(externalIdLocations?.length, 1);
- expect(externalIdLocations?[0].name, "Canteen");
-
- MPQuery query = MPQuery.builder().build();
- MPFilter filter = (MPFilterBuilder()..setTypes(["Canteen"])).build();
- List? locationsByFilter = await getLocationsByQuery(query: query, filter: filter);
- expect(locationsByFilter?.isNotEmpty, true);
-
- query = (MPQuery.builder()..setQuery("apisjgaelgasdf asdoæfk oæskg æaskf nasdlfnasue")).build();
- filter = MPFilterBuilder().build();
- locationsByFilter = await getLocationsByQuery(query: query, filter: filter);
- expect(locationsByFilter?.isNotEmpty, false);
-
- List? mapstyles = await getMapStyles();
- expect(mapstyles?.length, 1);
- expect(mapstyles?[0].displayName, "default");
-
- ExamplePositionProvider posProv = ExamplePositionProvider();
- setPositionProvider(posProv);
- expect(getPositionProvider()?.name, "random");
-
- bool? validApi = await isAPIKeyValid();
- expect(validApi, true);
-
- bool? ready = await isMapsIndoorsReady();
- expect(ready, true);
-
- MPUserRoleCollection? userRoles = await getUserRoles();
- expect(userRoles?.size != 0, true);
-
- applyUserRoles(userRoles!.getAll());
-
- var currAvailableUseRoles = await getAppliedUserRoles();
- expect(currAvailableUseRoles?.length, userRoles.size);
-
- applyUserRoles([]);
-
- currAvailableUseRoles = await getAppliedUserRoles();
- expect(currAvailableUseRoles?.length, 0);
-
- // This is temporary until iOS has implemented ReverseGeoCode feature
- if (Platform.isAndroid) {
- MPGeocodeResult? result = await reverseGeoCode(MPPoint.withCoordinates(longitude: 9.9508396, latitude: 57.0582701, floorIndex: 0));
- expect(result?.rooms.length, 1);
- expect(result?.floors[0].floorIndex, 0);
- }
-
- await setMapsIndoorsLanguage("da");
- expect(await getMapsIndoorsLanguage(), "da");
-
- /*// Finds the floating action button to tap on.
- final Finder fab = find.byTooltip('Increment');
-
- // Emulate a tap on the floating action button.
- await tester.tap(fab);
-
- // Trigger a frame.
- await tester.pumpAndSettle();
-
- // Verify the counter increments by 1.
- expect(find.text('1'), findsOneWidget);*/
- });
- });
-}
diff --git a/mapsindoors_mapbox/example/ios/.gitignore b/mapsindoors_mapbox/example/ios/.gitignore
deleted file mode 100644
index 7a7f987..0000000
--- a/mapsindoors_mapbox/example/ios/.gitignore
+++ /dev/null
@@ -1,34 +0,0 @@
-**/dgph
-*.mode1v3
-*.mode2v3
-*.moved-aside
-*.pbxuser
-*.perspectivev3
-**/*sync/
-.sconsign.dblite
-.tags*
-**/.vagrant/
-**/DerivedData/
-Icon?
-**/Pods/
-**/.symlinks/
-profile
-xcuserdata
-**/.generated/
-Flutter/App.framework
-Flutter/Flutter.framework
-Flutter/Flutter.podspec
-Flutter/Generated.xcconfig
-Flutter/ephemeral/
-Flutter/app.flx
-Flutter/app.zip
-Flutter/flutter_assets/
-Flutter/flutter_export_environment.sh
-ServiceDefinitions.json
-Runner/GeneratedPluginRegistrant.*
-
-# Exceptions to above rules.
-!default.mode1v3
-!default.mode2v3
-!default.pbxuser
-!default.perspectivev3
diff --git a/mapsindoors_mapbox/example/ios/Flutter/AppFrameworkInfo.plist b/mapsindoors_mapbox/example/ios/Flutter/AppFrameworkInfo.plist
deleted file mode 100644
index 9625e10..0000000
--- a/mapsindoors_mapbox/example/ios/Flutter/AppFrameworkInfo.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- App
- CFBundleIdentifier
- io.flutter.flutter.app
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- App
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1.0
- MinimumOSVersion
- 11.0
-
-
diff --git a/mapsindoors_mapbox/example/ios/Flutter/Debug.xcconfig b/mapsindoors_mapbox/example/ios/Flutter/Debug.xcconfig
deleted file mode 100644
index ec97fc6..0000000
--- a/mapsindoors_mapbox/example/ios/Flutter/Debug.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
-#include "Generated.xcconfig"
diff --git a/mapsindoors_mapbox/example/ios/Flutter/LICENSE b/mapsindoors_mapbox/example/ios/Flutter/LICENSE
deleted file mode 100644
index bd5d433..0000000
--- a/mapsindoors_mapbox/example/ios/Flutter/LICENSE
+++ /dev/null
@@ -1,11 +0,0 @@
-Copyright 2022 Mapspeople
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mapsindoors_mapbox/example/ios/Flutter/Release.xcconfig b/mapsindoors_mapbox/example/ios/Flutter/Release.xcconfig
deleted file mode 100644
index c4855bf..0000000
--- a/mapsindoors_mapbox/example/ios/Flutter/Release.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
-#include "Generated.xcconfig"
diff --git a/mapsindoors_mapbox/example/ios/LICENSE b/mapsindoors_mapbox/example/ios/LICENSE
deleted file mode 100644
index bd5d433..0000000
--- a/mapsindoors_mapbox/example/ios/LICENSE
+++ /dev/null
@@ -1,11 +0,0 @@
-Copyright 2022 Mapspeople
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mapsindoors_mapbox/example/ios/Podfile b/mapsindoors_mapbox/example/ios/Podfile
deleted file mode 100644
index 2a775d0..0000000
--- a/mapsindoors_mapbox/example/ios/Podfile
+++ /dev/null
@@ -1,96 +0,0 @@
-# Uncomment this line to define a global platform for your project
-platform :ios, '13.0'
-
-# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
-ENV['COCOAPODS_DISABLE_STATS'] = 'true'
-
-PROJECT_ROOT_DIR = File.dirname(File.expand_path(__FILE__))
-PODS_DIR = File.join(PROJECT_ROOT_DIR, 'Pods')
-PODS_TARGET_SUPPORT_FILES_DIR = File.join(PODS_DIR, 'Target Support Files')
-
-project 'Runner', {
- 'Debug' => :debug,
- 'Profile' => :release,
- 'Release' => :release,
-}
-
-def flutter_root
- generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
- unless File.exist?(generated_xcode_build_settings_path)
- raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
- end
-
- File.foreach(generated_xcode_build_settings_path) do |line|
- matches = line.match(/FLUTTER_ROOT\=(.*)/)
- return matches[1].strip if matches
- end
- raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
-end
-
-require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
-
-flutter_ios_podfile_setup
-
-target 'Runner' do
- use_frameworks!
- use_modular_headers!
-
- flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
-end
-
-post_install do |installer|
- installer.pods_project.targets.each do |target|
- flutter_additional_ios_build_settings(target)
- end
- remove_static_framework_duplicate_linkage({
- 'MapsIndoorsGoogleMaps' => ['GoogleMaps']
- })
-end
-
-# CocoaPods provides the abstract_target mechanism for sharing dependencies between distinct targets.
-# However, due to the complexity of our project and use of shared frameworks, we cannot simply bundle everything under
-# a single abstract_target. Using a pod in a shared framework target and an app target will cause CocoaPods to generate
-# a build configuration that links the pod's frameworks with both targets. This is not an issue with dynamic frameworks,
-# as the linker is smart enough to avoid duplicate linkage at runtime. Yet for static frameworks the linkage happens at
-# build time, thus when the shared framework target and app target are combined to form an executable, the static
-# framework will reside within multiple distinct address spaces. The end result is duplicated symbols, and global
-# variables that are confined to each target's address space, i.e not truly global within the app's address space.
-
-def remove_static_framework_duplicate_linkage(static_framework_pods)
- puts "Removing duplicate linkage of static frameworks"
-
- Dir.glob(File.join(PODS_TARGET_SUPPORT_FILES_DIR, "Pods-*")).each do |path|
- pod_target = path.split('-', -1).last
-
- static_framework_pods.each do |target, pods|
- next if pod_target == target
- frameworks = pods.map { |pod| identify_frameworks(pod) }.flatten
-
- Dir.glob(File.join(path, "*.xcconfig")).each do |xcconfig|
- lines = File.readlines(xcconfig)
-
- if other_ldflags_index = lines.find_index { |l| l.start_with?('OTHER_LDFLAGS') }
- other_ldflags = lines[other_ldflags_index]
-
- frameworks.each do |framework|
- other_ldflags.gsub!("-framework \"#{framework}\"", '')
- end
-
- File.open(xcconfig, 'w') do |fd|
- fd.write(lines.join)
- end
- end
- end
- end
- end
-end
-
-def identify_frameworks(pod)
- frameworks = Dir.glob(File.join(PODS_DIR, pod, "**/*.framework")).map { |path| File.basename(path) }
-
- if frameworks.any?
- return frameworks.map { |f| f.split('.framework').first }
- end
-
- return pod
-end
diff --git a/mapsindoors_mapbox/example/ios/Podfile.lock b/mapsindoors_mapbox/example/ios/Podfile.lock
deleted file mode 100644
index c7774ad..0000000
--- a/mapsindoors_mapbox/example/ios/Podfile.lock
+++ /dev/null
@@ -1,60 +0,0 @@
-PODS:
- - Flutter (1.0.0)
- - GoogleMaps (7.4.0):
- - GoogleMaps/Maps (= 7.4.0)
- - GoogleMaps/Base (7.4.0)
- - GoogleMaps/Maps (7.4.0):
- - GoogleMaps/Base
- - integration_test (0.0.1):
- - Flutter
- - MapsIndoors (4.0.2)
- - mapsindoors_ios (4.0.0):
- - Flutter
- - MapsIndoorsCodable (= 4.0.2)
- - MapsIndoorsGoogleMaps (= 4.0.2)
- - MapsIndoorsCodable (4.0.2):
- - MapsIndoors (= 4.0.2)
- - MapsIndoorsCore (4.0.2):
- - MapsIndoors (= 4.0.2)
- - MapsIndoorsGoogleMaps (4.0.2):
- - GoogleMaps (= 7.4.0)
- - MapsIndoorsCore (= 4.0.2)
- - ValueAnimator (= 0.6.8)
- - ValueAnimator (0.6.8)
-
-DEPENDENCIES:
- - Flutter (from `Flutter`)
- - integration_test (from `.symlinks/plugins/integration_test/ios`)
- - mapsindoors_ios (from `.symlinks/plugins/mapsindoors_ios/ios`)
-
-SPEC REPOS:
- trunk:
- - GoogleMaps
- - MapsIndoors
- - MapsIndoorsCodable
- - MapsIndoorsCore
- - MapsIndoorsGoogleMaps
- - ValueAnimator
-
-EXTERNAL SOURCES:
- Flutter:
- :path: Flutter
- integration_test:
- :path: ".symlinks/plugins/integration_test/ios"
- mapsindoors_ios:
- :path: ".symlinks/plugins/mapsindoors_ios/ios"
-
-SPEC CHECKSUMS:
- Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
- GoogleMaps: 032f676450ba0779bd8ce16840690915f84e57ac
- integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
- MapsIndoors: be722b256ba5421dd8b59ffde46c1caab00f53bd
- mapsindoors_ios: f1494ea5bd0d614c6577fbc402ab0016cfbb327b
- MapsIndoorsCodable: e51c6466bdf7cf2424b579a109a52c4d025aa3ca
- MapsIndoorsCore: 6cc77f328e490c8740fe14672248f29ea2008d8b
- MapsIndoorsGoogleMaps: 2c7a4c1680d1e2ab0aa3835684770addb26bac99
- ValueAnimator: b9ed721f3a0fc682ec857fd70dc933b28adb7522
-
-PODFILE CHECKSUM: 209ba4354751c0eef9328209d91014d33cc744ce
-
-COCOAPODS: 1.12.0
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.pbxproj b/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.pbxproj
deleted file mode 100644
index 4067c21..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,584 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 54;
- objects = {
-
-/* Begin PBXBuildFile section */
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
- E36F7E3503C3B6AE35189179 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FC9F0B885B5C56D6CA0C6CF /* Pods_Runner.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 3027ECFAE896FEEEC0F6CD8A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
- 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
- 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
- 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
- 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 9FC9F0B885B5C56D6CA0C6CF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- A02B7017D7E624D6B5405428 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
- BE9452CB1C4C6889CBE3ECC3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 97C146EB1CF9000F007C117D /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- E36F7E3503C3B6AE35189179 /* Pods_Runner.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 9083620D5706E54EE7785CDD /* Pods */ = {
- isa = PBXGroup;
- children = (
- 3027ECFAE896FEEEC0F6CD8A /* Pods-Runner.debug.xcconfig */,
- BE9452CB1C4C6889CBE3ECC3 /* Pods-Runner.release.xcconfig */,
- A02B7017D7E624D6B5405428 /* Pods-Runner.profile.xcconfig */,
- );
- path = Pods;
- sourceTree = "";
- };
- 9740EEB11CF90186004384FC /* Flutter */ = {
- isa = PBXGroup;
- children = (
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
- 9740EEB21CF90195004384FC /* Debug.xcconfig */,
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
- 9740EEB31CF90195004384FC /* Generated.xcconfig */,
- );
- name = Flutter;
- sourceTree = "";
- };
- 97C146E51CF9000F007C117D = {
- isa = PBXGroup;
- children = (
- 9740EEB11CF90186004384FC /* Flutter */,
- 97C146F01CF9000F007C117D /* Runner */,
- 97C146EF1CF9000F007C117D /* Products */,
- 9083620D5706E54EE7785CDD /* Pods */,
- D4B20F0E04BAEEF3C52CF77D /* Frameworks */,
- );
- sourceTree = "";
- };
- 97C146EF1CF9000F007C117D /* Products */ = {
- isa = PBXGroup;
- children = (
- 97C146EE1CF9000F007C117D /* Runner.app */,
- );
- name = Products;
- sourceTree = "";
- };
- 97C146F01CF9000F007C117D /* Runner */ = {
- isa = PBXGroup;
- children = (
- 97C146FA1CF9000F007C117D /* Main.storyboard */,
- 97C146FD1CF9000F007C117D /* Assets.xcassets */,
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
- 97C147021CF9000F007C117D /* Info.plist */,
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
- );
- path = Runner;
- sourceTree = "";
- };
- D4B20F0E04BAEEF3C52CF77D /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 9FC9F0B885B5C56D6CA0C6CF /* Pods_Runner.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 97C146ED1CF9000F007C117D /* Runner */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
- buildPhases = (
- 9DF5B8538A38F6D3937E37A9 /* [CP] Check Pods Manifest.lock */,
- 9740EEB61CF901F6004384FC /* Run Script */,
- 97C146EA1CF9000F007C117D /* Sources */,
- 97C146EB1CF9000F007C117D /* Frameworks */,
- 97C146EC1CF9000F007C117D /* Resources */,
- 9705A1C41CF9048500538489 /* Embed Frameworks */,
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 7EB7F5E9E76A9CC4BA989ED4 /* [CP] Embed Pods Frameworks */,
- 233BE1C656F0273903C8424D /* [CP] Copy Pods Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = Runner;
- productName = Runner;
- productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 97C146E61CF9000F007C117D /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 1300;
- ORGANIZATIONNAME = "";
- TargetAttributes = {
- 97C146ED1CF9000F007C117D = {
- CreatedOnToolsVersion = 7.3.1;
- LastSwiftMigration = 1100;
- };
- };
- };
- buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 97C146E51CF9000F007C117D;
- productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 97C146ED1CF9000F007C117D /* Runner */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 97C146EC1CF9000F007C117D /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 233BE1C656F0273903C8424D /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Copy Pods Resources";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Thin Binary";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
- };
- 7EB7F5E9E76A9CC4BA989ED4 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- 9740EEB61CF901F6004384FC /* Run Script */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
- };
- 9DF5B8538A38F6D3937E37A9 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 97C146EA1CF9000F007C117D /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C146FB1CF9000F007C117D /* Base */,
- );
- name = Main.storyboard;
- sourceTree = "";
- };
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C147001CF9000F007C117D /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 249021D3217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Profile;
- };
- 249021D4217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_IDENTITY = "Apple Development";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = A8V6656PYZ;
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.mapspeople.mapsindoorsExample;
- PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Profile;
- };
- 97C147031CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 97C147041CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 97C147061CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
- buildSettings = {
- "ARCHS[sdk=iphonesimulator*]" = x86_64;
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_IDENTITY = "Apple Development";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = A8V6656PYZ;
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.mapspeople.mapsindoorsExample;
- PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 97C147071CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_IDENTITY = "Apple Development";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = A8V6656PYZ;
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.mapspeople.mapsindoorsExample;
- PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147031CF9000F007C117D /* Debug */,
- 97C147041CF9000F007C117D /* Release */,
- 249021D3217E4FDB00AE95B9 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147061CF9000F007C117D /* Debug */,
- 97C147071CF9000F007C117D /* Release */,
- 249021D4217E4FDB00AE95B9 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 97C146E61CF9000F007C117D /* Project object */;
-}
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 919434a..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- PreviewsEnabled
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mapsindoors_mapbox/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
deleted file mode 100644
index c87d15a..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/mapsindoors_mapbox/example/ios/Runner.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 21a3cc1..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mapsindoors_mapbox/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mapsindoors_mapbox/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c..0000000
--- a/mapsindoors_mapbox/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- PreviewsEnabled
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner/AppDelegate.swift b/mapsindoors_mapbox/example/ios/Runner/AppDelegate.swift
deleted file mode 100644
index 27830f9..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/AppDelegate.swift
+++ /dev/null
@@ -1,15 +0,0 @@
-import UIKit
-import Flutter
-import GoogleMaps
-
-@UIApplicationMain
-@objc class AppDelegate: FlutterAppDelegate {
- override func application(
- _ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
- ) -> Bool {
- GMSServices.provideAPIKey("insert api key here")
- GeneratedPluginRegistrant.register(with: self)
- return super.application(application, didFinishLaunchingWithOptions: launchOptions)
- }
-}
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index d36b1fa..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,122 +0,0 @@
-{
- "images" : [
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "Icon-App-83.5x83.5@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "1024x1024",
- "idiom" : "ios-marketing",
- "filename" : "Icon-App-1024x1024@1x.png",
- "scale" : "1x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
deleted file mode 100644
index dc9ada4..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
deleted file mode 100644
index 28c6bf0..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
deleted file mode 100644
index 2ccbfd9..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
deleted file mode 100644
index f091b6b..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
deleted file mode 100644
index 4cde121..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
deleted file mode 100644
index d0ef06e..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
deleted file mode 100644
index dcdc230..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
deleted file mode 100644
index 2ccbfd9..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
deleted file mode 100644
index c8f9ed8..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
deleted file mode 100644
index a6d6b86..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
deleted file mode 100644
index a6d6b86..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
deleted file mode 100644
index 75b2d16..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
deleted file mode 100644
index c4df70d..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
deleted file mode 100644
index 6a84f41..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
deleted file mode 100644
index d0e1f58..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
deleted file mode 100644
index 0bedcf2..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "LaunchImage.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "LaunchImage@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "LaunchImage@3x.png",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
deleted file mode 100644
index 9da19ea..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
deleted file mode 100644
index 9da19ea..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
deleted file mode 100644
index 9da19ea..0000000
Binary files a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ
diff --git a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
deleted file mode 100644
index 89c2725..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Launch Screen Assets
-
-You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-
-You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/mapsindoors_mapbox/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/mapsindoors_mapbox/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index f2e259c..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner/Base.lproj/Main.storyboard b/mapsindoors_mapbox/example/ios/Runner/Base.lproj/Main.storyboard
deleted file mode 100644
index f3c2851..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner/Info.plist b/mapsindoors_mapbox/example/ios/Runner/Info.plist
deleted file mode 100644
index ac8765b..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/Info.plist
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleDisplayName
- Mapsindoors
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- mapsindoors_example
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- $(FLUTTER_BUILD_NAME)
- CFBundleSignature
- ????
- CFBundleVersion
- $(FLUTTER_BUILD_NUMBER)
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
- CADisableMinimumFrameDurationOnPhone
-
- UIApplicationSupportsIndirectInputEvents
-
-
-
diff --git a/mapsindoors_mapbox/example/ios/Runner/Runner-Bridging-Header.h b/mapsindoors_mapbox/example/ios/Runner/Runner-Bridging-Header.h
deleted file mode 100644
index 308a2a5..0000000
--- a/mapsindoors_mapbox/example/ios/Runner/Runner-Bridging-Header.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "GeneratedPluginRegistrant.h"
diff --git a/mapsindoors_mapbox/example/lib/example_position_provider.dart b/mapsindoors_mapbox/example/lib/example_position_provider.dart
deleted file mode 100644
index 6a2b090..0000000
--- a/mapsindoors_mapbox/example/lib/example_position_provider.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-import 'package:mapsindoors_mapbox/mapsindoors.dart';
-
-class ExamplePositionProvider extends MPPositionProviderInterface {
- final List _listeners = List.empty(growable: true);
- ExamplePositionResult? _latestPosition;
- ExamplePositionProvider();
-
- @override
- void addOnPositionUpdateListener(OnPositionUpdateListener listener) {
- _listeners.add(listener);
- }
-
- @override
- MPPositionResultInterface? get latestPosition {
- return _latestPosition;
- }
-
- @override
- String get name => "random";
-
- @override
- void removeOnPositionUpdateListener(OnPositionUpdateListener listener) {
- _listeners.remove(listener);
- }
-
- void updatePosition(MPPoint pos, {num? accuracy, num? bearing, int? floorIndex}) {
- _latestPosition = ExamplePositionResult(this, point: pos, accuracy: accuracy, bearing: bearing, floorIndex: floorIndex);
- for (final listener in _listeners) {
- listener(_latestPosition!);
- }
- }
-
- void clearPosition() {
- _latestPosition = ExamplePositionResult(this);
- for (final listener in _listeners) {
- listener(_latestPosition!);
- }
- }
-}
-
-class ExamplePositionResult extends MPPositionResultInterface {
- ExamplePositionResult(this.provider, {this.accuracy, this.bearing, this.floorIndex, this.point});
-
- @override
- num? accuracy;
-
- @override
- num? bearing;
-
- @override
- int? floorIndex;
-
- @override
- MPPoint? point;
-
- @override
- MPPositionProviderInterface provider;
-}
diff --git a/mapsindoors_mapbox/example/lib/main.dart b/mapsindoors_mapbox/example/lib/main.dart
deleted file mode 100644
index 389e396..0000000
--- a/mapsindoors_mapbox/example/lib/main.dart
+++ /dev/null
@@ -1,792 +0,0 @@
-// ignore_for_file: avoid_print
-
-import 'dart:math';
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'dart:async';
-import 'package:mapsindoors_mapbox/mapsindoors.dart';
-import 'example_position_provider.dart';
-
-void main() {
- runApp(const MyApp());
-}
-
-class MyApp extends StatelessWidget {
- const MyApp({super.key});
-
- @override
- Widget build(BuildContext context) {
- return const MaterialApp(
- home: SolutionSelector(),
- );
- }
-}
-
-class SolutionSelector extends StatefulWidget {
- const SolutionSelector({super.key});
-
- @override
- State createState() => SolutionSelectorState();
-}
-
-class SolutionSelectorState extends State {
- final myController = TextEditingController();
-
- @override
- Widget build(BuildContext context) {
- myController.text = "mapspeople";
- return Scaffold(
- body: Container(
- decoration: const BoxDecoration(color: Colors.white),
- child: Center(
- child: TextField(
- decoration: const InputDecoration(hintText: "Enter solution id"),
- controller: myController,
- autofocus: true,
- autocorrect: false,
- onSubmitted: _loadSolution,
- ),
- ),
- ),
- floatingActionButton: ElevatedButton(
- onPressed: () => _loadSolution(myController.text),
- child: const Text("load"),
- ),
- );
- }
-
- Future _loadSolution(String solutionId) async {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) => MapWidget(apiKey: solutionId.trim())));
- }
-}
-
-class MapWidget extends StatefulWidget {
- final String apiKey;
-
- const MapWidget({Key? key, required this.apiKey}) : super(key: key);
-
- @override
- MapWidgetState createState() => MapWidgetState();
-}
-
-class MapWidgetState extends State {
- MPBuilding? currBuilding;
- final _positionProvider = ExamplePositionProvider();
- String? selectedVenueId;
-
- final MPPoint _userPosition = MPPoint.withCoordinates(longitude: 9.94855865542619, latitude: 57.05840589392954, floorIndex: 0);
- var _showRemoveRouteButton = false;
- MPDirectionsService? _directionsService;
- MPDirectionsRenderer? _directionsRenderer;
- PersistentBottomSheetController? directionsController;
- late MapsIndoorsWidget mapController;
-
- List? categoryList = [];
- final searchTextController = TextEditingController();
-
- @override
- void initState() {
- super.initState();
- loadMapsIndoors(widget.apiKey);
- }
-
- void _mapsIndoorsReadyListener(MPError? error) async {
- if (error == null) {
- mapController.goTo(await getDefaultVenue());
- /*mapController.enableLiveData(LiveDataDomainTypes.availability.name);
- mapController.enableLiveData(LiveDataDomainTypes.occupancy.name);
- _positionProvider.updatePosition(_userPosition,
- floorIndex: 0, bearing: 76.2, accuracy: 5.0);
- mapController.setFloorSelector(_floorSelectorWidget);*/
- mapController.setOnMarkerInfoWindowClickListener(onInfoWindowClick);
- mapController.setOnLocationSelectedListener(onLocationSelected, false);
- mapController.setOnMarkerClickListener(onMarkerClick, false);
- mapController.setOnCurrentVenueChangedListener(onVenueFoundAtCameraTarget);
- mapController.setOnCurrentBuildingChangedListener(onBuildingFoundAtCameraTarget);
- mapController.addOnFloorUpdateListener(onFloorUpdate);
- setPositionProvider(_positionProvider);
- }
- }
-
- final scaffoldKey = GlobalKey();
- PersistentBottomSheetController? controller;
- List menuItems = [];
-
- @override
- Widget build(BuildContext context) {
- AppBar appBar = AppBar(
- title: const Text('MapsIndoors Test App'),
- leading: IconButton(
- icon: const Icon(Icons.menu),
- onPressed: () async {
- if (menuItems.isEmpty) {
- getCategories();
- }
- scaffoldKey.currentState?.openDrawer();
- }));
- return Scaffold(
- key: scaffoldKey,
- appBar: appBar,
- floatingActionButton: Visibility(
- visible: _showRemoveRouteButton,
- child: ElevatedButton(
- style: ElevatedButton.styleFrom(backgroundColor: const Color.fromARGB(255, 250, 100, 0)),
- onPressed: _removeRoute,
- child: const Row(
- children: [
- Icon(Icons.close),
- SizedBox(
- width: 5,
- ),
- Text("Clear Route")
- ],
- ),
- ),
- ),
- floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
- drawer: Drawer(
- child: Column(
- children: [
- Container(
- color: Colors.blueGrey,
- child: DrawerHeader(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- Row(
- children: [
- IconButton(
- onPressed: openVenueDialog,
- icon: const Icon(
- Icons.menu_outlined,
- color: Colors.black,
- )),
- Title(color: Colors.black, child: const Text("MapsIndoors")),
- ],
- ),
- const Padding(padding: EdgeInsets.fromLTRB(0, 0, 0, 20)),
- TextField(
- controller: searchTextController,
- onChanged: ((value) {
- _search();
- }),
- decoration: InputDecoration(
- filled: true,
- fillColor: Colors.white70,
- prefixIcon: const Icon(Icons.search),
- border: const OutlineInputBorder(),
- suffixIcon: IconButton(
- onPressed: (() {
- searchTextController.clear();
- FocusScope.of(context).unfocus();
- getCategories();
- }),
- icon: const Icon(Icons.clear)),
- hintText: 'Search',
- ),
- ),
- ],
- ))),
- Expanded(
- child: ListView.builder(
- itemBuilder: (context, index) {
- return ListTile(
- onTap: () => {doMenuItemAction(menuItems[index])},
- title: Text(getTitle(menuItems[index])),
- );
- },
- itemCount: menuItems.length))
- ],
- )),
- body: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- mapController = MapsIndoorsWidget(
- showUserPosition: true,
- readyListener: _mapsIndoorsReadyListener,
- ),
- ],
- ),
- ),
- );
- }
-
- void closeBottomSheet() {
- controller?.close();
- }
-
- Future getMenuCategories() async {
- final temp = await getCategories();
- if (temp != null) {
- menuItems.clear();
- menuItems.addAll(temp.getAll());
- setState(() {});
- }
- }
-
- Future _search() async {
- if (searchTextController.text.isEmpty) {
- getMenuCategories();
- return;
- }
- var query = (MPQuery.builder()..setQuery(searchTextController.text)).build();
- var filterBuilder = MPFilter.builder();
- if (selectedVenueId != null) {
- filterBuilder.setParents([selectedVenueId!]);
- filterBuilder.setDepth(4);
- }
- var filter = filterBuilder.build();
-
- final searchResults = await getLocationsByQuery(query: query, filter: filter);
- if (searchResults != null) {
- menuItems.clear();
- menuItems.addAll(searchResults);
- setState(() {});
- }
- }
-
- Future _selectVenue(MPVenue venue) async {
- mapController.selectVenue(venue, true);
- selectedVenueId = venue.id.value;
- }
-
- Future openVenueDialog() async {
- final venues = await getVenues();
- var options = [];
- if (venues != null) {
- for (var element in venues.getAll()) {
- options.add(SimpleDialogOption(
- onPressed: () => {_selectVenue(element), Navigator.pop(context)},
- child: Text(element.name!),
- ));
- }
-
- // ignore: use_build_context_synchronously
- if (!context.mounted) return;
-
- showDialog(
- context: context,
- builder: (context) {
- return SimpleDialog(
- title: const Text("Select Venue"),
- children: options,
- );
- });
- }
- }
-
- String getTitle(dynamic menuItem) {
- if (menuItem is MPCategory) {
- return menuItem.value;
- } else if (menuItem is MPLocation) {
- return menuItem.name;
- }
- return "";
- }
-
- void doMenuItemAction(dynamic menuItem) async {
- if (menuItem is MPCategory) {
- final query = MPQuery.builder().build();
- final filterBuilder = MPFilter.builder()..setCategories([menuItem.key]);
- if (selectedVenueId != null) {
- filterBuilder.setParents([selectedVenueId!]);
- filterBuilder.setDepth(4);
- }
- List? locs = await getLocationsByQuery(query: query, filter: filterBuilder.build());
- if (locs != null) {
- menuItems.clear();
- menuItems.addAll(locs);
- setState(() {});
- }
- } else if (menuItem is MPLocation) {
- mapController.selectLocation(menuItem);
- scaffoldKey.currentState?.closeDrawer();
- }
- }
-
- void onLocationSelected(MPLocation? location) {
- var description = location?.description;
- var type = location?.typeName;
- var building = location?.buildingName;
- var floor = location?.floorName;
- scaffoldKey.currentState!.showBottomSheet((context) {
- return Container(
- height: MediaQuery.of(context).size.height * 0.35,
- width: MediaQuery.of(context).size.width,
- color: Colors.white,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: [
- const SizedBox(height: 30),
- Text(
- 'Description: $description',
- ),
- const SizedBox(height: 10),
- Text(
- 'type: $type',
- ),
- const SizedBox(height: 10),
- Text(
- '$building - $floor',
- ),
- const SizedBox(height: 30),
- ElevatedButton(
- onPressed: () => _routeStuff(location),
- style: ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20), maximumSize: const Size(150, 40)),
- child: const Row(
- children: [
- Icon(Icons.keyboard_arrow_left_rounded),
- SizedBox(
- width: 5,
- ),
- Text("directions")
- ],
- )),
- ElevatedButton(
- onPressed: () => _editDisplayRule(location),
- child: const Row(
- children: [
- Icon(Icons.colorize),
- SizedBox(
- width: 5,
- ),
- Text("Display Rule")
- ],
- ))
- ],
- ),
- );
- });
- }
-
- void _editDisplayRule(MPLocation? location) async {
- if (location == null) {
- return;
- }
-
- final displayRule = await getDisplayRuleByLocation(location);
- if (displayRule != null) {
- showDisplayRule(displayRule);
- }
- }
-
- //Insane amount of controllers here, because flutter
- var textController = TextEditingController();
- var numberController = TextEditingController();
- String chosenBooleanDisplayRule = "visible";
- String chosenStringDisplayRule = "icon";
- String chosenNumberDisplayRule = "zoomFrom";
- bool currentBooleanRuleState = true;
- PersistentBottomSheetController? persistentBottomSheetController;
-
- void showDisplayRule(MPDisplayRule displayRule) async {
- String? iconUrl = await displayRule.getIconUrl();
- if (iconUrl != null) {
- textController.text = iconUrl;
- }
-
- num? zoomFrom = await displayRule.getZoomFrom();
- if (zoomFrom != null) {
- numberController.text = zoomFrom.toString();
- }
-
- persistentBottomSheetController = scaffoldKey.currentState!.showBottomSheet((context) {
- return Container(
- color: Colors.white,
- height: MediaQuery.of(context).size.height,
- width: MediaQuery.of(context).size.width,
- child: Column(
- children: [
- Title(color: Colors.black, child: const Text("String values")),
- Row(
- children: [
- DropdownButton(
- items: const [
- DropdownMenuItem(value: "icon", child: Text("icon")),
- DropdownMenuItem(value: "label", child: Text("label")),
- DropdownMenuItem(value: "polygonStrokeColor", child: Text("polygonStrokeColor")),
- DropdownMenuItem(value: "polygonFillColor", child: Text("polygonFillColor")),
- ],
- onChanged: (dynamic value) async {
- if (value != null && value is String) {
- chosenStringDisplayRule = value;
- textController.text = await getDisplayRuleValue(value, displayRule);
- persistentBottomSheetController?.setState!(() {});
- }
- },
- value: chosenStringDisplayRule),
- Expanded(
- child: TextField(
- controller: textController,
- decoration: const InputDecoration(
- border: OutlineInputBorder(),
- ),
- )),
- ],
- ),
- ElevatedButton(onPressed: () => saveDisplayRuleValue(chosenStringDisplayRule, displayRule, textController.text), child: const Text("Save string")),
- Title(color: Colors.black, child: const Text("Boolean values")),
- Row(
- children: [
- DropdownButton(
- items: const [
- DropdownMenuItem(value: "visible", child: Text("visible")),
- DropdownMenuItem(value: "iconVisible", child: Text("iconVisible")),
- DropdownMenuItem(value: "labelVisible", child: Text("labelVisible")),
- DropdownMenuItem(value: "polygonVisible", child: Text("polygonVisible")),
- DropdownMenuItem(value: "wallVisible", child: Text("wallVisible")),
- DropdownMenuItem(value: "extrusionVisible", child: Text("extrusionVisible")),
- DropdownMenuItem(value: "2DModelVisible", child: Text("2DModelVisible")),
- ],
- onChanged: (dynamic value) async {
- if (value != null && value is String) {
- chosenBooleanDisplayRule = value;
- currentBooleanRuleState = await getBooleanDisplayRuleValue(value, displayRule);
- persistentBottomSheetController?.setState!(() {});
- }
- },
- value: chosenBooleanDisplayRule,
- ),
- Expanded(
- child: DropdownButton(
- items: const [DropdownMenuItem(value: true, child: Text("true")), DropdownMenuItem(value: false, child: Text("false"))],
- onChanged: (value) {
- persistentBottomSheetController?.setState!(
- () {
- currentBooleanRuleState = value as bool;
- },
- );
- },
- value: currentBooleanRuleState,
- ),
- ),
- ],
- ),
- ElevatedButton(onPressed: () => saveBooleanDisplayRuleValue(chosenBooleanDisplayRule, displayRule, currentBooleanRuleState), child: const Text("Save bool")),
- Title(color: Colors.black, child: const Text("Numerical values")),
- Row(
- children: [
- DropdownButton(
- items: const [
- DropdownMenuItem(value: "zoomFrom", child: Text("zoomFrom")),
- DropdownMenuItem(value: "zoomTo", child: Text("zoomTo")),
- DropdownMenuItem(value: "iconSize", child: Text("iconSize")),
- DropdownMenuItem(value: "labelZoomFrom", child: Text("labelZoomFrom")),
- DropdownMenuItem(value: "labelZoomTo", child: Text("labelZoomTo")),
- DropdownMenuItem(value: "labelMaxWidth", child: Text("labelMaxWidth")),
- DropdownMenuItem(value: "polygonZoomFrom", child: Text("polygonZoomFrom")),
- DropdownMenuItem(value: "polygonZoomTo", child: Text("polygonZoomTo")),
- DropdownMenuItem(value: "polygonOpacity", child: Text("polygonOpacity")),
- ],
- onChanged: (dynamic value) async {
- if (value != null && value is String) {
- numberController.text = (await getNumericalDisplayRuleValue(value, displayRule)).toString();
- chosenNumberDisplayRule = value;
- persistentBottomSheetController?.setState!(() {});
- }
- },
- value: chosenNumberDisplayRule,
- ),
- Expanded(
- child: TextField(
- keyboardType: TextInputType.number,
- inputFormatters: [FilteringTextInputFormatter.allow((RegExp("[.0-9]")))],
- controller: numberController,
- decoration: const InputDecoration(
- border: OutlineInputBorder(),
- ),
- )),
- ],
- ),
- ElevatedButton(onPressed: () => saveNumericalDisplayRuleValue(chosenNumberDisplayRule, displayRule, double.parse(numberController.text)), child: const Text("Save number")),
- ],
- ),
- );
- });
- }
-
- void saveDisplayRuleValue(String value, MPDisplayRule displayRule, String setting) {
- switch (value) {
- case "icon":
- displayRule.setIcon(setting);
- break;
- case "label":
- displayRule.setLabel(setting);
- break;
- case "polygonStrokeColor":
- displayRule.setPolygonStrokeColor(setting);
- break;
- case "polygonFillColor":
- displayRule.setPolygonFillColor(setting);
- break;
- }
- }
-
- Future getDisplayRuleValue(String value, MPDisplayRule displayRule) async {
- switch (value) {
- case "icon":
- String? value = await displayRule.getIconUrl();
- if (value != null) {
- return value;
- } else {
- return "null";
- }
- case "label":
- String? value = await displayRule.getLabel();
- if (value != null) {
- return value;
- } else {
- return "null";
- }
- case "polygonStrokeColor":
- String? value = await displayRule.getPolygonStrokeColor();
- if (value != null) {
- return value;
- } else {
- return "null";
- }
- case "polygonFillColor":
- String? value = await displayRule.getPolygonFillColor();
- if (value != null) {
- return value;
- } else {
- return "null";
- }
- default:
- return "choose a value";
- }
- }
-
- void saveBooleanDisplayRuleValue(String value, MPDisplayRule displayRule, bool setting) {
- switch (value) {
- case "visible":
- displayRule.setVisible(setting);
- break;
- case "iconVisible":
- displayRule.setIconVisible(setting);
- break;
- case "polygonVisible":
- displayRule.setPolygonVisible(setting);
- break;
- case "labelVisible":
- displayRule.setLabelVisible(setting);
- break;
- case "wallVisible":
- displayRule.setWallVisible(setting);
- break;
- case "extrusionVisible":
- displayRule.setExtrusionVisible(setting);
- break;
- case "2DModelVisible":
- displayRule.setModel2DVisible(setting);
- break;
- }
- }
-
- Future getBooleanDisplayRuleValue(String value, MPDisplayRule displayRule) async {
- switch (value) {
- case "visible":
- bool? visible = await displayRule.isVisible();
- if (visible != null && visible) {
- return true;
- } else {
- return false;
- }
- case "iconVisible":
- bool? visible = await displayRule.isIconVisible();
- if (visible != null && visible) {
- return true;
- } else {
- return false;
- }
- case "polygonVisible":
- bool? visible = await displayRule.isPolygonVisible();
- if (visible != null && visible) {
- return true;
- } else {
- return false;
- }
- case "labelVisible":
- bool? visible = await displayRule.isLabelVisible();
- if (visible != null && visible) {
- return true;
- } else {
- return false;
- }
- case "wallVisible":
- bool? visible = await displayRule.isWallVisible();
- if (visible != null && visible) {
- return true;
- } else {
- return false;
- }
- case "extrusionVisible":
- bool? visible = await displayRule.isExtrusionVisible();
- if (visible != null && visible) {
- return true;
- } else {
- return false;
- }
- case "2DModelVisible":
- bool? visible = await displayRule.isModel2DVisible();
- if (visible != null && visible) {
- return true;
- } else {
- return false;
- }
- default:
- return false;
- }
- }
-
- void saveNumericalDisplayRuleValue(String value, MPDisplayRule displayRule, double setting) {
- switch (value) {
- case "zoomFrom":
- displayRule.setZoomFrom(setting);
- break;
- case "zoomTo":
- displayRule.setZoomTo(setting);
- break;
- }
- }
-
- Future getNumericalDisplayRuleValue(String value, MPDisplayRule displayRule) async {
- switch (value) {
- case "zoomFrom":
- var value = await displayRule.getZoomFrom();
- if (value != null) {
- return value;
- } else {
- return 0;
- }
- case "zoomTo":
- var value = await displayRule.getZoomTo();
- if (value != null) {
- return value;
- } else {
- return 0;
- }
- }
- return 0;
- }
-
- void _routeStuff(MPLocation? location) async {
- if (location == null) {
- return;
- }
- _directionsService = MPDirectionsService();
- _directionsRenderer = MPDirectionsRenderer();
- _directionsRenderer?.setOnLegSelectedListener(onLegSelected);
-
- _directionsService?.getRoute(origin: _userPosition, destination: location.point).then((route) {
- _directionsRenderer?.setRoute(route);
- setState(() {
- _currentRoute = route;
- _showRemoveRouteButton = true;
- });
- _showRoute();
- }).catchError((error) {
- ScaffoldMessenger.of(scaffoldKey.currentContext!).showSnackBar(SnackBar(
- content: Text(
- "No Route: $error",
- ),
- ));
- });
- }
-
- void _removeRoute() {
- mapController.deSelectLocation();
- _directionsRenderer?.clear();
- directionsController?.close();
- setState(() {
- _showRemoveRouteButton = false;
- });
- }
-
- MPRoute? _currentRoute;
- int _currentIndex = 0;
-
- void _showRoute() {
- directionsController = scaffoldKey.currentState!.showBottomSheet((context) {
- return Container(
- height: MediaQuery.of(context).size.height * 0.35,
- width: MediaQuery.of(context).size.width,
- color: Colors.white,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- mainAxisSize: MainAxisSize.min,
- children: [
- IconButton(
- onPressed: () => updateDirectionsSheet(_currentIndex - 1),
- icon: const Icon(Icons.keyboard_arrow_left),
- iconSize: 50,
- ),
- Expanded(
- child: Text(
- expandRouteSteps(_currentRoute!.legs![_currentIndex].steps!),
- softWrap: true,
- textAlign: TextAlign.center,
- ),
- ),
- IconButton(
- onPressed: () => updateDirectionsSheet(_currentIndex + 1),
- icon: const Icon(Icons.keyboard_arrow_right),
- iconSize: 50,
- ),
- ],
- ),
- );
- });
- }
-
- String expandRouteSteps(List steps) {
- String sum = "${steps[0].maneuver}";
- for (final step in steps.skip(1)) {
- sum += ", ${step.maneuver}";
- }
- return sum;
- }
-
- void onLegSelected(int legIndex) {
- directionsController!.setState!(() => _currentIndex = legIndex);
- }
-
- void updateDirectionsSheet(int legIndex) {
- if (legIndex < 0) {
- return;
- }
- int tempIndex = min(legIndex, _currentRoute!.legs!.length - 1);
- _directionsRenderer?.selectLegIndex(tempIndex);
- directionsController!.setState!(() => _currentIndex = tempIndex);
- }
-
- void onBuildingFoundAtCameraTarget(MPBuilding? building) {
- if (building != null) {
- print("building found = ${building.name}");
- } else {
- print("building found or not found");
- }
- }
-
- void onFloorUpdate(int floor) {
- print("floor = $floor");
- }
-
- void onInfoWindowClick(String locationId) {
- print("infowindow shown");
- }
-
- void onMarkerClick(String locationId) {
- print("marker clicked location id is = $locationId");
- }
-
- void onVenueFoundAtCameraTarget(MPVenue? venue) {
- if (venue != null) {
- print("venue found = ${venue.administrativeId}");
- } else {
- print("venue found or not found");
- }
- }
-}
diff --git a/mapsindoors_mapbox/example/pubspec.yaml b/mapsindoors_mapbox/example/pubspec.yaml
deleted file mode 100644
index 6bc42f9..0000000
--- a/mapsindoors_mapbox/example/pubspec.yaml
+++ /dev/null
@@ -1,94 +0,0 @@
-name: mapsindoors_example
-description: Demonstrates how to use the mapsindoors plugin.
-version: 2.0.0+1
-
-# The following line prevents the package from being accidentally published to
-# pub.dev using `flutter pub publish`. This is preferred for private packages.
-publish_to: 'none' # Remove this line if you wish to publish to pub.dev
-
-environment:
- sdk: '>=2.18.2 <3.0.0'
-
-# Dependencies specify other packages that your package needs in order to work.
-# To automatically upgrade your package dependencies to the latest versions
-# consider running `flutter pub upgrade --major-versions`. Alternatively,
-# dependencies can be manually updated by changing the version numbers below to
-# the latest version available on pub.dev. To see which dependencies have newer
-# versions available, run `flutter pub outdated`.
-dependencies:
- flutter:
- sdk: flutter
-
- mapsindoors_mapbox:
- # When depending on this package from a real application you should use:
- # mapsindoors_mapbox: ^x.y.z
- # See https://dart.dev/tools/pub/dependencies#version-constraints
- # The example app is bundled with the plugin so we use a path dependency on
- # the parent directory to use the current plugin's version.
- path: ../
-
- # The following adds the Cupertino Icons font to your application.
- # Use with the CupertinoIcons class for iOS style icons.
- cupertino_icons: ^1.0.2
-dependency_overrides:
- mapsindoors_mapbox_android:
- path: ../../mapsindoors_mapbox_android
- mapsindoors_mapbox_ios:
- path: ../../mapsindoors_mapbox_ios
- mapsindoors_platform_interface:
- path: ../../mapsindoors_platform_interface
-
-dev_dependencies:
- integration_test:
- sdk: flutter
- flutter_test:
- sdk: flutter
-
- # The "flutter_lints" package below contains a set of recommended lints to
- # encourage good coding practices. The lint set provided by the package is
- # activated in the `analysis_options.yaml` file located at the root of your
- # package. See that file for information about deactivating specific lint
- # rules and activating additional ones.
- flutter_lints: ^2.0.0
-
-# For information on the generic Dart part of this file, see the
-# following page: https://dart.dev/tools/pub/pubspec
-
-# The following section is specific to Flutter packages.
-flutter:
-
- # The following line ensures that the Material Icons font is
- # included with your application, so that you can use the icons in
- # the material Icons class.
- uses-material-design: true
-
- # To add assets to your application, add an assets section, like this:
- # assets:
- # - images/a_dot_burr.jpeg
- # - images/a_dot_ham.jpeg
-
- # An image asset can refer to one or more resolution-specific "variants", see
- # https://flutter.dev/assets-and-images/#resolution-aware
-
- # For details regarding adding assets from package dependencies, see
- # https://flutter.dev/assets-and-images/#from-packages
-
- # To add custom fonts to your application, add a fonts section here,
- # in this "flutter" section. Each entry in this list should have a
- # "family" key with the font family name, and a "fonts" key with a
- # list giving the asset and other descriptors for the font. For
- # example:
- # fonts:
- # - family: Schyler
- # fonts:
- # - asset: fonts/Schyler-Regular.ttf
- # - asset: fonts/Schyler-Italic.ttf
- # style: italic
- # - family: Trajan Pro
- # fonts:
- # - asset: fonts/TrajanPro.ttf
- # - asset: fonts/TrajanPro_Bold.ttf
- # weight: 700
- #
- # For details regarding fonts from package dependencies,
- # see https://flutter.dev/custom-fonts/#from-packages
diff --git a/mapsindoors_mapbox/example/test/widget_test.dart b/mapsindoors_mapbox/example/test/widget_test.dart
deleted file mode 100644
index 8ff81c2..0000000
--- a/mapsindoors_mapbox/example/test/widget_test.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// This is a basic Flutter widget test.
-//
-// To perform an interaction with a widget in your test, use the WidgetTester
-// utility in the flutter_test package. For example, you can send tap and scroll
-// gestures. You can also use WidgetTester to find child widgets in the widget
-// tree, read text, and verify that the values of widget properties are correct.
-
-import 'package:flutter/material.dart';
-import 'package:flutter_test/flutter_test.dart';
-
-import 'package:mapsindoors_example/main.dart';
-
-void main() {
- testWidgets('Verify Platform version', (WidgetTester tester) async {
- // Build our app and trigger a frame.
- await tester.pumpWidget(const MyApp());
-
- // Verify that platform version is retrieved.
- expect(
- find.byWidgetPredicate(
- (Widget widget) => widget is Text && widget.data!.startsWith('Running on:'),
- ),
- findsOneWidget,
- );
- });
-}
diff --git a/mapsindoors_mapbox_android/CHANGELOG.md b/mapsindoors_mapbox_android/CHANGELOG.md
deleted file mode 100644
index ded7a32..0000000
--- a/mapsindoors_mapbox_android/CHANGELOG.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Changelog
-
-## 2.0.0
-
-* Moved from [mapsindoors_android](https://pub.dev/packages/mapsindoors_android) to allow for multiple map providers
diff --git a/mapsindoors_mapbox_android/LICENSE b/mapsindoors_mapbox_android/LICENSE
deleted file mode 100644
index 75757d5..0000000
--- a/mapsindoors_mapbox_android/LICENSE
+++ /dev/null
@@ -1,11 +0,0 @@
-Copyright 2023 Mapspeople
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mapsindoors_mapbox_android/README.md b/mapsindoors_mapbox_android/README.md
deleted file mode 100644
index 2f000d0..0000000
--- a/mapsindoors_mapbox_android/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-A federated Flutter plugin for integrating with the native MapsIndoors SDK.
-
-This plugin contains the Android platform for the [mapsindoors](pub.dev/packages/mapsindoors) plugin.
diff --git a/mapsindoors_mapbox_android/android/build.gradle b/mapsindoors_mapbox_android/android/build.gradle
deleted file mode 100644
index 57229f2..0000000
--- a/mapsindoors_mapbox_android/android/build.gradle
+++ /dev/null
@@ -1,98 +0,0 @@
-group 'com.mapspeople.mapsindoors'
-version '1.0-SNAPSHOT'
-
-buildscript {
- ext.kotlin_version = '1.6.10'
- repositories {
- maven { url uri("${projectDir}/libs") }
- google()
- mavenCentral()
- maven { url 'https://maven.mapsindoors.com/' }
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.1.2'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- }
-}
-
-allprojects {
- repositories {
- maven { url uri("${projectDir}/libs") }
- google()
- mavenCentral()
- maven { url 'https://maven.mapsindoors.com/' }
- maven {
- url 'https://api.mapbox.com/downloads/v2/releases/maven'
- authentication {
- basic(BasicAuthentication)
- }
- credentials {
- // Do not change the username below.
- // This should always be `mapbox` (not your username).
- username = "mapbox"
- // Use the secret token you stored in gradle.properties as the password
- password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
- }
- }
- }
-}
-
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-
-android {
- compileSdkVersion 31
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- kotlinOptions {
- jvmTarget = '1.8'
- }
-
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
-
- defaultConfig {
- minSdkVersion 21
- }
-}
-
-configurations {
- all*.exclude group: 'com.mapbox.plugin', module:'maps-lifecycle'
-}
-
-dependencies {
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1'
- repositories {
- maven {
- url uri("${rootProject.projectDir}/libs")
- }
- maven {
- url 'https://maven.mapsindoors.com/'
- }
- maven {
- url 'https://api.mapbox.com/downloads/v2/releases/maven'
- authentication {
- basic(BasicAuthentication)
- }
- credentials {
- // Do not change the username below.
- // This should always be `mapbox` (not your username).
- username = "mapbox"
- // Use the secret token you stored in gradle.properties as the password
- password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
- }
- }
- }
-
- implementation ("com.mapbox.maps:android:10.14.1") {
- exclude group: 'com.mapbox.plugin', module: 'maps-lifecycle'
- }
- implementation "com.mapspeople.mapsindoors:mapbox:4.1.10-flutter"
- implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.0"
-}
diff --git a/mapsindoors_mapbox_android/android/gradle.properties b/mapsindoors_mapbox_android/android/gradle.properties
deleted file mode 100644
index 2d8d1e4..0000000
--- a/mapsindoors_mapbox_android/android/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-android.useAndroidX=true
\ No newline at end of file
diff --git a/mapsindoors_mapbox_android/android/gradle/wrapper/gradle-wrapper.jar b/mapsindoors_mapbox_android/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 41d9927..0000000
Binary files a/mapsindoors_mapbox_android/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/mapsindoors_mapbox_android/android/gradle/wrapper/gradle-wrapper.properties b/mapsindoors_mapbox_android/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 41dfb87..0000000
--- a/mapsindoors_mapbox_android/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/mapsindoors_mapbox_android/android/gradlew b/mapsindoors_mapbox_android/android/gradlew
deleted file mode 100644
index 1b6c787..0000000
--- a/mapsindoors_mapbox_android/android/gradlew
+++ /dev/null
@@ -1,234 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright © 2015-2021 the original authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-#
-# Gradle start up script for POSIX generated by Gradle.
-#
-# Important for running:
-#
-# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
-# noncompliant, but you have some other compliant shell such as ksh or
-# bash, then to run this script, type that shell name before the whole
-# command line, like:
-#
-# ksh Gradle
-#
-# Busybox and similar reduced shells will NOT work, because this script
-# requires all of these POSIX shell features:
-# * functions;
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-# * compound commands having a testable exit status, especially «case»;
-# * various built-in commands including «command», «set», and «ulimit».
-#
-# Important for patching:
-#
-# (2) This script targets any POSIX shell, so it avoids extensions provided
-# by Bash, Ksh, etc; in particular arrays are avoided.
-#
-# The "traditional" practice of packing multiple parameters into a
-# space-separated string is a well documented source of bugs and security
-# problems, so this is (mostly) avoided, by progressively accumulating
-# options in "$@", and eventually passing that to Java.
-#
-# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
-# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
-# see the in-line comments for details.
-#
-# There are tweaks for specific operating systems such as AIX, CygWin,
-# Darwin, MinGW, and NonStop.
-#
-# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
-# within the Gradle project.
-#
-# You can find Gradle at https://github.com/gradle/gradle/.
-#
-##############################################################################
-
-# Attempt to set APP_HOME
-
-# Resolve links: $0 may be a link
-app_path=$0
-
-# Need this for daisy-chained symlinks.
-while
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
- [ -h "$app_path" ]
-do
- ls=$( ls -ld "$app_path" )
- link=${ls#*' -> '}
- case $link in #(
- /*) app_path=$link ;; #(
- *) app_path=$APP_HOME$link ;;
- esac
-done
-
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-APP_NAME="Gradle"
-APP_BASE_NAME=${0##*/}
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD=maximum
-
-warn () {
- echo "$*"
-} >&2
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-} >&2
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "$( uname )" in #(
- CYGWIN* ) cygwin=true ;; #(
- Darwin* ) darwin=true ;; #(
- MSYS* | MINGW* ) msys=true ;; #(
- NONSTOP* ) nonstop=true ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
- else
- JAVACMD=$JAVA_HOME/bin/java
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in #(
- max*)
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in #(
- '' | soft) :;; #(
- *)
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
-fi
-
-# Collect all arguments for the java command, stacking in reverse order:
-# * args from the command line
-# * the main class name
-# * -classpath
-# * -D...appname settings
-# * --module-path (only if needed)
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
-
- JAVACMD=$( cygpath --unix "$JAVACMD" )
-
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- for arg do
- if
- case $arg in #(
- -*) false ;; # don't mess with options #(
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
- [ -e "$t" ] ;; #(
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
- # Roll the args list around exactly as many times as the number of
- # args, so each arg winds up back in the position where it started, but
- # possibly modified.
- #
- # NB: a `for` loop captures its iteration list before it begins, so
- # changing the positional parameters here affects neither the number of
- # iterations, nor the values presented in `arg`.
- shift # remove old arg
- set -- "$@" "$arg" # push replacement arg
- done
-fi
-
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
-
-set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
-
-# Use "xargs" to parse quoted args.
-#
-# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
-#
-# In Bash we could simply go:
-#
-# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
-# set -- "${ARGS[@]}" "$@"
-#
-# but POSIX shell has neither arrays nor command substitution, so instead we
-# post-process each arg (as a line of input to sed) to backslash-escape any
-# character that might be a shell metacharacter, then use eval to reverse
-# that process (while maintaining the separation between arguments), and wrap
-# the whole thing up as a single "set" statement.
-#
-# This will of course break if any of these variables contains a newline or
-# an unmatched quote.
-#
-
-eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
-
-exec "$JAVACMD" "$@"
diff --git a/mapsindoors_mapbox_android/android/gradlew.bat b/mapsindoors_mapbox_android/android/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/mapsindoors_mapbox_android/android/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/mapsindoors_mapbox_android/android/settings.gradle b/mapsindoors_mapbox_android/android/settings.gradle
deleted file mode 100644
index 1f0c335..0000000
--- a/mapsindoors_mapbox_android/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'mapsindoors'
diff --git a/mapsindoors_mapbox_android/android/src/main/AndroidManifest.xml b/mapsindoors_mapbox_android/android/src/main/AndroidManifest.xml
deleted file mode 100644
index f2b44f4..0000000
--- a/mapsindoors_mapbox_android/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
diff --git a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/PlatformMapView.kt b/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/PlatformMapView.kt
deleted file mode 100644
index 01a9f25..0000000
--- a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/PlatformMapView.kt
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.mapspeople.mapsindoors
-
-import android.animation.Animator
-import android.annotation.SuppressLint
-import android.content.Context
-import com.mapsindoors.core.MPFloorSelectorInterface
-import com.mapsindoors.mapbox.MPMapConfig
-
-import android.view.View
-import com.mapbox.maps.MapView
-import com.mapbox.maps.MapboxMap
-import com.mapbox.maps.Style
-import com.mapbox.maps.plugin.animation.MapAnimationOptions
-import com.mapbox.maps.plugin.animation.flyTo
-import com.mapspeople.mapsindoors.core.*
-import com.mapspeople.mapsindoors.core.models.*
-
-abstract class PlatformMapView(private val context: Context) : PlatformMapViewInterface {
- private val mMap: MapView = MapView(context)
- private var mMapboxMap: MapboxMap? = null
-
- init {
- mMapboxMap = mMap.getMapboxMap()
- mMapboxMap?.loadStyleUri(Style.MAPBOX_STREETS)
-
- }
-
- @SuppressLint("Lifecycle")
- override fun disposeMap() {
- mMap.onDestroy()
- mMapboxMap = null
- }
-
- override fun getMapView(): View {
- return mMap
- }
-
- override fun makeMPConfig(config: MapConfig?, floorSelectorInterface: MPFloorSelectorInterface) : MPMapConfig? {
- return config?.makeMPMapConfig(context, mMapboxMap!!, mMap, context.getString(R.string.mapbox_api_key), floorSelectorInterface);
- }
-
- override val currentCameraPosition: CameraPosition? get() {
- return mMapboxMap?.cameraState?.toCameraPosition()
- }
-
- override fun updateCamera(move: Boolean, update: CameraUpdate, duration: Int?, success: () -> Unit) {
- mMapboxMap?.let { update.toCameraOptions(it) }?.let {
- if (move) {
- mMapboxMap?.setCamera(it)
- success()
- } else if (duration != null) {
- mMapboxMap?.flyTo(it, MapAnimationOptions.mapAnimationOptions {
- duration(duration.toLong())
- animatorListener(object : Animator.AnimatorListener {
- override fun onAnimationStart(animation: Animator) {
- /* Do nothing */
- }
-
- override fun onAnimationEnd(animation: Animator) {
- success()
- }
-
- override fun onAnimationCancel(animation: Animator) {
- success()
- }
-
- override fun onAnimationRepeat(animation: Animator) {
- /* Do nothing */
- }
-
- })
- })
- } else {
- mMapboxMap?.flyTo(it)
- success()
- }
- }
- }
-}
\ No newline at end of file
diff --git a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/Util.kt b/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/Util.kt
deleted file mode 100644
index 4c2d1e6..0000000
--- a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/Util.kt
+++ /dev/null
@@ -1,103 +0,0 @@
-package com.mapspeople.mapsindoors
-
-import java.lang.reflect.Type
-
-import android.content.Context
-import android.graphics.Typeface
-
-import com.google.gson.reflect.TypeToken
-import com.mapbox.maps.CameraOptions
-
-import com.mapbox.maps.CameraState
-import com.mapbox.maps.CoordinateBounds
-import com.mapbox.maps.EdgeInsets
-import com.mapbox.maps.MapView
-import com.mapbox.maps.MapboxMap
-import com.mapsindoors.core.MPFloorSelectorInterface
-import com.mapsindoors.core.MPPoint
-import com.mapsindoors.mapbox.MPMapConfig
-import com.mapsindoors.mapbox.converters.toPoint
-import com.mapspeople.mapsindoors.core.models.*
-import com.mapspeople.mapsindoors.core.models.CameraUpdateMode.*
-
-
-
-
-inline fun type(): Type = object: TypeToken() {}.type
-
-fun CameraState.toCameraPosition() : CameraPosition {
- return CameraPosition(
- zoom = zoom.toFloat(),
- tilt = pitch.toFloat(),
- bearing = bearing.toFloat(),
- target = MPPoint(center.latitude(), center.longitude())
- )
-}
-
-fun CameraPosition.toCameraState() : CameraState {
- return CameraState(
- target!!.latLng.toPoint(),
- EdgeInsets(0.0,0.0,0.0,0.0),
- zoom!!.toDouble(),
- bearing!!.toDouble(),
- tilt!!.toDouble()
- )
-}
-
-
-fun CameraUpdate.toCameraOptions(map: MapboxMap) : CameraOptions = when (mode) {
- FROMPOINT -> CameraOptions.Builder().center(point?.latLng?.toPoint()).build()
-
- FROMBOUNDS -> if (width != null && height != null) {
- bounds!!.let {
- val coordinateBounds = CoordinateBounds(it.southWest.latLng.toPoint(), it.northEast.latLng.toPoint())
- map.cameraForCoordinateBounds(coordinateBounds, EdgeInsets(height.toDouble(), width.toDouble(), height.toDouble(), width.toDouble()))
- }
- } else {
- bounds!!.let {
- val coordinateBounds = CoordinateBounds(it.southWest.latLng.toPoint(), it.northEast.latLng.toPoint())
- val doublePadding = padding!!.toDouble()
- map.cameraForCoordinateBounds(coordinateBounds, EdgeInsets(doublePadding, doublePadding, doublePadding, doublePadding))
- }
- }
-
- ZOOMBY -> CameraOptions.Builder().zoom(map.cameraState.zoom + zoom!!).build()
-
- ZOOMTO -> CameraOptions.Builder().zoom(zoom!!.toDouble()).build()
-
- FROMCAMERAPOSITION -> {
- position!!.let {
- CameraOptions.Builder().center(it.target!!.latLng.toPoint()).zoom(it.zoom!!.toDouble() - 1).bearing(it.bearing!!.toDouble()).pitch(it.tilt!!.toDouble()).build()
- }
- }
-
-}
-
-
-fun MapConfig.makeMPMapConfig(context: Context, map: MapboxMap, mapView: MapView, apiKey: String, floorSelector: MPFloorSelectorInterface?) : MPMapConfig {
- val builder = MPMapConfig.Builder(context, map, mapView, apiKey, useDefaultMapsIndoorsStyle)
-
- typeface?.let {
- val tf = Typeface.create(it, Typeface.NORMAL)
- builder.setMapLabelFont(tf, color!!, showHalo!!)
- }
- showFloorSelector?.let {
- builder.setShowFloorSelector(it)
- }
- textSize?.let {
- builder.setMapLabelTextSize(it.toInt())
- }
- showInfoWindowOnLocationClicked?.let {
- builder.setShowInfoWindowOnLocationClicked(it)
- }
- showUserPosition?.let {
- builder.setShowUserPosition(it)
- }
- tileFadeInEnabled?.let {
- builder.setTileFadeInEnabled(it)
- }
- floorSelector?.let {
- builder.setFloorSelector(it)
- }
- return builder.build()
-}
\ No newline at end of file
diff --git a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DirectionsRenderer.kt b/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DirectionsRenderer.kt
deleted file mode 100644
index 33eb45d..0000000
--- a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DirectionsRenderer.kt
+++ /dev/null
@@ -1,120 +0,0 @@
-package com.mapspeople.mapsindoors.core
-
-import android.content.Context
-import android.graphics.Color
-import com.google.gson.Gson
-import com.mapsindoors.core.MPCameraViewFitMode
-import com.mapsindoors.core.MPDirectionsRenderer
-import com.mapsindoors.core.MPRoute
-import com.mapsindoors.core.MapControl
-import io.flutter.plugin.common.BinaryMessenger
-import io.flutter.plugin.common.MethodCall
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugin.common.MethodChannel.MethodCallHandler
-
-class DirectionsRenderer(private val context: Context, binaryMessenger: BinaryMessenger) : MethodCallHandler {
- private val directionsRendererChannel = MethodChannel(binaryMessenger, "DirectionsRendererMethodChannel")
- private var mpDirectionsRenderer: MPDirectionsRenderer? = null
- private var mMapControl: MapControl? = null
-
- init {
- directionsRendererChannel.setMethodCallHandler(this)
- }
-
- override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
- val method = call.method.drop(4)
- when (method) {
- "clear" -> {
- mpDirectionsRenderer?.clear()
- result.success("success")
- }
- "getSelectedLegFloorIndex" -> {
- var selectedLegFloorIndex = mpDirectionsRenderer?.selectedLegFloorIndex
- result.success(selectedLegFloorIndex)
- }
- "nextLeg" -> {
- mpDirectionsRenderer?.nextLeg()
- result.success("success")
- }
- "previousLeg" -> {
- mpDirectionsRenderer?.previousLeg()
- result.success("success")
- }
- "selectLegIndex" -> {
- val int = call.argument("legIndex")
- if (int != null) {
- try {
- mpDirectionsRenderer?.selectLegIndex(int)
- } catch (e: java.lang.IllegalStateException) {
- result.error("-1", e.message, call.method)
- }
- }
- result.success("success")
- }
- "setAnimatedPolyline" -> {
- val animated = call.argument("animated")
- val repeated = call.argument("repeating")
- val durationMs = call.argument("durationMs")
- if (animated != null && repeated != null && durationMs != null) {
- mpDirectionsRenderer?.setAnimatedPolyline(animated, repeated, durationMs)
- }
- result.success("success")
- }
- "setCameraAnimationDuration" -> {
- val durationMs = call.argument("durationMs")
- if (durationMs != null) {
- mpDirectionsRenderer?.setCameraAnimationDuration(durationMs)
- }
- result.success("success")
- }
- "setCameraViewFitMode" -> {
- val cameraFitMode = call.argument("cameraFitMode")
- var cameraFitModeEnum: MPCameraViewFitMode? = null
- when (cameraFitMode) {
- 0 -> cameraFitModeEnum = MPCameraViewFitMode.NORTH_ALIGNED
- 1 -> cameraFitModeEnum = MPCameraViewFitMode.FIRST_STEP_ALIGNED
- 2 -> cameraFitModeEnum = MPCameraViewFitMode.START_TO_END_ALIGNED
- else -> {
- result.error("-1", "$cameraFitMode is not supported", call.method)
- return
- }
- }
- mpDirectionsRenderer?.setCameraViewFitMode(cameraFitModeEnum)
- result.success("success")
- }
- "setOnLegSelectedListener" -> {
- mpDirectionsRenderer?.setOnLegSelectedListener {
- directionsRendererChannel.invokeMethod("onLegSelected", it)
- }
- result.success("success")
- }
- "setPolyLineColors" -> {
- val foreground: Int
- val background: Int
- try {
- foreground = Color.parseColor(call.argument("foreground"))
- background = Color.parseColor(call.argument("background"))
- } catch(e: java.lang.IllegalArgumentException) {
- result.error("-1", "${e.message}: ${call.argument("foreground")}, ${call.argument("background")}", call.method)
- return
- }
- mpDirectionsRenderer?.setPolylineColors(foreground, background)
- result.success("success")
- }
- "setRoute" -> {
- val gson = Gson()
- val route = gson.fromJson(call.argument("route"), MPRoute::class.java)
- mpDirectionsRenderer?.setRoute(route)
- result.success("success")
- }
- "useContentOfNearbyLocations" -> {
- result.success("success")
- }
- }
- }
-
- fun setMapControl(mapControl: MapControl) {
- mMapControl = mapControl
- mpDirectionsRenderer = MPDirectionsRenderer(mapControl)
- }
-}
\ No newline at end of file
diff --git a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DirectionsService.kt b/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DirectionsService.kt
deleted file mode 100644
index 119116a..0000000
--- a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DirectionsService.kt
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.mapspeople.mapsindoors.core
-
-import android.content.Context
-import com.google.gson.Gson
-import com.mapsindoors.core.MPDirectionsService
-import com.mapsindoors.core.MPPoint
-import com.mapspeople.mapsindoors.core.models.MPError
-import io.flutter.plugin.common.BinaryMessenger
-import io.flutter.plugin.common.MethodCall
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugin.common.MethodChannel.MethodCallHandler
-import java.util.*
-import kotlin.collections.HashMap
-
-class DirectionsService(private val context: Context, binaryMessenger: BinaryMessenger) : MethodCallHandler {
- private var directionsServiceChannel = MethodChannel(binaryMessenger, "DirectionsServiceMethodChannel")
- private var mpDirectionsService = MPDirectionsService(context)
- private val gson = Gson()
-
- init {
- directionsServiceChannel.setMethodCallHandler(this)
- }
-
- override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
- fun arg(name: String) : T? = call.argument(name)
- val method = call.method.drop(4)
- when (method) {
- "create" -> {
- mpDirectionsService = MPDirectionsService(context)
- result.success("success")
- }
- "addAvoidWayType" -> {
- mpDirectionsService.addAvoidWayType(arg("wayType") as String)
- result.success("success")
- }
- "clearWayType" -> {
- mpDirectionsService.clearWayType()
- result.success("success")
- }
- "setIsDeparture" -> {
- mpDirectionsService.setIsDeparture(arg("isDeparture") as Boolean)
- result.success("success")
- }
- "getRoute" -> {
- mpDirectionsService.setRouteResultListener { route, error ->
- result.success(mapOf("route" to gson.toJson(route), "error" to gson.toJson(MPError.fromMIError(error))))
- }
- val origin = gson.fromJson(arg("origin"), MPPoint::class.java)
- val destination = gson.fromJson(arg("destination"), MPPoint::class.java)
- if (origin != null && destination != null) {
- mpDirectionsService.query(origin, destination)
- }
- }
- "setTravelMode" -> {
- mpDirectionsService.setTravelMode(arg("travelMode") as String)
- result.success("success")
- }
- "setTime" -> {
- val date = Date()
- date.time = (arg("time") as Int).toLong()
- mpDirectionsService.setTime(date)
- result.success("success")
- }
- }
- }
-}
\ No newline at end of file
diff --git a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DisplayRuleHandler.kt b/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DisplayRuleHandler.kt
deleted file mode 100644
index 25c74b6..0000000
--- a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/DisplayRuleHandler.kt
+++ /dev/null
@@ -1,411 +0,0 @@
-package com.mapspeople.mapsindoors.core
-
-import com.google.gson.Gson
-import com.mapsindoors.core.*
-import io.flutter.plugin.common.BinaryMessenger
-import io.flutter.plugin.common.MethodCall
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugin.common.MethodChannel.MethodCallHandler
-
-class DisplayRuleHandler(messenger: BinaryMessenger) : MethodCallHandler {
- private val displayRuleChannel: MethodChannel
- private val gson = Gson()
- init {
- displayRuleChannel = MethodChannel(messenger, "DisplayRuleMethodChannel")
- displayRuleChannel.setMethodCallHandler(this)
- }
-
- override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
- val id = call.argument("id")!!
- val dr: MPDisplayRule? = when (id) {
- "buildingOutline" -> MapsIndoors.getDisplayRule(MPSolutionDisplayRule.BUILDING_OUTLINE)
- "selectionHighlight" -> MapsIndoors.getDisplayRule(MPSolutionDisplayRule.SELECTION_HIGHLIGHT)
- "positionIndicator" -> MapsIndoors.getDisplayRule(MPSolutionDisplayRule.POSITION_INDICATOR)
- else -> MapsIndoors.getDisplayRule(id)
- }
-
- fun error(details: Any? = null) {
- result.error("-1", "Argument was null", details)
- }
- fun success(ret : Any? = "success") {
- result.success(ret)
- }
-
- val method = call.method.drop(4)
-
- dr?.apply {
- when (method) {
- "isVisible" -> success(isVisible)
- "setVisible" -> {
- val visible = call.argument("visible")
- if (visible != null) {
- isVisible = visible
- success()
- } else {
- error()
- }
- }
- "getIconSize" -> success(gson.toJson(iconSize))
- "getIconUrl" -> success(iconUrl)
- "getLabel" -> success(label)
- "getLabelMaxWidth" -> success(labelMaxWidth)
- "getLabelZoomFrom" -> success(labelZoomFrom)
- "getLabelZoomTo" -> success(labelZoomTo)
- "getModel2DBearing" -> success(model2DBearing)
- "getModel2DHeightMeters" -> success(model2DHeightMeters)
- "getModel2DModel" -> success(model2DModel)
- "getModel2DZoomTo" -> success(model2DZoomTo)
- "getModel2DWidthMeters" -> success(model2DWidthMeters)
- "getModel2DZoomFrom" -> success(model2DZoomFrom)
- "getPolygonFillColor" -> success(polygonFillColor)
- "getPolygonFillOpacity" -> success(polygonFillOpacity)
- "getPolygonZoomTo" -> success(polygonZoomTo)
- "getPolygonStrokeColor" -> success(polygonStrokeColor)
- "getPolygonStrokeOpacity" -> success(polygonStrokeOpacity)
- "getPolygonStrokeWidth" -> success(polygonStrokeWidth)
- "getPolygonZoomFrom" -> success(polygonZoomFrom)
- "getZoomFrom" -> success(zoomFrom)
- "getZoomTo" -> success(zoomTo)
- "isIconVisible" -> success(isIconVisible)
- "isLabelVisible" -> success(isLabelVisible)
- "isModel2DVisible" -> success(isModel2DVisible)
- "isPolygonVisible" -> success(isPolygonVisible)
- "isValid" -> success(isValid)
- "reset" -> {
- reset()
- success()
- }
- "setIcon" -> {
- val iconUrl = call.argument("url")
- if (iconUrl != null) {
- setIcon(iconUrl)
- success()
- } else {
- error()
- }
- }
- "setIconVisible" -> {
- val visible = call.argument("visible")
- if (visible != null) {
- isIconVisible = visible
- success()
- } else {
- error()
- }
- }
- "setIconSize" -> {
- val size = gson.fromJson(call.argument("size"), MPIconSize::class.java)
- if (size != null) {
- setIconSize(size.width, size.height)
- success()
- } else {
- error()
- }
- }
- "setLabel" -> {
- val label = call.argument("label")
- if (label != null) {
- dr.label = label
- success()
- } else {
- error()
- }
- }
- "setLabelMaxWidth" -> {
- val maxWidth = call.argument("maxWidth")
- if (maxWidth != null) {
- labelMaxWidth = maxWidth
- success()
- } else {
- error()
- }
- }
- "setLabelVisible" -> {
- val visible = call.argument("visible")
- if (visible != null) {
- isLabelVisible = visible
- success()
- } else {
- error()
- }
- }
- "setLabelZoomFrom" -> {
- val zoomFrom = call.argument("zoomFrom")
- if (zoomFrom != null) {
- labelZoomFrom = zoomFrom.toFloat()
- success()
- } else {
- error()
- }
- }
- "setLabelZoomTo" -> {
- val zoomTo = call.argument("zoomTo")
- if (zoomTo != null) {
- labelZoomTo = zoomTo.toFloat()
- success()
- } else {
- error()
- }
- }
- "setModel2DBearing" -> {
- val bearing = call.argument("bearing")
- if (bearing != null) {
- model2DBearing = bearing
- success()
- } else {
- error()
- }
- }
- "setModel2DModel" -> {
- val model = call.argument("model")
- if (model != null) {
- model2DModel = model
- success()
- } else {
- error()
- }
- }
- "setModel2DHeightMeters" -> {
- val height = call.argument("height")
- if (height != null) {
- model2DHeightMeters = height
- success()
- } else {
- error()
- }
- }
- "setModel2DVisible" -> {
- val visible = call.argument("visible")
- if (visible != null) {
- isModel2DVisible = visible
- success()
- } else {
- error()
- }
- }
- "setModel2DWidthMeters" -> {
- val width = call.argument("width")
- if (width != null) {
- model2DWidthMeters = width
- success()
- } else {
- error()
- }
- }
- "setModel2DZoomFrom" -> {
- val zoomFrom = call.argument("zoomFrom")
- if (zoomFrom != null) {
- model2DZoomFrom = zoomFrom.toFloat()
- success()
- } else {
- error()
- }
- }
- "setModel2DZoomTo" -> {
- val zoomTo = call.argument("zoomTo")
- if (zoomTo != null) {
- model2DZoomTo = zoomTo.toFloat()
- success()
- } else {
- error()
- }
- }
- "setPolygonFillColor" -> {
- val color = call.argument("color")
- if (color != null) {
- polygonFillColor = color
- success()
- } else {
- error()
- }
- }
- "setPolygonFillOpacity" -> {
- val opacity = call.argument("opacity")
- if (opacity != null) {
- polygonFillOpacity = opacity.toFloat()
- success()
- } else {
- error()
- }
- }
- "setPolygonStrokeColor" -> {
- val color = call.argument("color")
- if (color != null) {
- polygonStrokeColor = color
- success()
- } else {
- error()
- }
- }
- "setPolygonStrokeOpacity" -> {
- val opacity = call.argument("opacity")
- if (opacity != null) {
- polygonStrokeOpacity = opacity.toFloat()
- success()
- } else {
- error()
- }
- }
- "setPolygonStrokeWidth" -> {
- val width = call.argument("width")
- if (width != null) {
- polygonStrokeWidth = width.toFloat()
- success()
- } else {
- error()
- }
- }
- "setPolygonVisible" -> {
- val visible = call.argument("visible")
- if (visible != null) {
- isPolygonVisible = visible
- success()
- } else {
- error()
- }
- }
- "setPolygonZoomFrom" -> {
- val zoomFrom = call.argument("zoomFrom")
- if (zoomFrom != null) {
- polygonZoomFrom = zoomFrom.toFloat()
- success()
- } else {
- error()
- }
- }
- "setPolygonZoomTo" -> {
- val zoomTo = call.argument("zoomTo")
- if (zoomTo != null) {
- polygonZoomTo = zoomTo.toFloat()
- success()
- } else {
- error()
- }
- }
- "getExtrusionColor" -> success(extrusionColor)
- "getExtrusionHeight" -> success(extrusionHeight)
- "getExtrusionZoomFrom" -> success(extrusionZoomFrom)
- "getExtrusionZoomTo" -> success(extrusionZoomTo)
- "getWallColor" -> success(wallColor)
- "getWallHeight" -> success(wallHeight)
- "getWallZoomFrom" -> success(wallZoomFrom)
- "getWallZoomTo" -> success(wallZoomTo)
- "isExtrusionVisible" -> success(isExtrusionVisible)
- "isWallVisible" -> success(isWallVisible)
- "setExtrusionColor" -> {
- val color = call.argument("color")
- if (color != null) {
- extrusionColor = color
- success()
- } else {
- error()
- }
- }
- "setExtrusionHeight" -> {
- val height = call.argument("height")
- if (height != null) {
- extrusionHeight = height.toFloat()
- success()
- } else {
- error()
- }
- }
- "setExtrusionVisible" -> {
- val visible = call.argument("visible")
- if (visible != null) {
- isExtrusionVisible = visible
- success()
- } else {
- error()
- }
- }
- "setExtrusionZoomFrom" -> {
- val zoomFrom = call.argument("zoomFrom")
- if (zoomFrom != null) {
- extrusionZoomFrom = zoomFrom.toFloat()
- success()
- } else {
- error()
- }
- }
- "setExtrusionZoomTo" -> {
- val zoomTo = call.argument("zoomTo")
- if (zoomTo != null) {
- extrusionZoomTo = zoomTo.toFloat()
- success()
- } else {
- error()
- }
- }
- "setWallColor" -> {
- val color = call.argument("color")
- if (color != null) {
- wallColor = color
- success()
- } else {
- error()
- }
- }
- "setWallHeight" -> {
- val height = call.argument("height")
- if (height != null) {
- wallHeight = height.toFloat()
- success()
- } else {
- error()
- }
- }
- "setWallVisible" -> {
- val visible = call.argument("visible")
- if (visible != null) {
- isWallVisible = visible
- success()
- } else {
- error()
- }
- }
- "setWallZoomFrom" -> {
- val zoomFrom = call.argument("zoomFrom")
- if (zoomFrom != null) {
- wallZoomFrom = zoomFrom.toFloat()
- success()
- } else {
- error()
- }
- }
- "setWallZoomTo" -> {
- val zoomTo = call.argument("zoomTo")
- if (zoomTo != null) {
- wallZoomTo = zoomTo.toFloat()
- success()
- } else {
- error()
- }
- }
- "setZoomFrom" -> {
- val zoomFromArg = call.argument("zoomFrom")
- if (zoomFromArg != null) {
- zoomFrom = zoomFromArg.toFloat()
- success()
- } else {
- error()
- }
- }
- "setZoomTo" -> {
- val zoomToArg = call.argument("zoomTo")
- if (zoomToArg != null) {
- zoomTo = zoomToArg.toFloat()
- success()
- } else {
- error()
- }
- }
- else -> {
- result.notImplemented()
- }
- }
- return@onMethodCall
- }
- success(null)
- }
-}
\ No newline at end of file
diff --git a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/MapView.kt b/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/MapView.kt
deleted file mode 100644
index cd1245b..0000000
--- a/mapsindoors_mapbox_android/android/src/main/kotlin/com/mapspeople/mapsindoors/core/MapView.kt
+++ /dev/null
@@ -1,533 +0,0 @@
-package com.mapspeople.mapsindoors.core
-
-import android.content.Context
-import android.view.View
-import androidx.lifecycle.DefaultLifecycleObserver
-import androidx.lifecycle.LifecycleOwner
-import com.google.gson.Gson
-import com.mapsindoors.core.*
-import com.mapsindoors.core.models.MPCameraEventListener
-import com.mapsindoors.core.models.MPCameraPosition
-import com.mapsindoors.core.models.MPOnInfoWindowClickListener
-import com.mapsindoors.core.models.MPOnMarkerClickListener
-import com.mapsindoors.core.models.MPMapStyle
-import com.mapspeople.mapsindoors.core.models.*
-import com.mapspeople.mapsindoors.core.*
-import com.mapspeople.mapsindoors.PlatformMapView
-import io.flutter.plugin.common.BinaryMessenger
-import io.flutter.plugin.common.MethodCall
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugin.common.MethodChannel.MethodCallHandler
-import io.flutter.plugin.platform.PlatformView
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class MapView(context: Context, binaryMessenger: BinaryMessenger, val args: HashMap<*,*>?, private val lifecycleProvider: MapsindoorsPlugin.LifecycleProvider) : PlatformMapView(context), PlatformView, MethodCallHandler, DefaultLifecycleObserver {
- private val channel : MethodChannel = MethodChannel(binaryMessenger, "MapControlMethodChannel")
- private val listenerChannel : MethodChannel = MethodChannel(binaryMessenger, "MapControlListenerMethodChannel")
- private val floorSelectorChannel : MethodChannel = MethodChannel(binaryMessenger, "MapControlFloorSelectorChannel")
- private var mMapControl : MapControl? = null
- private val gson = Gson()
- private val mDirectionsRenderer: DirectionsRenderer = DirectionsRenderer(context, binaryMessenger)
- private var mConfig: MapConfig? = null
- private var initializing: Boolean = false
-
- init {
- lifecycleProvider.getLifecycle()?.addObserver(this)
- mConfig = gson.fromJson(args?.get("mapConfig") as? String, MapConfig::class.java)
- channel.setMethodCallHandler(this::onMethodCall)
- listenerChannel.setMethodCallHandler(this::onListenerCall)
- floorSelectorChannel.setMethodCallHandler { call, result ->
- when (call.method) {
- "FSE_onFloorChanged" -> {
- floorSelectorInterface.listener?.onFloorSelectionChanged(gson.fromJson(call.argument("floor"), MPFloor::class.java))
- }
- else -> result.notImplemented()
- }
- }
- }
-
- override fun getView(): View {
- return getMapView()
- }
-
- override fun dispose() {
- lifecycleProvider.getLifecycle()?.removeObserver(this)
- disposeMap()
- mMapControl?.onDestroy()
- mMapControl = null
- mConfig = null
- }
-
- override fun whenMapReady() {
- args?.get("floorSelectorAutoFloorChange")?.let {
- floorSelectorInterface.autoFloorChange = it as Boolean
- }
- initialize()
- }
-
- private val floorSelectorInterface = object : MPFloorSelectorInterface {
- var autoFloorChange = true
- var listener : OnFloorSelectionChangedListener? = null
- override fun getView(): View? {
- return null
- }
-
- override fun setOnFloorSelectionChangedListener(p0: OnFloorSelectionChangedListener?) {
- listener = p0
- }
-
- override fun setList(p0: MutableList?) {
- val ret = if (p0 == null) null else gson.toJson(p0)
- floorSelectorChannel.invokeMethod("setList", ret)
- }
-
- override fun show(p0: Boolean, p1: Boolean) {
- floorSelectorChannel.invokeMethod("show", mapOf("show" to p0, "animate" to p1))
- }
-
- override fun setSelectedFloor(p0: MPFloor) {
- floorSelectorChannel.invokeMethod("setSelectedFloor", gson.toJson(p0))
- }
-
- override fun setSelectedFloorByZIndex(p0: Int) {
- floorSelectorChannel.invokeMethod("setSelectedFloorByZIndex", p0)
- }
-
- override fun zoomLevelChanged(p0: Float) {
- floorSelectorChannel.invokeMethod("zoomLevelChanged", p0.toDouble())
- }
-
- override fun isAutoFloorChangeEnabled(): Boolean {
- return autoFloorChange
- }
-
- override fun setUserPositionFloor(p0: Int) {
- floorSelectorChannel.invokeMethod("setUserPositionFloor", p0)
- }
- }
-
- public fun initialize() {
- if (!initializing) {
- initializing = true;
- CoroutineScope(Dispatchers.Main).launch {
- makeMPConfig(mConfig, floorSelectorInterface)?.let {
- MapControl.create(it) { mc, e ->
- if (e == null && mc != null) {
- mDirectionsRenderer.setMapControl(mc)
- mMapControl = mc
- setupListeners()
- channel.invokeMethod("create", gson.toJson(e))
- }
- initializing = false
- }
- }
- }
- }
- }
-
- private var cameraListener : MPCameraEventListener? = null
- private var floorUpdateListener : OnFloorUpdateListener? = null
- private var buildingFoundAtCameraTargetListener : OnBuildingFoundAtCameraTargetListener? = null
- private var venueFoundAtCameraTargetListener : OnVenueFoundAtCameraTargetListener? = null
- private var locationSelectedListener : OnLocationSelectedListener? = null
- private var mapClickListener : MPOnMapClickListener? = null
- private var markerClickListener : MPOnMarkerClickListener? = null
- private var markerInfoWindowClickListener : MPOnInfoWindowClickListener? = null
-
- private fun setupListeners() {
- cameraListener?.let {
- mMapControl?.addOnCameraEventListener(it)
- }
- floorUpdateListener?.let {
- mMapControl?.addOnFloorUpdateListener(it)
- }
- mMapControl?.setOnCurrentBuildingChangedListener(buildingFoundAtCameraTargetListener)
- mMapControl?.setOnCurrentVenueChangedListener(venueFoundAtCameraTargetListener)
- mMapControl?.setOnLocationSelectedListener(locationSelectedListener)
- mMapControl?.setOnMapClickListener(mapClickListener)
- mMapControl?.setOnMarkerClickListener(markerClickListener)
- mMapControl?.setOnMarkerInfoWindowClickListener(markerInfoWindowClickListener)
- }
-
- private fun setupFloorSelector(autoFloorChangeEnabled: Boolean?) {
- autoFloorChangeEnabled?.let {
- floorSelectorInterface.autoFloorChange = it
- }
- mMapControl?.floorSelector = floorSelectorInterface
- mMapControl?.hideFloorSelector(false)
- }
-
- override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
- fun error(code: String = "-1", message: String? = "Argument was null", details: Any? = null) = result.error(code, message, details)
-
- fun success(ret : Any? = "success") = result.success(ret)
-
- fun arg(name: String) : T? = call.argument