Skip to content

README: booth navigation, debug explanation #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,36 @@ Event driven communication between React Native and Native layers(iOS, android).

android: android/src/main/java/com/meridianmaps/MapViewFragment.java -
```kt
private void sendEvent(String eventName, @androidx.annotation.Nullable com.facebook.react.bridge.WritableMap params)
private void sendEvent(String eventName, @androidx.annotation.Nullable com.facebook.react.bridge.WritableMap params)
```

iOS: ios/MeridianCustom/MMEventEmitter.m -
```swift
swift - (void)emitCustomEvent: (NSString *)eventName body: (NSDictionary *)body
```objc
- (void)emitCustomEvent: (NSString *)eventName body: (NSDictionary *)body
```
#### booth simulated navigation -
booth navigation is only possible for certain routes(GPS coordinates can be configured in the [Edit console](edit.meridianapp.com))

custom `startRouteToPlacemark` method is implemented to allow navigation by booth id

android: android/src/main/java/com/meridianmaps/MeridianMapViewManager.kt
```kt
fun startRouteToPlacemark(placemarkId: String)
```
iOS: ios/MeridianMapViewManager.m
```objc
- (void)startRouteToPlacemarkWithID:(NSString *)placemarkID
```
##### debug
booth id logging can be achieved with
android: android/src/main/java/com/meridianmaps/MapViewFragment.java'
```java
public boolean onMarkerSelect(Marker marker)
```
iOS: ios/MeridianCustom/CustomMapViewController.m
```objc
- (void)mapView:(MRMapView *)mapView didSelectAnnotationView:(MRAnnotationView *)view
```

Comment on lines +33 to 56
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix heading level structure.

The content about booth simulated navigation is valuable, but there's a heading structure issue. The static analysis tool correctly identified that heading levels should only increment by one level at a time.

-#### booth simulated navigation - 
+### Booth Simulated Navigation

Also consider improving the formatting and structure of this section for better readability.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### booth simulated navigation -
booth navigation is only possible for certain routes(GPS coordinates can be configured in the [Edit console](edit.meridianapp.com))
custom `startRouteToPlacemark` method is implemented to allow navigation by booth id
android: android/src/main/java/com/meridianmaps/MeridianMapViewManager.kt
```kt
fun startRouteToPlacemark(placemarkId: String)
```
iOS: ios/MeridianMapViewManager.m
```objc
- (void)startRouteToPlacemarkWithID:(NSString *)placemarkID
```
##### debug
booth id logging can be achieved with
android: android/src/main/java/com/meridianmaps/MapViewFragment.java'
```java
public boolean onMarkerSelect(Marker marker)
```
iOS: ios/MeridianCustom/CustomMapViewController.m
```objc
- (void)mapView:(MRMapView *)mapView didSelectAnnotationView:(MRAnnotationView *)view
```
### Booth Simulated Navigation
booth navigation is only possible for certain routes(GPS coordinates can be configured in the [Edit console](edit.meridianapp.com))
custom `startRouteToPlacemark` method is implemented to allow navigation by booth id
android: android/src/main/java/com/meridianmaps/MeridianMapViewManager.kt
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

33-33: Heading levels should only increment by one level at a time
Expected: h2; Actual: h4

(MD001, heading-increment)

🤖 Prompt for AI Agents
In README.md between lines 33 and 56, the heading levels for the "booth
simulated navigation" section are inconsistent and skip levels, which breaks
proper markdown structure. Adjust the headings so that each level increments by
only one (e.g., from ### to ####, not ### to #####). Also, improve formatting by
clearly separating code blocks and descriptions, using consistent indentation
and spacing to enhance readability.

https://github.com/user-attachments/assets/83cb79f4-0718-478a-82f3-940debb7f2f9

Expand All @@ -47,3 +69,10 @@ https://github.com/user-attachments/assets/1070d682-f7ef-41c3-bede-9f008677654a
### android:
1. if map has multiple floors default floor doesn't render [workaround: navigate by booth id and then manually navigate to the desired floor]
2. search icon press handling (UI breaks on repeated press)
3. if there is no simulated navigation - `startRouteToPlacemark` will try to open the search bar (which causes bugs on iOS)

workaround with navigating to the matching floor first works but takes a long time
ios/MeridianMapViewManager.m
```objc
self getAllPlacemarksFromAllFloors:^(NSArray<MRPlacemark *> *placemarks, NSError *error)
```
Loading