Skip to content

Context menu refactor (provisional draft branch)#5225

Merged
alex-dev-neo merged 134 commits intomasterfrom
context_menu_gpx_appearean_tags_fix_v3_merge_master
Mar 17, 2026
Merged

Context menu refactor (provisional draft branch)#5225
alex-dev-neo merged 134 commits intomasterfrom
context_menu_gpx_appearean_tags_fix_v3_merge_master

Conversation

@RZR-UA
Copy link
Copy Markdown
Contributor

@RZR-UA RZR-UA commented Mar 2, 2026

Comment thread OsmAnd.xcodeproj/project.pbxproj Outdated
325FDBAD2E8E9AE9006E7C07 /* AdditionalInfoBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalInfoBundle.swift; sourceTree = "<group>"; };
326087062F3239FD0038A34B /* AmenityInfoRowParams.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AmenityInfoRowParams.swift; sourceTree = "<group>"; };
326087082F324B270038A34B /* PoiAdditionalUiRule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PoiAdditionalUiRule.swift; sourceTree = "<group>"; };
3260870B2F324DB00038A34B /* IPoiAdditionalRowBehavior.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPoiAdditionalRowBehavior.swift; sourceTree = "<group>"; };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PoiAdditionalRowBehavior

if ([_editingAddon isEnabled])
{
BOOL createNewPoi = (_targetPoint.obfId == 0 && _targetPoint.type != OATargetTransportStop && _targetPoint.type != OATargetOsmEdit) || _targetPoint.type == OATargetOsmNote;
BOOL createNewPoi = (![_targetPoint isValidObfId] && _targetPoint.type != OATargetTransportStop && _targetPoint.type != OATargetOsmEdit) || _targetPoint.type == OATargetOsmNote;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

crash!



static func convertRenderedObjectToAmenity(_ renderedObject: OARenderedObject) -> OAPOI {
let am = OAPOI()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

amenity

poiType = mapPoiTypes?.getPoiType(byKey: tag)
}

if let foundType = poiType {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if let poiType {}

}

BOOL isSpecial = isOldOsmRoute || isNewOsmRoute || isTravelGpx || isClickableWay;
// BOOL isSpecial = isOldOsmRoute || isNewOsmRoute || isTravelGpx || isClickableWay;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?
[Android]

boolean isSpecial = isOldOsmRoute || isNewOsmRoute || isTravelGpx || isClickableWay;

				boolean shouldFilterRenderedObject = renderedObject.getId() == null
						|| !renderedObject.isVisible() || renderedObject.isDrawOnPath();

				if ((isSpecial && rules.isOnlyPoints()) || (!isSpecial && shouldFilterRenderedObject)) {
					continue;
				}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@RZR-UA for you

if (obj.x && obj.x.count > 0)
{
for (int i = 0; i < obj.x.count; i++)
points.push_back( OsmAnd::PointI(obj.x[i].intValue, obj.y[i].intValue) );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove spaces

override func applyCommonRules(params: PoiRowParams) {
super.applyCommonRules(params: params)

if let valueAsNumber = Int(params.value) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

valueAsNumber unused

override func applyCustomRules(params: PoiRowParams) {
super.applyCustomRules(params: params)

if let valueAsNumber = Int(params.value) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unused

final class AmenityInfoRowParams: NSObject {

var key: String?
//var icon: UIImage? //TODO: delete, not needed?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?


let cuisineOrDish = key == CUISINE_TAG || key == DISH_TAG

// TODO: here is a bug with poi type parsing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

!

- (NSString *)createWikipediaArticleList:(NSDictionary<NSString *, id> *)filteredInfo
{
return [ObfConstants getOsmUrlForId:self.poi];
//TODO: implement
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

!



override func getTypeStr() -> String? {
// TODO: RZR reuse detailed object and/or port fresh Java code
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread Sources/Map/ObfConstants.swift Outdated

static func isOsmUrlAvailable(_ object: OAMapObject) -> Bool {
return object.obfId > 0
// TODO: test. in ios don't store negative values for objects without osm
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Comment thread Sources/Map/ObfConstants.swift Outdated

static func isIdFromRelation(_ obfId: Int64) -> Bool {
static func isIdFromRelation(_ obfId: UInt64) -> Bool {
// TODO: test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Comment thread Sources/Map/ObfConstants.swift Outdated

static func isIdFromPropagatedNode(_ obfId: Int64) -> Bool {
static func isIdFromPropagatedNode(_ obfId: UInt64) -> Bool {
// TODO: test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Comment thread Sources/Map/ObfConstants.swift Outdated

static func isIdFromSplit(_ obfId: Int64) -> Bool {
static func isIdFromSplit(_ obfId: UInt64) -> Bool {
// TODO: test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Comment thread Sources/POI/OAPOI.h Outdated
@interface OAPOI : OAMapObject

@property (nonatomic, nullable) OAPOIType *type;
@property (nonatomic, nullable) OAPOIType *type; //TODO: test. in android here is category: private PoiCategory type;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

@tigrim tigrim marked this pull request as ready for review March 13, 2026 15:25
@tigrim tigrim requested a review from alex-dev-neo March 13, 2026 15:25
- (int) getDefaultRadiusPoi;

- (BOOL) isVisible;
- (int)pointOrder:(id)object;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pointsOrder

Comment thread Sources/Helpers/OAOpenedHoursParser.h Outdated
// Copyright © 2026 OsmAnd. All rights reserved.
//

@interface OAOpenedHoursParser : NSObject
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OAOpeningHoursParser

@tigrim tigrim linked an issue Mar 17, 2026 that may be closed by this pull request
1 task
@alex-dev-neo alex-dev-neo merged commit 13bad6e into master Mar 17, 2026
@alex-dev-neo alex-dev-neo deleted the context_menu_gpx_appearean_tags_fix_v3_merge_master branch March 17, 2026 09:11
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

6 participants