4.2.1 • Published 3 months ago

@cobuildlab/american-arbor-shared v4.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

test

Documentation for the provided code:

Types:

  • GeoJsonPoint:

    • Represents a GeoJSON point.
    • Extends the GeoJsonGeometryInterface and GeoJsonInterface interfaces.
    • Properties:
      • __typename?: 'GeoJSONPoint' (optional)
      • bbox?: Maybe<Array<Maybe<Scalars'Float'>>> (optional, bounding box)
      • coordinates?: Maybe<Scalars'GeoJSONCoordinates'> (optional, coordinates)
      • type: GeoJsonType (geometry type, always 'Point' for this type)
  • GetLocationFromGeoJSONPointReturnType:

    • Return type of the getLocationFromGeoJSONPoint function.
    • Properties:
      • latitude: number (latitude)
      • longitude: number (longitude)

Functions:

  • getLocationFromGeoJSONPoint(data):
    • Extracts the latitude and longitude from a GeoJSON point.
    • Parameters:
      • data: A partial GeoJsonPoint object or null/undefined.
    • Returns:
      • A GetLocationFromGeoJSONPointReturnType object with latitude and longitude if the data is valid, otherwise undefined.

Example usage:

const geojsonPoint = {
  type: "Point",
  coordinates: [-74.0060, 40.7128],
};

const location = getLocationFromGeoJSONPoint(geojsonPoint);

if (location) {
  console.log(f"Latitude: {location.latitude}, Longitude: {location.longitude}");
} else {
  console.log("Invalid GeoJSON point.");
}
4.2.1

3 months ago

4.2.0

4 months ago

4.0.0

4 months ago

3.15.1

6 months ago

3.15.0

6 months ago

3.12.1

9 months ago

3.12.0

9 months ago

3.12.3

9 months ago

3.14.0

6 months ago

3.12.2

9 months ago

3.12.5

9 months ago

3.12.4

9 months ago

3.12.7

8 months ago

3.12.6

8 months ago

3.12.8

7 months ago

3.13.0

7 months ago

3.10.5

1 year ago

3.11.0

1 year ago

3.10.4

1 year ago

3.10.1

1 year ago

3.10.0

1 year ago

3.10.3

1 year ago

3.10.2

1 year ago

3.9.0

1 year ago

3.8.1

1 year ago

3.8.0

1 year ago

3.7.0

1 year ago

3.5.4

1 year ago

3.4.0

1 year ago

3.3.0

1 year ago

3.5.3

1 year ago

3.6.1

1 year ago

3.5.2

1 year ago

3.6.0

1 year ago

3.5.1

1 year ago

3.2.4

1 year ago

3.5.0

1 year ago

3.4.1

1 year ago

3.2.3

1 year ago

3.2.2

1 year ago

3.2.1

1 year ago

3.2.0

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.3.3

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.3.0

1 year ago

2.2.2

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago