diff --git a/README.md b/README.md index f965444..8601dfd 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index 1321cf4..389ccd6 100644 --- a/package.json +++ b/package.json @@ -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",