Skip to content
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

Align OpenStreetMapProvider's RawResult with Nominatim API #355

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

yurloc
Copy link

@yurloc yurloc commented Nov 17, 2022

See https://nominatim.org/release-docs/develop/api/Search/. The API uses the less common form "licence".

When using leaflet-geosearch with TypeScript, accessing result.raw.licence causes a compilation error and needs to be worked around by using // @ts-ignore.

Using result.raw.license obviously contains no data.

Click to expand a response example:
    {
        "address": {
            "bakery": "B\u00e4cker Kamps",
            "city_district": "Mitte",
            "continent": "European Union",
            "country": "Deutschland",
            "country_code": "de",
            "footway": "Bahnsteig U6",
            "neighbourhood": "Sprengelkiez",
            "postcode": "13353",
            "state": "Berlin",
            "suburb": "Wedding"
        },
        "boundingbox": [
            "52.5460929870605",
            "52.5460968017578",
            "13.3591794967651",
            "13.3591804504395"
        ],
        "class": "shop",
        "display_name": "B\u00e4cker Kamps, Bahnsteig U6, Sprengelkiez, Wedding, Mitte, Berlin, 13353, Deutschland, European Union",
        "icon": "https://nominatim.openstreetmap.org/images/mapicons/shopping_bakery.p.20.png",
        "importance": 0.201,
        "lat": "52.5460941",
        "licence": "Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright",
        "lon": "13.35918",
        "osm_id": "317179427",
        "osm_type": "node",
        "place_id": "1453068",
        "type": "bakery"
    }

@smeijer smeijer merged commit bfa1268 into smeijer:next Apr 18, 2023
@smeijer
Copy link
Owner

smeijer commented Apr 18, 2023

Thanks! Appreciated.

smeijer added a commit that referenced this pull request Apr 18, 2023
See #355. That pull got merged in the wrong branch.
@yurloc yurloc deleted the patch-1 branch April 19, 2023 15:32
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.

2 participants