@aws-amplify/geo
Advanced tools
Comparing version 0.0.2-geo.6653 to 0.0.2-geo.6654
@@ -1,2 +0,2 @@ | ||
import { GeoConfig, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, Place, MapStyle, Coordinates } from '../types'; | ||
import { GeoConfig, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, Place, AmazonLocationServiceMapStyle, Coordinates } from '../types'; | ||
export declare class AmazonLocationServicesProvider implements GeoProvider { | ||
@@ -32,10 +32,10 @@ static CATEGORY: string; | ||
* Get the map resources that are currently available through the provider | ||
* @returns {MapStyle[]}- Array of available map resources | ||
* @returns {AmazonLocationServiceMapStyle[]}- Array of available map resources | ||
*/ | ||
getAvailableMaps(): MapStyle[]; | ||
getAvailableMaps(): AmazonLocationServiceMapStyle[]; | ||
/** | ||
* Get the map resource set as default in amplify config | ||
* @returns {MapStyle} - Map resource set as the default in amplify config | ||
* @returns {AmazonLocationServiceMapStyle} - Map resource set as the default in amplify config | ||
*/ | ||
getDefaultMap(): MapStyle; | ||
getDefaultMap(): AmazonLocationServiceMapStyle; | ||
/** | ||
@@ -42,0 +42,0 @@ * Search by text input with optional parameters |
@@ -50,3 +50,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import camelcaseKeys from 'camelcase-keys'; | ||
import { ConsoleLogger as Logger, Credentials, getAmplifyUserAgent } from '@aws-amplify/core'; | ||
import { ConsoleLogger as Logger, Credentials, getAmplifyUserAgent, } from '@aws-amplify/core'; | ||
import { LocationClient, SearchPlaceIndexForTextCommand, SearchPlaceIndexForPositionCommand, } from '@aws-sdk/client-location'; | ||
@@ -91,3 +91,3 @@ var logger = new Logger('AmazonLocationServicesProvider'); | ||
* Get the map resources that are currently available through the provider | ||
* @returns {MapStyle[]}- Array of available map resources | ||
* @returns {AmazonLocationServiceMapStyle[]}- Array of available map resources | ||
*/ | ||
@@ -100,5 +100,6 @@ AmazonLocationServicesProvider.prototype.getAvailableMaps = function () { | ||
var availableMaps = this._config.maps.items; | ||
var region = this._config.region; | ||
for (var mapName in availableMaps) { | ||
var style = availableMaps[mapName].style; | ||
mapStyles.push({ mapName: mapName, style: style }); | ||
mapStyles.push({ mapName: mapName, style: style, region: region }); | ||
} | ||
@@ -109,3 +110,3 @@ return mapStyles; | ||
* Get the map resource set as default in amplify config | ||
* @returns {MapStyle} - Map resource set as the default in amplify config | ||
* @returns {AmazonLocationServiceMapStyle} - Map resource set as the default in amplify config | ||
*/ | ||
@@ -121,3 +122,4 @@ AmazonLocationServicesProvider.prototype.getDefaultMap = function () { | ||
var style = this._config.maps.items[mapName].style; | ||
return { mapName: mapName, style: style }; | ||
var region = this._config.region; | ||
return { mapName: mapName, style: style, region: region }; | ||
}; | ||
@@ -124,0 +126,0 @@ /** |
export * from './Geo'; | ||
export * from './Provider'; | ||
export * from './AmazonLocationServicesProvider'; |
@@ -1,2 +0,2 @@ | ||
import { GeoConfig, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, Place, MapStyle, Coordinates } from '../types'; | ||
import { GeoConfig, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, Place, AmazonLocationServiceMapStyle, Coordinates } from '../types'; | ||
export declare class AmazonLocationServicesProvider implements GeoProvider { | ||
@@ -32,10 +32,10 @@ static CATEGORY: string; | ||
* Get the map resources that are currently available through the provider | ||
* @returns {MapStyle[]}- Array of available map resources | ||
* @returns {AmazonLocationServiceMapStyle[]}- Array of available map resources | ||
*/ | ||
getAvailableMaps(): MapStyle[]; | ||
getAvailableMaps(): AmazonLocationServiceMapStyle[]; | ||
/** | ||
* Get the map resource set as default in amplify config | ||
* @returns {MapStyle} - Map resource set as the default in amplify config | ||
* @returns {AmazonLocationServiceMapStyle} - Map resource set as the default in amplify config | ||
*/ | ||
getDefaultMap(): MapStyle; | ||
getDefaultMap(): AmazonLocationServiceMapStyle; | ||
/** | ||
@@ -42,0 +42,0 @@ * Search by text input with optional parameters |
@@ -95,3 +95,3 @@ "use strict"; | ||
* Get the map resources that are currently available through the provider | ||
* @returns {MapStyle[]}- Array of available map resources | ||
* @returns {AmazonLocationServiceMapStyle[]}- Array of available map resources | ||
*/ | ||
@@ -104,5 +104,6 @@ AmazonLocationServicesProvider.prototype.getAvailableMaps = function () { | ||
var availableMaps = this._config.maps.items; | ||
var region = this._config.region; | ||
for (var mapName in availableMaps) { | ||
var style = availableMaps[mapName].style; | ||
mapStyles.push({ mapName: mapName, style: style }); | ||
mapStyles.push({ mapName: mapName, style: style, region: region }); | ||
} | ||
@@ -113,3 +114,3 @@ return mapStyles; | ||
* Get the map resource set as default in amplify config | ||
* @returns {MapStyle} - Map resource set as the default in amplify config | ||
* @returns {AmazonLocationServiceMapStyle} - Map resource set as the default in amplify config | ||
*/ | ||
@@ -125,3 +126,4 @@ AmazonLocationServicesProvider.prototype.getDefaultMap = function () { | ||
var style = this._config.maps.items[mapName].style; | ||
return { mapName: mapName, style: style }; | ||
var region = this._config.region; | ||
return { mapName: mapName, style: style, region: region }; | ||
}; | ||
@@ -128,0 +130,0 @@ /** |
export * from './Geo'; | ||
export * from './Provider'; | ||
export * from './AmazonLocationServicesProvider'; |
{ | ||
"name": "@aws-amplify/geo", | ||
"version": "0.0.2-geo.6653+1a6ae6d84", | ||
"version": "0.0.2-geo.6654+c54d3dcdd", | ||
"description": "Geo category for aws-amplify", | ||
@@ -44,3 +44,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@aws-amplify/core": "4.2.1-geo.19+1a6ae6d84", | ||
"@aws-amplify/core": "4.2.1-geo.20+c54d3dcdd", | ||
"@aws-sdk/client-location": "3.22.0", | ||
@@ -101,3 +101,3 @@ "camelcase-keys": "6.2.2" | ||
}, | ||
"gitHead": "1a6ae6d84ff4317c414e60eed6d547d5f3519165" | ||
"gitHead": "c54d3dcddaa451c8439a3153cc355d0c71f70eb2" | ||
} |
@@ -14,4 +14,8 @@ /* | ||
import camelcaseKeys from 'camelcase-keys'; | ||
import { ConsoleLogger as Logger, Credentials, getAmplifyUserAgent } from '@aws-amplify/core'; | ||
import { | ||
ConsoleLogger as Logger, | ||
Credentials, | ||
getAmplifyUserAgent, | ||
} from '@aws-amplify/core'; | ||
import { | ||
Place as PlaceResult, | ||
@@ -31,3 +35,3 @@ SearchPlaceIndexForTextCommandInput, | ||
Place, | ||
MapStyle, | ||
AmazonLocationServiceMapStyle, | ||
Coordinates, | ||
@@ -86,5 +90,5 @@ } from '../types'; | ||
* Get the map resources that are currently available through the provider | ||
* @returns {MapStyle[]}- Array of available map resources | ||
* @returns {AmazonLocationServiceMapStyle[]}- Array of available map resources | ||
*/ | ||
public getAvailableMaps(): MapStyle[] { | ||
public getAvailableMaps(): AmazonLocationServiceMapStyle[] { | ||
if (!this._config.maps) { | ||
@@ -96,8 +100,9 @@ throw new Error( | ||
const mapStyles: MapStyle[] = []; | ||
const mapStyles: AmazonLocationServiceMapStyle[] = []; | ||
const availableMaps = this._config.maps.items; | ||
const region = this._config.region; | ||
for (const mapName in availableMaps) { | ||
const style = availableMaps[mapName].style; | ||
mapStyles.push({ mapName, style }); | ||
mapStyles.push({ mapName, style, region }); | ||
} | ||
@@ -110,5 +115,5 @@ | ||
* Get the map resource set as default in amplify config | ||
* @returns {MapStyle} - Map resource set as the default in amplify config | ||
* @returns {AmazonLocationServiceMapStyle} - Map resource set as the default in amplify config | ||
*/ | ||
public getDefaultMap(): MapStyle { | ||
public getDefaultMap(): AmazonLocationServiceMapStyle { | ||
if (!this._config.maps) { | ||
@@ -127,4 +132,5 @@ throw new Error( | ||
const style = this._config.maps.items[mapName].style; | ||
const region = this._config.region; | ||
return { mapName, style }; | ||
return { mapName, style, region }; | ||
} | ||
@@ -131,0 +137,0 @@ |
export * from './Geo'; | ||
export * from './Provider'; | ||
export * from './AmazonLocationServicesProvider'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
10692142
61
3921