Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Implement Geocoder client #232

Merged
merged 10 commits into from
Aug 27, 2021
Merged

Implement Geocoder client #232

merged 10 commits into from
Aug 27, 2021

Conversation

draperunner
Copy link
Contributor

@draperunner draperunner commented Jul 9, 2021

An implementation of the Geocoder API that is closer to the API and uses proper GeoJSON types.

  • sdk.geocoder.autocomplete
  • sdk.geocoder.reverse

Both methods return FeatureCollection<Point, GeocoderTypes.Location>, where the GeoJSON types (FeatureCollection, Feature, Point) are from the commonly used @types/geojson package.

The types used for these methods are namespaced under GeocoderTypes, the same way it's done for MobilityTypes and NsrTypes.

camelCase formatting is used for those parameters that use snake_case in the API, otherwise all names are true to the API. Dot-separated parameters like point.lat=60 are objects in this SDK: { point: { lat: 60 } } .

image

@draperunner draperunner changed the title WIP: Implement Geocoder client Implement Geocoder client Jul 19, 2021
@draperunner draperunner marked this pull request as ready for review July 19, 2021 15:58
@draperunner draperunner requested a review from a team as a code owner July 19, 2021 15:58
Copy link
Contributor

@kseverinsen kseverinsen left a comment

Choose a reason for hiding this comment

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

💯

src/geocoder/helper.ts Show resolved Hide resolved
@draperunner draperunner merged commit e41949e into master Aug 27, 2021
@draperunner draperunner deleted the geocoder-client branch August 27, 2021 10:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants