Skip to content

Conforming searchByPlaceId to return type MaplibreGeocoderPlaceResults causes error #162

@tomhuze

Description

@tomhuze

searchByPlaceId return type MaplibreGeocoderPlaceResults is an object with a "place" property with a value of an array of CarmenGeoJSON features:

type MaplibreGeocoderPlaceResults = {
    place: CarmenGeojsonFeature[];
};

in index.ts line 919 this array is wrapped in another array:
results = [res.place];
This causes an error to be thrown when the user selects a place from the results, and the map is not moved to the selected place as is expected.
Either place in the MaplibreGeocoderPlaceResults type needs to be updated to accept a single feature, or res.place should not be wrapped in an array in index.ts line 919.

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