Context menu refactor (provisional draft branch)#5225
Merged
alex-dev-neo merged 134 commits intomasterfrom Mar 17, 2026
Merged
Conversation
* 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>
…ge_master # Conflicts: # Sources/OsmAnd Maps-Bridging-Header.h
tigrim
reviewed
Mar 9, 2026
| 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>"; }; |
| 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; |
|
|
||
|
|
||
| static func convertRenderedObjectToAmenity(_ renderedObject: OARenderedObject) -> OAPOI { | ||
| let am = OAPOI() |
| poiType = mapPoiTypes?.getPoiType(byKey: tag) | ||
| } | ||
|
|
||
| if let foundType = poiType { |
| } | ||
|
|
||
| BOOL isSpecial = isOldOsmRoute || isNewOsmRoute || isTravelGpx || isClickableWay; | ||
| // BOOL isSpecial = isOldOsmRoute || isNewOsmRoute || isTravelGpx || isClickableWay; |
Contributor
There was a problem hiding this comment.
?
[Android]
boolean isSpecial = isOldOsmRoute || isNewOsmRoute || isTravelGpx || isClickableWay;
boolean shouldFilterRenderedObject = renderedObject.getId() == null
|| !renderedObject.isVisible() || renderedObject.isDrawOnPath();
if ((isSpecial && rules.isOnlyPoints()) || (!isSpecial && shouldFilterRenderedObject)) {
continue;
}
| 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) ); |
| override func applyCommonRules(params: PoiRowParams) { | ||
| super.applyCommonRules(params: params) | ||
|
|
||
| if let valueAsNumber = Int(params.value) { |
…ttps://github.com/osmandapp/OsmAnd-ios into context_menu_gpx_appearean_tags_fix_v3_merge_master
tigrim
reviewed
Mar 10, 2026
| override func applyCustomRules(params: PoiRowParams) { | ||
| super.applyCustomRules(params: params) | ||
|
|
||
| if let valueAsNumber = Int(params.value) { |
| final class AmenityInfoRowParams: NSObject { | ||
|
|
||
| var key: String? | ||
| //var icon: UIImage? //TODO: delete, not needed? |
|
|
||
| let cuisineOrDish = key == CUISINE_TAG || key == DISH_TAG | ||
|
|
||
| // TODO: here is a bug with poi type parsing |
| - (NSString *)createWikipediaArticleList:(NSDictionary<NSString *, id> *)filteredInfo | ||
| { | ||
| return [ObfConstants getOsmUrlForId:self.poi]; | ||
| //TODO: implement |
|
|
||
|
|
||
| override func getTypeStr() -> String? { | ||
| // TODO: RZR reuse detailed object and/or port fresh Java code |
|
|
||
| static func isOsmUrlAvailable(_ object: OAMapObject) -> Bool { | ||
| return object.obfId > 0 | ||
| // TODO: test. in ios don't store negative values for objects without osm |
|
|
||
| static func isIdFromRelation(_ obfId: Int64) -> Bool { | ||
| static func isIdFromRelation(_ obfId: UInt64) -> Bool { | ||
| // TODO: test |
|
|
||
| static func isIdFromPropagatedNode(_ obfId: Int64) -> Bool { | ||
| static func isIdFromPropagatedNode(_ obfId: UInt64) -> Bool { | ||
| // TODO: test |
|
|
||
| static func isIdFromSplit(_ obfId: Int64) -> Bool { | ||
| static func isIdFromSplit(_ obfId: UInt64) -> Bool { | ||
| // TODO: test |
| @interface OAPOI : OAMapObject | ||
|
|
||
| @property (nonatomic, nullable) OAPOIType *type; | ||
| @property (nonatomic, nullable) OAPOIType *type; //TODO: test. in android here is category: private PoiCategory type; |
| - (int) getDefaultRadiusPoi; | ||
|
|
||
| - (BOOL) isVisible; | ||
| - (int)pointOrder:(id)object; |
| // Copyright © 2026 OsmAnd. All rights reserved. | ||
| // | ||
|
|
||
| @interface OAOpenedHoursParser : NSObject |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#4594