@mapsindoors/react-native-maps-indoors-mapbox 1.0.0 → 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.
- package/README.md +2 -6
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.idea/jarRepositories.xml +15 -0
- package/android/.idea/misc.xml +1 -1
- package/android/.idea/vcs.xml +2 -1
- package/android/build.gradle +2 -5
- package/android/src/main/java/com/reactlibrary/MapboxMapView.java +6 -2
- package/android/src/main/java/com/reactlibrary/MapsIndoorsPackage.java +3 -1
- package/android/src/main/java/com/reactlibrary/core/MPDisplayRuleModule.java +1 -1
- package/android/src/main/java/com/reactlibrary/core/MapControlModule.java +16 -8
- package/android/src/main/java/com/reactlibrary/core/README.md +90 -1
- package/android/src/main/java/com/reactlibrary/core/UtilsModule.java +11 -10
- package/ios/MapsIndoorsViewManager.swift +3 -1
- package/ios/core/DirectionsRendererBridge.m +8 -4
- package/ios/core/DirectionsRendererModule.swift +73 -33
- package/ios/core/MapControlModule.swift +14 -11
- package/ios/core/MapsIndoorsData.swift +17 -2
- package/ios/core/README.md +89 -1
- package/package.json +1 -1
- package/react-native-maps-indoors-mapbox.podspec +2 -2
- package/src/core/MPBounds.ts +13 -3
- package/src/core/MPBuilding.ts +3 -3
- package/src/core/MPCameraPosition.ts +2 -2
- package/src/core/MPFilterBehavior.ts +5 -5
- package/src/core/MPLocation.ts +2 -2
- package/src/core/MPMultiPolygon.ts +17 -4
- package/src/core/MPPoint.ts +9 -4
- package/src/core/MPPolygon.ts +17 -4
- package/src/core/MPPropertyData.ts +1 -1
- package/src/core/MPSelectionBehavior.ts +5 -5
- package/src/core/MPSolutionConfig.ts +2 -2
- package/src/core/MapControl.ts +4 -1
- package/src/core/README.md +89 -1
package/src/core/MPPolygon.ts
CHANGED
|
@@ -95,7 +95,10 @@ export default class MPPolygon extends MPGeometry {
|
|
|
95
95
|
* @type {MPBounds}
|
|
96
96
|
*/
|
|
97
97
|
public get bounds(): MPBounds {
|
|
98
|
-
|
|
98
|
+
if (this._bounds == undefined) {
|
|
99
|
+
this._bounds = MPBounds.fromBBox(this._bbox)
|
|
100
|
+
}
|
|
101
|
+
return this._bounds;
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
/**
|
|
@@ -106,7 +109,10 @@ export default class MPPolygon extends MPGeometry {
|
|
|
106
109
|
* @returns {Promise<number>}
|
|
107
110
|
*/
|
|
108
111
|
public async getArea(): Promise<number> {
|
|
109
|
-
|
|
112
|
+
if (this._area == undefined) {
|
|
113
|
+
this._area = await MPUtils.geometryArea(this);
|
|
114
|
+
}
|
|
115
|
+
return Promise.resolve(this._area);
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
/**
|
|
@@ -175,8 +181,9 @@ export default class MPPolygon extends MPGeometry {
|
|
|
175
181
|
*/
|
|
176
182
|
public toJSON(): MPPolygonParams {
|
|
177
183
|
return {
|
|
178
|
-
|
|
179
|
-
|
|
184
|
+
type: this.type,
|
|
185
|
+
coordinates: this._coordinates,
|
|
186
|
+
bbox: this._bbox,
|
|
180
187
|
}
|
|
181
188
|
}
|
|
182
189
|
}
|
|
@@ -191,6 +198,12 @@ export default class MPPolygon extends MPGeometry {
|
|
|
191
198
|
*/
|
|
192
199
|
export interface MPPolygonParams {
|
|
193
200
|
|
|
201
|
+
/**
|
|
202
|
+
* the type of the geometry, leave this blank as it is just used to parse the geometry to JSON
|
|
203
|
+
*
|
|
204
|
+
* @type {string}
|
|
205
|
+
*/
|
|
206
|
+
type?: string,
|
|
194
207
|
/**
|
|
195
208
|
* Geometry, as specified in the [GeoJSON format]{@link https://stevage.github.io/geojson-spec/#section-3.1.6}.
|
|
196
209
|
*
|
|
@@ -68,7 +68,7 @@ export default class MPPropertyData extends MPEntityInfo {
|
|
|
68
68
|
public static create(object: MPPropertyDataParams): MPPropertyData {
|
|
69
69
|
var floor;
|
|
70
70
|
if (Platform.OS === 'ios') {
|
|
71
|
-
floor = object
|
|
71
|
+
floor = object?.floor as number;
|
|
72
72
|
}else {
|
|
73
73
|
floor = object?.floor ? parseInt(object?.floor as string) : undefined;
|
|
74
74
|
}
|
|
@@ -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
|
|
47
|
-
object?.moveCamera
|
|
48
|
-
object?.animationDuration
|
|
49
|
-
object?.showInfoWindow
|
|
50
|
-
object?.zoomToFit
|
|
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
|
}
|
|
@@ -67,7 +67,7 @@ export default class MPSolutionConfig {
|
|
|
67
67
|
* @type {MPCollisionHandling}
|
|
68
68
|
*/
|
|
69
69
|
public get collisionHandling(): MPCollisionHandling {
|
|
70
|
-
return this._mpCollisionHandling
|
|
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
|
|
91
|
+
return this._enableClustering ? this._enableClustering : true;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
package/src/core/MapControl.ts
CHANGED
|
@@ -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
|
|
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 => {
|
package/src/core/README.md
CHANGED
|
@@ -1,4 +1,92 @@
|
|
|
1
1
|
# react-native-mapsindoors-core
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
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.
|