Skip to content

Conversation

@nnngrach
Copy link
Contributor

@nnngrach nnngrach commented Nov 26, 2025

issue

Old logic:

  • Tap on map.
  • Select first vector obf oblect. (OAContextMenuLayer do all work by itself)
  • Parse latlon and some tags.
  • Make poi search by latlon and name if needed.
  • Create poi object with parsed extensions.
  • Create OATargetPoint data object. targetPoint.object = poi;
  • OAContextMenuLayer sends created targetPoint to OAMapPanelViewController and opens context menu.
  • Called OAPOIVC.
  • OAPOIVC build context whole context menu data and ui by itself.
  • Context menu shows.

New logic:

  • Tap on map.
  • Find all vector obf objects in finger touch area. (OAContextMenuLayer uses MapSelector helper for it).
  • Parse latlon and tags for every object in list. (Poi, wiki, travelGuides, lines, polygons, data from additional user maps in area)
  • Force make poi search by latlon and name. Only for main poi object.
  • Join all founded and parsed data.
  • Instead of OATargetPoint.object = poi create DetailsObject.objects = @[allFoundPointsAndPolygons];
  • MapSelector sends DetailsObject to OAContextMenuLayer.
  • OAContextMenuLayer sends DetailsObject to OAMapPanelViewController and opens context menu.
  • Called OAPOIVC.
  • OAPOIVC not build all data ui itself. It AmenityUiHelper for building common poi menu.
  • OAPOIVC calls plugin classes (Mapillary, Wiki, TravelGuides etc) to add their menu rows to created menu data.
  • Context menu shows.

Temp logic. That we're used in release. Because old code was already updated. But all ui features wasn't finished. So it works like in original but using new classes:

  • Find all vector obf in area, join data. Create DetailsObject. But don't use it for now (ui isn't ready for it).
  • Force run temp processTransportStops() function to force overwrite found data with only first main poi. In result we're still using only one point data. Just like was in original code. But now with new datatypes.
  • Create OATargetPoint with this first poi.
  • MapSelectionHelper -> OAContextMenuLayer -> OAMapPanelViewController -> OAPOIVC.
  • Context menu shows.

In this request i deleted that temp logic. And send to ui DetailsObject with combined data, like it should be in final version. But work with ui menu buildier to build menu with that new combined data isn't finished yet.

nnngrach and others added 13 commits November 18, 2025 20:35
* context_menu_gpx_appearean_tags_fix

* clean code

* manual add file

* rewrite OAGpxAppearanceInfo to swift

* remove old files

* quickfix

* sync GpxAppearanceInfo with android

* sync with android

* code review fix

* Fix Bool value

* Add private static func boolValue

---------

Co-authored-by: Dmitry Svetlichny <svetlichny1988@icloud.com>
@nnngrach nnngrach changed the base branch from master to r5.2 November 26, 2025 14:37
@nnngrach
Copy link
Contributor Author

nnngrach commented Nov 26, 2025

Current status.

Before.
Data only from main point. But ui works.

Screenshot 2025-11-26 at 19 54 24

After.
Data from all combined sources. But ui can't use it yet.

Screenshot 2025-11-26 at 19 49 54 Screenshot 2025-11-26 at 19 50 12 Screenshot 2025-11-26 at 19 50 25

@nnngrach nnngrach linked an issue Nov 26, 2025 that may be closed by this pull request
1 task
@nnngrach nnngrach changed the base branch from r5.2 to master November 26, 2025 15:17
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
Copy link
Contributor

Choose a reason for hiding this comment

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

?


static NSString * const ONLINE_TILES_DIR = @"OsmAnd (online tiles)";

static NSString * const XML_COLON = @"_-_";
Copy link
Contributor

Choose a reason for hiding this comment

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

kXmlColon already exists

} else {
processId(transportStop)
syntheticAmenity.copyNames(transportStop)
if syntheticAmenity.latitude == 0 && syntheticAmenity.longitude == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this logic correct? The point (0,0) is a real location in the Gulf of Guinea off the coast of Africa, so using (0,0) as a placeholder may be wrong. Maybe u should check for nil instead?

syntheticAmenity.copyAdditionalInfo(withMap: renderedObject.tags, overwrite: false)
}
syntheticAmenity.copyNames(renderedObject)
if syntheticAmenity.latitude == 0 && syntheticAmenity.longitude == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

up

{
NSString *key = entry.declaration->tagName.toNSString();
NSString *loc;
if (key.length > 8)
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic is unclear. A comment is needed

[self clearContentForRowInfo:_onlinePhotoCardsRowInfo];
_onlinePhotoCardsRowInfo = nearbyImagesRowInfo;

[self startLoadingImages];
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn’t break the content loading logic? When a section is collapsed, images should not be loaded


+ (OATargetMenuViewController *) createMenuController:(OATargetPoint *)targetPoint activeTargetType:(OATargetPointType)activeTargetType activeViewControllerState:(OATargetMenuViewControllerState *)activeViewControllerState headerOnly:(BOOL)headerOnly;

+ (OATargetMenuViewController *) createMenuController:(OATargetPoint *)targetPoint selectedObject:(id)selectedObject activeTargetType:(OATargetPointType)activeTargetType activeViewControllerState:(OATargetMenuViewControllerState *)activeViewControllerState headerOnly:(BOOL)headerOnly;
Copy link
Contributor

Choose a reason for hiding this comment

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

  • (OATargetMenuViewController *)createMenuController:

return [self.class createMenuController:targetPoint selectedObject:nil activeTargetType:activeTargetType activeViewControllerState:activeViewControllerState headerOnly:headerOnly];
}

+ (OATargetMenuViewController *) createMenuController:(OATargetPoint *)targetPoint selectedObject:(id)selectedObject activeTargetType:(OATargetPointType)activeTargetType activeViewControllerState:(OATargetMenuViewControllerState *)activeViewControllerState headerOnly:(BOOL)headerOnly
Copy link
Contributor

Choose a reason for hiding this comment

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

up


@property (nonatomic) BOOL isPolygon;

- (NSMutableArray<NSString *> *) getOriginalNames;
Copy link
Contributor

Choose a reason for hiding this comment

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

NSArray ?

return abs(_bboxRight - _bboxLeft) * abs(_bboxTop - _bboxBottom);
}

- (NSMutableArray<NSString *> *) getOriginalNames
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do we use this?

return ObfConstants.getOsmObjectId(detailsObject.syntheticAmenity)
}
return -1
return 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Changed base logic, already use -1 in other places:
NSNumber * osmIdObj = osmId < 0 ? nil : @(osmId);

@RZR-UA RZR-UA changed the title Context menu gpx appearean tags fix v3 Context menu gpx appeareance tags fix v3 Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tapping a POI is laggy and Combined context menu

4 participants