Skip to content

Commit

Permalink
Update the README and version (#30)
Browse files Browse the repository at this point in the history
- Update the README
Added to the documentation of placeToFeatureCollection

- version to 1.0.3
  • Loading branch information
dayjournal authored Oct 16, 2023
1 parent 44b0292 commit 523a63b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,20 @@ Converts [places search](https://docs.aws.amazon.com/location/latest/developergu

1. GetPlaceResponse to a FeatureCollection with a single feature.
2. SearchPlaceIndexForPositionResponse, SearchPlaceIndexForTextResponse to a FeatureCollection with features corresponding to the entries in the response.
3. The flattenProperties option will flatten the JSON response in properties.This option is mainly used when retrieving "MapLibre GL JS" attributes.

```javascript
const response = { ... };
const featureCollection = placeToFeatureCollection(response)
```

```javascript
const response = { ... };
const featureCollection = placeToFeatureCollection(response, {
flattenProperties: true
});
```

### routeToFeatureCollection

Converts a [route](https://docs.aws.amazon.com/location/latest/developerguide/route-concepts.html) to a GeoJSON FeatureCollection with a single MultiLineString Feature. Each LineString entry of the MultiLineString represents a leg of the route.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@aws/amazon-location-utilities-datatypes",
"description": "Amazon Location Utilities - Data Types for JavaScript",
"license": "Apache-2.0",
"version": "1.0.2",
"version": "1.0.3",
"keywords": [],
"author": {
"name": "Amazon Web Services",
Expand Down

0 comments on commit 523a63b

Please sign in to comment.