@mapsindoors/react-native-maps-indoors-mapbox 0.0.5-beta → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +7 -2
  2. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  3. package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
  4. package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
  5. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  7. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  8. package/android/.idea/jarRepositories.xml +15 -0
  9. package/android/.idea/misc.xml +1 -1
  10. package/android/.idea/vcs.xml +2 -1
  11. package/android/build.gradle +2 -5
  12. package/android/src/main/java/com/reactlibrary/MapboxMapView.java +116 -0
  13. package/android/src/main/java/com/reactlibrary/MapsIndoorsPackage.java +9 -2
  14. package/android/src/main/java/com/reactlibrary/{DirectionsRendererModule.java → core/DirectionsRendererModule.java} +3 -2
  15. package/android/src/main/java/com/reactlibrary/{DirectionsServiceModule.java → core/DirectionsServiceModule.java} +1 -1
  16. package/android/src/main/java/com/reactlibrary/{MPDisplayRuleModule.java → core/MPDisplayRuleModule.java} +3 -3
  17. package/android/src/main/java/com/reactlibrary/{MapControlModule.java → core/MapControlModule.java} +31 -64
  18. package/android/src/main/java/com/reactlibrary/{MapsIndoorsModule.java → core/MapsIndoorsModule.java} +6 -6
  19. package/android/src/main/java/com/reactlibrary/core/RCMapView.java +16 -0
  20. package/android/src/main/java/com/reactlibrary/core/README.md +92 -0
  21. package/android/src/main/java/com/reactlibrary/{UtilsModule.java → core/UtilsModule.java} +13 -12
  22. package/android/src/main/java/com/reactlibrary/{models → core/models}/Bounds.java +1 -1
  23. package/android/src/main/java/com/reactlibrary/{models → core/models}/Filter.java +1 -1
  24. package/android/src/main/java/com/reactlibrary/{models → core/models}/Location.java +1 -1
  25. package/android/src/main/java/com/reactlibrary/{models → core/models}/MPCameraPosition.java +12 -7
  26. package/android/src/main/java/com/reactlibrary/core/models/MPCameraUpdate.java +68 -0
  27. package/android/src/main/java/com/reactlibrary/{models → core/models}/MPError.java +1 -1
  28. package/android/src/main/java/com/reactlibrary/{models → core/models}/PositionProvider.java +1 -1
  29. package/android/src/main/java/com/reactlibrary/{models → core/models}/PositionResult.java +1 -1
  30. package/android/src/main/java/com/reactlibrary/{models → core/models}/Query.java +1 -1
  31. package/index.ts +88 -89
  32. package/ios/MapsIndoorsViewManager.swift +90 -9
  33. package/ios/core/CameraPosition.swift +15 -0
  34. package/ios/core/CameraUpdate.swift +19 -0
  35. package/ios/core/CameraUpdateError.swift +11 -0
  36. package/ios/{DirectionsRendererBridge.m → core/DirectionsRendererBridge.m} +9 -5
  37. package/ios/{DirectionsRendererModule.swift → core/DirectionsRendererModule.swift} +89 -39
  38. package/ios/{MapControlModule.swift → core/MapControlModule.swift} +21 -108
  39. package/ios/{MapsIndoorsBridge.m → core/MapsIndoorsBridge.m} +18 -0
  40. package/ios/{MapsIndoorsData.swift → core/MapsIndoorsData.swift} +19 -4
  41. package/ios/{MapsIndoorsModule.swift → core/MapsIndoorsModule.swift} +50 -1
  42. package/ios/core/RCMapView.swift +14 -0
  43. package/ios/core/README.md +92 -0
  44. package/ios/{UtilsModule.swift → core/UtilsModule.swift} +4 -4
  45. package/package.json +6 -5
  46. package/react-native-maps-indoors-mapbox.podspec +2 -2
  47. package/src/{MPBounds.ts → core/MPBounds.ts} +25 -7
  48. package/src/{MPBuilding.ts → core/MPBuilding.ts} +4 -4
  49. package/src/{MPCameraEvent.ts → core/MPCameraEvent.ts} +1 -1
  50. package/src/{MPCameraEventListener.ts → core/MPCameraEventListener.ts} +1 -1
  51. package/src/{MPCameraPosition.ts → core/MPCameraPosition.ts} +2 -3
  52. package/src/{MPCategory.ts → core/MPCategory.ts} +1 -1
  53. package/src/{MPDirectionsRenderer.ts → core/MPDirectionsRenderer.ts} +4 -4
  54. package/src/{MPDirectionsService.ts → core/MPDirectionsService.ts} +1 -1
  55. package/src/{MPDisplayRule.ts → core/MPDisplayRule.ts} +1 -1
  56. package/src/{MPEntity.ts → core/MPEntity.ts} +1 -1
  57. package/src/{MPEntityInfo.ts → core/MPEntityInfo.ts} +1 -1
  58. package/src/{MPFilter.ts → core/MPFilter.ts} +1 -1
  59. package/src/{MPFilterBehavior.ts → core/MPFilterBehavior.ts} +6 -6
  60. package/src/{MPFloor.ts → core/MPFloor.ts} +1 -1
  61. package/src/{MPFloorSelectorInterface.ts → core/MPFloorSelectorInterface.ts} +1 -1
  62. package/src/{MPLocation.ts → core/MPLocation.ts} +3 -3
  63. package/src/{MPMapConfig.ts → core/MPMapConfig.ts} +1 -1
  64. package/src/{MPMultiPolygon.ts → core/MPMultiPolygon.ts} +18 -5
  65. package/src/{MPPoint.ts → core/MPPoint.ts} +14 -10
  66. package/src/{MPPolygon.ts → core/MPPolygon.ts} +18 -5
  67. package/src/{MPPositionProviderInterface.ts → core/MPPositionProviderInterface.ts} +1 -1
  68. package/src/{MPPositionResultInterface.ts → core/MPPositionResultInterface.ts} +1 -1
  69. package/src/{MPPropertyData.ts → core/MPPropertyData.ts} +2 -2
  70. package/src/{MPQuery.ts → core/MPQuery.ts} +1 -1
  71. package/src/{MPRoute.ts → core/MPRoute.ts} +1 -1
  72. package/src/{MPRouteCoordinate.ts → core/MPRouteCoordinate.ts} +1 -1
  73. package/src/{MPRouteLeg.ts → core/MPRouteLeg.ts} +1 -1
  74. package/src/{MPRouteStep.ts → core/MPRouteStep.ts} +1 -1
  75. package/src/{MPSelectionBehavior.ts → core/MPSelectionBehavior.ts} +6 -6
  76. package/src/{MPSettings3D.ts → core/MPSettings3D.ts} +1 -1
  77. package/src/{MPSolution.ts → core/MPSolution.ts} +1 -1
  78. package/src/{MPSolutionConfig.ts → core/MPSolutionConfig.ts} +3 -3
  79. package/src/{MPSolutionDisplayRule.ts → core/MPSolutionDisplayRule.ts} +1 -1
  80. package/src/{MPUserRoleCollection.ts → core/MPUserRoleCollection.ts} +1 -1
  81. package/src/{MPUtils.ts → core/MPUtils.ts} +1 -1
  82. package/src/{MPVenue.ts → core/MPVenue.ts} +1 -1
  83. package/src/{MapControl.ts → core/MapControl.ts} +5 -2
  84. package/src/{MapsIndoors.ts → core/MapsIndoors.ts} +1 -1
  85. package/src/{OnBuildingFoundAtCameraTargetListener.ts → core/OnBuildingFoundAtCameraTargetListener.ts} +1 -1
  86. package/src/{OnFloorSelectionChangedListener.ts → core/OnFloorSelectionChangedListener.ts} +1 -1
  87. package/src/{OnLegSelectedListener.ts → core/OnLegSelectedListener.ts} +1 -1
  88. package/src/{OnLocationSelectedListener.ts → core/OnLocationSelectedListener.ts} +1 -1
  89. package/src/{OnMapClickListener.ts → core/OnMapClickListener.ts} +1 -1
  90. package/src/{OnMarkerClickListener.ts → core/OnMarkerClickListener.ts} +1 -1
  91. package/src/{OnMarkerInfoWindowClickListener.ts → core/OnMarkerInfoWindowClickListener.ts} +1 -1
  92. package/src/{OnPositionUpdateListener.ts → core/OnPositionUpdateListener.ts} +1 -1
  93. package/src/{OnVenueFoundAtCameraTargetListener.ts → core/OnVenueFoundAtCameraTargetListener.ts} +1 -1
  94. package/src/core/README.md +92 -0
  95. package/android/src/main/java/com/reactlibrary/models/MPCameraUpdate.java +0 -92
  96. /package/ios/{DirectionsServiceBridge.m → core/DirectionsServiceBridge.m} +0 -0
  97. /package/ios/{DirectionsServiceModule.swift → core/DirectionsServiceModule.swift} +0 -0
  98. /package/ios/{MPDisplayRuleBridge.m → core/MPDisplayRuleBridge.m} +0 -0
  99. /package/ios/{MPDisplayRuleModule.swift → core/MPDisplayRuleModule.swift} +0 -0
  100. /package/ios/{MapControlBridge.m → core/MapControlBridge.m} +0 -0
  101. /package/ios/{ReactPositionProvider.swift → core/ReactPositionProvider.swift} +0 -0
  102. /package/ios/{UtilsBridge.m → core/UtilsBridge.m} +0 -0
  103. /package/ios/{helpers.swift → core/helpers.swift} +0 -0
  104. /package/src/{EventNames.ts → core/EventNames.ts} +0 -0
  105. /package/src/{MPBuildingCollection.ts → core/MPBuildingCollection.ts} +0 -0
  106. /package/src/{MPBuildingInfo.ts → core/MPBuildingInfo.ts} +0 -0
  107. /package/src/{MPCameraUpdate.ts → core/MPCameraUpdate.ts} +0 -0
  108. /package/src/{MPCameraViewFitMode.ts → core/MPCameraViewFitMode.ts} +0 -0
  109. /package/src/{MPCategoryCollection.ts → core/MPCategoryCollection.ts} +0 -0
  110. /package/src/{MPCollection.ts → core/MPCollection.ts} +0 -0
  111. /package/src/{MPCollisionHandling.ts → core/MPCollisionHandling.ts} +0 -0
  112. /package/src/{MPDataField.ts → core/MPDataField.ts} +0 -0
  113. /package/src/{MPError.ts → core/MPError.ts} +0 -0
  114. /package/src/{MPGeometry.ts → core/MPGeometry.ts} +0 -0
  115. /package/src/{MPHighway.ts → core/MPHighway.ts} +0 -0
  116. /package/src/{MPIconSize.ts → core/MPIconSize.ts} +0 -0
  117. /package/src/{MPLocationPropertyNames.ts → core/MPLocationPropertyNames.ts} +0 -0
  118. /package/src/{MPLocationType.ts → core/MPLocationType.ts} +0 -0
  119. /package/src/{MPMapStyle.ts → core/MPMapStyle.ts} +0 -0
  120. /package/src/{MPRouteProperty.ts → core/MPRouteProperty.ts} +0 -0
  121. /package/src/{MPSize.ts → core/MPSize.ts} +0 -0
  122. /package/src/{MPUserRole.ts → core/MPUserRole.ts} +0 -0
  123. /package/src/{MPVenueCollection.ts → core/MPVenueCollection.ts} +0 -0
  124. /package/src/{MPVenueInfo.ts → core/MPVenueInfo.ts} +0 -0
  125. /package/src/{MapView.tsx → core/MapView.tsx} +0 -0
  126. /package/src/{OnFloorUpdateListener.ts → core/OnFloorUpdateListener.ts} +0 -0
  127. /package/src/{OnLiveLocationUpdateListener.ts → core/OnLiveLocationUpdateListener.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { MPRouteStep, MPRouteProperty, MPRoutePropertyParams, MPRouteCoordinate, MPRouteCoordinateParams, MPRoute } from "../index";
1
+ import { MPRouteStep, MPRouteProperty, MPRoutePropertyParams, MPRouteCoordinate, MPRouteCoordinateParams, MPRoute } from "../../index";
2
2
 
3
3
  /**
4
4
  * A leg of a {@link MPRoute} is defined as all steps between any context shifts (entering/exiting buildings, changing floors).
@@ -1,4 +1,4 @@
1
- import { MPRouteProperty, MPRoutePropertyParams, MPRouteCoordinate, MPRouteCoordinateParams } from "../index";
1
+ import { MPRouteProperty, MPRoutePropertyParams, MPRouteCoordinate, MPRouteCoordinateParams } from "../../index";
2
2
 
3
3
  /**
4
4
  * Description placeholder.
@@ -1,4 +1,4 @@
1
- import MapControl from "../index";
1
+ import MapControl from "../../index";
2
2
 
3
3
  /**
4
4
  * Sets a behavior for the map when calling {@link MapControl#selectLocation}.
@@ -43,11 +43,11 @@ export default class MPSelectionBehavior {
43
43
  */
44
44
  static create(object: MPSelectionBehaviorParams): MPSelectionBehavior {
45
45
  return new MPSelectionBehavior(
46
- object?.allowFloorChange ?? true,
47
- object?.moveCamera ?? true,
48
- object?.animationDuration ?? 500,
49
- object?.showInfoWindow ?? true,
50
- object?.zoomToFit ?? true
46
+ object?.allowFloorChange ? object.allowFloorChange : true,
47
+ object?.moveCamera ? object.moveCamera : true,
48
+ object?.animationDuration ? object.animationDuration : 500,
49
+ object?.showInfoWindow ? object.showInfoWindow : true,
50
+ object?.zoomToFit ? object.zoomToFit : true
51
51
  );
52
52
  }
53
53
  }
@@ -1,5 +1,5 @@
1
1
  import MPUtils from "./MPUtils";
2
- import { MPSolutionConfig } from "../index"
2
+ import { MPSolutionConfig } from "../../index"
3
3
 
4
4
  /**
5
5
  * A configuration object that governs layer settings for 3D features.
@@ -1,4 +1,4 @@
1
- import { MPSolutionConfig } from "../index";
1
+ import { MPSolutionConfig } from "../../index";
2
2
  import MPUtils from "./MPUtils";
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { MPCollisionHandling, MPSettings3D } from "../index";
1
+ import { MPCollisionHandling, MPSettings3D } from "../../index";
2
2
  import MPUtils from "./MPUtils";
3
3
 
4
4
  /**
@@ -67,7 +67,7 @@ export default class MPSolutionConfig {
67
67
  * @type {MPCollisionHandling}
68
68
  */
69
69
  public get collisionHandling(): MPCollisionHandling {
70
- return this._mpCollisionHandling ?? MPCollisionHandling.allowOverlap;
70
+ return this._mpCollisionHandling ? this._mpCollisionHandling : MPCollisionHandling.allowOverlap;
71
71
  }
72
72
 
73
73
  /**
@@ -88,7 +88,7 @@ export default class MPSolutionConfig {
88
88
  * @type {boolean}
89
89
  */
90
90
  public get enableClustering(): boolean {
91
- return this._enableClustering ?? true;
91
+ return this._enableClustering ? this._enableClustering : true;
92
92
  }
93
93
  }
94
94
 
@@ -1,4 +1,4 @@
1
- import { MPDisplayRule } from "../index";
1
+ import { MPDisplayRule } from "../../index";
2
2
 
3
3
  /**
4
4
  * Special {@link MPDisplayRule}s that govern specific scenarios
@@ -1,5 +1,5 @@
1
1
  import MPCollection from "./MPCollection";
2
- import MapsIndoors, {MPUserRole} from "../index";
2
+ import MapsIndoors, {MPUserRole} from "../../index";
3
3
 
4
4
  /**
5
5
  * A collection of user role objects fetched from {@link MapsIndoors}. Uses {@link MPUserRole.id} as key.
@@ -1,5 +1,5 @@
1
1
  import { NativeModules } from 'react-native';
2
- import { MPGeometry, MPPoint, MPCollisionHandling } from '../index';
2
+ import { MPGeometry, MPPoint, MPCollisionHandling } from '../../index';
3
3
  const { UtilsModule } = NativeModules;
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { Platform } from "react-native";
2
- import { MPPoint, MPPointParams, MPBounds, MPMapStyle, MPPolygon, MPVenueInfo, MPDataField, MPBuilding, MPLocation } from '../index';
2
+ import { MPPoint, MPPointParams, MPBounds, MPMapStyle, MPPolygon, MPVenueInfo, MPDataField, MPBuilding, MPLocation } from '../../index';
3
3
  import MPEntity from "./MPEntity";
4
4
  import MPUtils from "./MPUtils";
5
5
 
@@ -7,7 +7,7 @@ import {
7
7
  OnVenueFoundAtCameraTargetListener, OnBuildingFoundAtCameraTargetListener,
8
8
  OnMarkerClickListener, OnMarkerInfoWindowClickListener,
9
9
  OnLiveLocationUpdateListener, MPCameraEvent, MPMapStyle, MPCameraUpdate, MPCameraPosition, MPEntity,
10
- } from "../index"
10
+ } from "../../index"
11
11
  import { EventNames } from './EventNames';
12
12
 
13
13
 
@@ -650,6 +650,9 @@ export default class MapControl {
650
650
  * @returns {Promise<void>}
651
651
  */
652
652
  public async animateCamera(update: MPCameraUpdate, duration?: number): Promise<void> {
653
+ if (duration === undefined) {
654
+ duration = -1;
655
+ }
653
656
  await MapControlModule.animateCamera(JSON.stringify(update), duration);
654
657
  }
655
658
 
@@ -685,7 +688,7 @@ export default class MapControl {
685
688
  * @param {?boolean} [consumeEvent] Whether the SDK should also react to this event.
686
689
  */
687
690
  public setOnMapClickListener(listener?: OnMapClickListener, consumeEvent?: boolean): void {
688
- MapControlModule.setOnMapClickListener(listener !== undefined, consumeEvent ?? false);
691
+ MapControlModule.setOnMapClickListener(listener !== undefined, consumeEvent ? true : false);
689
692
  this.onMapClickSub?.remove();
690
693
  if (listener !== undefined) {
691
694
  this.onMapClickSub = this.eventEmitter?.addListener(EventNames.onMapClick, event => {
@@ -4,7 +4,7 @@ import {
4
4
  MPLocation, MPSolution, MPVenue, MPQuery, MPFilter,
5
5
  MPDisplayRule, MPSolutionDisplayRule, MPPositionProviderInterface,
6
6
  MPPositionResultInterface, MPUserRole, MPError, MPCategoryCollection, MPUserRoleCollection
7
- } from "../index";
7
+ } from "../../index";
8
8
  import MPBuildingCollection from './MPBuildingCollection';
9
9
  import MPVenueCollection from './MPVenueCollection';
10
10
 
@@ -1,4 +1,4 @@
1
- import { MPBuilding } from '../index';
1
+ import { MPBuilding } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when focus changes to a new building within the camera bounds.
@@ -1,4 +1,4 @@
1
- import { MPFloor } from '../index';
1
+ import { MPFloor } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when the active floor is changed.
@@ -1,4 +1,4 @@
1
- import {MPRouteLeg} from '../index';
1
+ import {MPRouteLeg} from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked during directions when a {@link MPRouteLeg} is selected.
@@ -1,4 +1,4 @@
1
- import { MPLocation } from '../index';
1
+ import { MPLocation } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when a {@link MPLocation} is selected.
@@ -1,4 +1,4 @@
1
- import { MPPoint, MPLocation } from '../index';
1
+ import { MPPoint, MPLocation } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when the map is clicked.
@@ -1,4 +1,4 @@
1
- import { MPLocation } from '../index';
1
+ import { MPLocation } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when a {@link MPLocation} marker is clicked on the map.
@@ -1,4 +1,4 @@
1
- import { MPLocation } from '../index';
1
+ import { MPLocation } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when a markers infowindow is clicked.
@@ -1,4 +1,4 @@
1
- import { MPPositionResultInterface } from '../index';
1
+ import { MPPositionResultInterface } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when user positioning is updated.
@@ -1,4 +1,4 @@
1
- import { MPVenue } from '../index';
1
+ import { MPVenue } from '../../index';
2
2
 
3
3
  /**
4
4
  * Listener that is invoked when focus changes to a new venue within the camera bounds.
@@ -0,0 +1,92 @@
1
+ # react-native-mapsindoors-core
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://git.rtx.mapspeople.com/timi/react-native-mapsindoors-core.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://git.rtx.mapspeople.com/timi/react-native-mapsindoors-core/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
53
+
54
+ ## Name
55
+ Choose a self-explaining name for your project.
56
+
57
+ ## Description
58
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
59
+
60
+ ## Badges
61
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
62
+
63
+ ## Visuals
64
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
65
+
66
+ ## Installation
67
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
68
+
69
+ ## Usage
70
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
71
+
72
+ ## Support
73
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
74
+
75
+ ## Roadmap
76
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
77
+
78
+ ## Contributing
79
+ State if you are open to contributions and what your requirements are for accepting them.
80
+
81
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
82
+
83
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
84
+
85
+ ## Authors and acknowledgment
86
+ Show your appreciation to those who have contributed to the project.
87
+
88
+ ## License
89
+ For open source projects, say how it is licensed.
90
+
91
+ ## Project status
92
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -1,92 +0,0 @@
1
- package com.reactlibrary.models;
2
-
3
- import com.google.gson.annotations.SerializedName;
4
- import com.mapbox.geojson.Point;
5
- import com.mapbox.maps.CameraOptions;
6
- import com.mapbox.maps.CoordinateBounds;
7
- import com.mapbox.maps.EdgeInsets;
8
- import com.mapbox.maps.MapboxMap;
9
- import com.mapsindoors.core.MPPoint;
10
-
11
- public class MPCameraUpdate {
12
- @SerializedName("mode")
13
- String modeString;
14
- @SerializedName("point")
15
- MPPoint point;
16
- @SerializedName("bounds")
17
- Bounds bounds;
18
- @SerializedName("padding")
19
- Integer padding;
20
- @SerializedName("width")
21
- Integer width;
22
- @SerializedName("height")
23
- Integer height;
24
- @SerializedName("zoom")
25
- Float zoom;
26
- @SerializedName("position")
27
- MPCameraPosition position;
28
-
29
-
30
- private CameraUpdateMode getMode() {
31
- return CameraUpdateMode.fromString(modeString);
32
- }
33
-
34
- public CameraOptions toCameraOptions(MapboxMap map) {
35
- CameraUpdateMode mode = getMode();
36
- if (mode == null) {
37
- return null;
38
- }
39
-
40
- switch (mode) {
41
- case FROM_POINT:
42
- return new CameraOptions.Builder().center(Point.fromLngLat(point.getLng(),point.getLat())).build();
43
- case FROM_BOUNDS:
44
- Point southWest = Point.fromLngLat(bounds.getSouthWest().getLng(), bounds.getSouthWest().getLat());
45
- Point northEast = Point.fromLngLat(bounds.getNorthEast().getLng(), bounds.getNorthEast().getLat());
46
- CoordinateBounds coordinateBounds = new CoordinateBounds(southWest, northEast);
47
- return map.cameraForCoordinateBounds(coordinateBounds, new EdgeInsets(0,0,0,0), null, null);
48
- case ZOOM_BY:
49
- return new CameraOptions.Builder().zoom(map.getCameraState().getZoom() + zoom).build();
50
- case ZOOM_TO:
51
- return new CameraOptions.Builder().zoom(Double.valueOf(zoom)).build();
52
- case FROM_CAMERA_POSITION:
53
- return new CameraOptions.Builder()
54
- .center(Point.fromLngLat(position.target.getLng(), position.target.getLat()))
55
- .zoom(Double.valueOf(position.zoom))
56
- .bearing(Double.valueOf(position.bearing))
57
- .pitch(Double.valueOf(position.tilt))
58
- .build();
59
- }
60
- return null;
61
- }
62
-
63
- public enum CameraUpdateMode {
64
- FROM_POINT("fromPoint"),
65
- FROM_BOUNDS("fromBounds"),
66
- ZOOM_BY("zoomBy"),
67
- ZOOM_TO("zoomTo"),
68
- FROM_CAMERA_POSITION("fromCameraPosition");
69
- final String mode;
70
- CameraUpdateMode(String mode) {
71
- this.mode = mode;
72
- }
73
-
74
- public static CameraUpdateMode fromString(String value) {
75
- switch (value) {
76
- case "fromPoint":
77
- return FROM_POINT;
78
- case "fromBounds":
79
- return FROM_BOUNDS;
80
- case "zoomBy":
81
- return ZOOM_BY;
82
- case "zoomTo":
83
- return ZOOM_TO;
84
- case "fromCameraPosition":
85
- return FROM_CAMERA_POSITION;
86
- default:
87
- return null;
88
- }
89
- }
90
-
91
- }
92
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes