Skip to content

Removing empty lines from address lookup leads to better results #706

@SeanDS

Description

@SeanDS

The OpenStreetMap Nominatim address lookup seems to function better if empty address lines are removed by Nextcloud Maps prior to building the query string.

Assume an address field for a contact is populated with:

Address: Copper Beech House Heathside Crescent
Postcode: GU22 7BB
City: Woking
Country: United Kingdom

The query becomes , Copper Beech House Heathside Crescent, Woking, , GU22 7BB, United Kingdom which has no result. If I edit AddressService.php around line 171 to add $splitted_adr = array_filter(array_map('trim', $splitted_adr));, the query becomes Copper Beech House Heathside Crescent, Woking, GU22 7BB, United Kingdom which returns the correct lookup.

I am happy to make a PR for this if desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions