maplibre / maplibre-gl-geocoder

Geocoding for MapLibre
ISC License
45 stars 17 forks source link

Every link to "Carmen GeoJSON" format reference is broken in API.md and in JSDocs in source. #110

Closed tomhuze closed 2 days ago

tomhuze commented 11 months ago

Every instance of Carmen GeoJSON in the source code JSDocs and in API.md points to a 404 page on Github. I tried Googling for a definition of Carmen GeoJSON format but came up empty.

The source code example of the getPlaceById function in the geocoderApi parameter contains what I think may be a definition of a Carment GeoJSON feature as used in this project:

{
  type: string, 
  geometry: {
    type: string, 
    coordinates: [number]
  }, 
  place_name: string, 
  text: string, 
  center: [number] 
}[]

Am I correct in assuming everything is required except text? Am I correct in assuming that the first type always has to be 'Feature' and geometry.type always has to be 'Point'?

NOTE: API.md incorrectly states that getPlaceById should return an array of text/placeId suggestions.

Caerbannog commented 5 months ago

The file seems to be available here: https://github.com/mapclone/carmen/blob/master/carmen-geojson.md

HarelM commented 4 days ago

I've updated the code to reflect this issue by adding a type locally, this type is not full, but should be enough. See #118