Skip to content

Commit 6ed4cf4

Browse files
author
awstools
committed
feat(client-geo-maps): Added support for optional style parameters in maps, including Terrain, ContourDensity, Traffic, and TravelModes.
1 parent 3db86ff commit 6ed4cf4

File tree

9 files changed

+204
-24
lines changed

9 files changed

+204
-24
lines changed

clients/client-geo-maps/src/commands/GetGlyphsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export type GetGlyphsCommandOutputType = Omit<GetGlyphsResponse, "Blob"> & {
3636
export interface GetGlyphsCommandOutput extends GetGlyphsCommandOutputType, __MetadataBearer {}
3737

3838
/**
39-
* <p> <code>GetGlyphs</code> returns the map's glyphs.</p>
39+
* <p> <code>GetGlyphs</code> returns the map's glyphs.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/location/latest/developerguide/styling-labels-with-glyphs.html">Style labels with glyphs</a> in the <i>Amazon Location Service Developer Guide</i>.</p>
4040
* @example
4141
* Use a bare-bones client and the command you need to make an API call.
4242
* ```javascript

clients/client-geo-maps/src/commands/GetSpritesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export type GetSpritesCommandOutputType = Omit<GetSpritesResponse, "Blob"> & {
3636
export interface GetSpritesCommandOutput extends GetSpritesCommandOutputType, __MetadataBearer {}
3737

3838
/**
39-
* <p> <code>GetSprites</code> returns the map's sprites.</p>
39+
* <p> <code>GetSprites</code> returns the map's sprites.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/location/latest/developerguide/styling-iconography-with-sprites.html">Style iconography with sprites</a> in the <i>Amazon Location Service Developer Guide</i>.</p>
4040
* @example
4141
* Use a bare-bones client and the command you need to make an API call.
4242
* ```javascript

clients/client-geo-maps/src/commands/GetStaticMapCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export type GetStaticMapCommandOutputType = Omit<GetStaticMapResponse, "Blob"> &
3636
export interface GetStaticMapCommandOutput extends GetStaticMapCommandOutputType, __MetadataBearer {}
3737

3838
/**
39-
* <p> <code>GetStaticMap</code> provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.</p>
39+
* <p> <code>GetStaticMap</code> provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.</p> <p>For more information, see the following topics in the <i>Amazon Location Service Developer Guide</i>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/location/latest/developerguide/static-maps.html">Static maps</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/location/latest/developerguide/customizing-static-maps.html">Customize static maps</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/location/latest/developerguide/overlaying-static-map.html">Overlay on the static map</a> </p> </li> </ul>
4040
* @example
4141
* Use a bare-bones client and the command you need to make an API call.
4242
* ```javascript

clients/client-geo-maps/src/commands/GetStyleDescriptorCommand.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export type GetStyleDescriptorCommandOutputType = Omit<GetStyleDescriptorRespons
4040
export interface GetStyleDescriptorCommandOutput extends GetStyleDescriptorCommandOutputType, __MetadataBearer {}
4141

4242
/**
43-
* <p> <code>GetStyleDescriptor</code> returns information about the style.</p>
43+
* <p> <code>GetStyleDescriptor</code> returns information about the style.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/location/latest/developerguide/styling-dynamic-maps.html">Style dynamic maps</a> in the <i>Amazon Location Service Developer Guide</i>.</p>
4444
* @example
4545
* Use a bare-bones client and the command you need to make an API call.
4646
* ```javascript
@@ -53,6 +53,12 @@ export interface GetStyleDescriptorCommandOutput extends GetStyleDescriptorComma
5353
* Style: "STRING_VALUE", // required
5454
* ColorScheme: "STRING_VALUE",
5555
* PoliticalView: "STRING_VALUE",
56+
* Terrain: "STRING_VALUE",
57+
* ContourDensity: "STRING_VALUE",
58+
* Traffic: "STRING_VALUE",
59+
* TravelModes: [ // TravelModeList
60+
* "STRING_VALUE",
61+
* ],
5662
* Key: "STRING_VALUE",
5763
* };
5864
* const command = new GetStyleDescriptorCommand(input);

clients/client-geo-maps/src/commands/GetTileCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export type GetTileCommandOutputType = Omit<GetTileResponse, "Blob"> & {
3636
export interface GetTileCommandOutput extends GetTileCommandOutputType, __MetadataBearer {}
3737

3838
/**
39-
* <p> <code>GetTile</code> returns a tile. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.</p>
39+
* <p> <code>GetTile</code> returns a tile. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/location/latest/developerguide/tiles.html">Tiles</a> in the <i>Amazon Location Service Developer Guide</i>.</p>
4040
* @example
4141
* Use a bare-bones client and the command you need to make an API call.
4242
* ```javascript

clients/client-geo-maps/src/endpoint/ruleset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ d="error",
2020
e="endpoint",
2121
f="tree",
2222
g="PartitionResult",
23-
h={[y]:true,"default":false,"type":"Boolean"},
24-
i={[y]:false,"type":"String"},
23+
h={[y]:true,"default":false,"type":"boolean"},
24+
i={[y]:false,"type":"string"},
2525
j={[B]:"Endpoint"},
2626
k={[z]:c,[A]:[{[B]:"UseFIPS"},true]},
2727
l={[z]:c,[A]:[{[B]:"UseDualStack"},true]},

clients/client-geo-maps/src/models/models_0.ts

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ export const ColorScheme = {
3939
*/
4040
export type ColorScheme = (typeof ColorScheme)[keyof typeof ColorScheme];
4141

42+
/**
43+
* @public
44+
* @enum
45+
*/
46+
export const ContourDensity = {
47+
MEDIUM: "Medium",
48+
} as const;
49+
50+
/**
51+
* @public
52+
*/
53+
export type ContourDensity = (typeof ContourDensity)[keyof typeof ContourDensity];
54+
4255
/**
4356
* @public
4457
*/
@@ -50,7 +63,7 @@ export interface GetGlyphsRequest {
5063
FontStack: string | undefined;
5164

5265
/**
53-
* <p>A Unicode range of characters to download glyphs for. This must be aligned to multiples of 256. </p> <p>Example: <code>0-255.pdf</code> </p>
66+
* <p>A Unicode range of characters to download glyphs for. This must be aligned to multiples of 256. </p> <p>Example: <code>0-255.pbf</code> </p>
5467
* @public
5568
*/
5669
FontUnicodeRange: string | undefined;
@@ -235,19 +248,19 @@ export type StaticMapStyle = (typeof StaticMapStyle)[keyof typeof StaticMapStyle
235248
*/
236249
export interface GetStaticMapRequest {
237250
/**
238-
* <p>Takes in two pairs of coordinates, [Lon, Lat], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image. </p> <p>Example: -123.17075,49.26959,-123.08125,49.31429</p>
251+
* <p>Takes in two pairs of coordinates in World Geodetic System (WGS 84) format: [longitude, latitude], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image. </p> <p>Example: -123.17075,49.26959,-123.08125,49.31429</p>
239252
* @public
240253
*/
241254
BoundingBox?: string | undefined;
242255

243256
/**
244-
* <p>Takes in two or more pair of coordinates, [Lon, Lat], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates. </p> <note> <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code> </p> </note> <p>Example: 97.170451,78.039098,99.045536,27.176178</p>
257+
* <p>Takes in two or more pair of coordinates in World Geodetic System (WGS 84) format: [longitude, latitude], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates. </p> <note> <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code> </p> </note> <p>Example: 97.170451,78.039098,99.045536,27.176178</p>
245258
* @public
246259
*/
247260
BoundedPositions?: string | undefined;
248261

249262
/**
250-
* <p>Takes in a pair of coordinates, [Lon, Lat], which becomes the center point of the image. This parameter requires that either zoom or radius is set.</p> <note> <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code> </p> </note> <p>Example: 49.295,-123.108</p>
263+
* <p>Takes in a pair of coordinates in World Geodetic System (WGS 84) format: [longitude, latitude], which becomes the center point of the image. This parameter requires that either zoom or radius is set.</p> <note> <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code> </p> </note> <p>Example: 49.295,-123.108</p>
251264
* @public
252265
*/
253266
Center?: string | undefined;
@@ -529,6 +542,46 @@ export class ValidationException extends __BaseException {
529542
}
530543
}
531544

545+
/**
546+
* @public
547+
* @enum
548+
*/
549+
export const Terrain = {
550+
HILLSHADE: "Hillshade",
551+
} as const;
552+
553+
/**
554+
* @public
555+
*/
556+
export type Terrain = (typeof Terrain)[keyof typeof Terrain];
557+
558+
/**
559+
* @public
560+
* @enum
561+
*/
562+
export const Traffic = {
563+
ALL: "All",
564+
} as const;
565+
566+
/**
567+
* @public
568+
*/
569+
export type Traffic = (typeof Traffic)[keyof typeof Traffic];
570+
571+
/**
572+
* @public
573+
* @enum
574+
*/
575+
export const TravelMode = {
576+
TRANSIT: "Transit",
577+
TRUCK: "Truck",
578+
} as const;
579+
580+
/**
581+
* @public
582+
*/
583+
export type TravelMode = (typeof TravelMode)[keyof typeof TravelMode];
584+
532585
/**
533586
* @public
534587
*/
@@ -551,6 +604,30 @@ export interface GetStyleDescriptorRequest {
551604
*/
552605
PoliticalView?: string | undefined;
553606

607+
/**
608+
* <p>Adjusts how physical terrain details are rendered on the map.</p> <p>The following terrain styles are currently supported:</p> <ul> <li> <p> <code>Hillshade</code>: Displays the physical terrain details through shading and highlighting of elevation change and geographic features.</p> </li> </ul> <p>This parameter is valid only for the <code>Standard</code> map style.</p>
609+
* @public
610+
*/
611+
Terrain?: Terrain | undefined;
612+
613+
/**
614+
* <p>Displays the shape and steepness of terrain features using elevation lines. The density value controls how densely the available contour line information is rendered on the map.</p> <p>This parameter is valid only for the <code>Standard</code> map style.</p>
615+
* @public
616+
*/
617+
ContourDensity?: ContourDensity | undefined;
618+
619+
/**
620+
* <p>Displays real-time traffic information overlay on map, such as incident events and flow events.</p> <p>This parameter is valid only for the <code>Standard</code> map style.</p>
621+
* @public
622+
*/
623+
Traffic?: Traffic | undefined;
624+
625+
/**
626+
* <p>Renders additional map information relevant to selected travel modes. Information for multiple travel modes can be displayed simultaneously, although this increases the overall information density rendered on the map.</p> <p>This parameter is valid only for the <code>Standard</code> map style.</p>
627+
* @public
628+
*/
629+
TravelModes?: TravelMode[] | undefined;
630+
554631
/**
555632
* <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request. </p>
556633
* @public

clients/client-geo-maps/src/protocols/Aws_restJson1.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ export const se_GetStyleDescriptorCommand = async (
122122
const query: any = map({
123123
[_cs]: [, input[_CS]!],
124124
[_pv]: [, input[_PV]!],
125+
[_t]: [, input[_T]!],
126+
[_cd]: [, input[_CD]!],
127+
[_tr]: [, input[_Tr]!],
128+
[_tm]: [() => input.TravelModes !== void 0, () => input[_TM]! || []],
125129
[_k]: [, input[_K]!],
126130
});
127131
let body: any;
@@ -428,6 +432,7 @@ const _BB = "BoundingBox";
428432
const _BP = "BoundedPositions";
429433
const _C = "Center";
430434
const _CC = "CacheControl";
435+
const _CD = "ContourDensity";
431436
const _CL = "CropLabels";
432437
const _CO = "CompactOverlay";
433438
const _CS = "ColorScheme";
@@ -445,12 +450,16 @@ const _PV = "PoliticalView";
445450
const _R = "Radius";
446451
const _S = "Style";
447452
const _SBU = "ScaleBarUnit";
453+
const _T = "Terrain";
454+
const _TM = "TravelModes";
455+
const _Tr = "Traffic";
448456
const _W = "Width";
449457
const _Z = "Zoom";
450458
const _bb = "bounding-box";
451459
const _bp = "bounded-positions";
452460
const _c = "center";
453461
const _cc = "cache-control";
462+
const _cd = "contour-density";
454463
const _cl = "crop-labels";
455464
const _co = "compact-overlay";
456465
const _cs = "color-scheme";
@@ -467,6 +476,9 @@ const _pv = "political-view";
467476
const _r = "radius";
468477
const _s = "style";
469478
const _su = "scale-unit";
479+
const _t = "terrain";
480+
const _tm = "travel-modes";
481+
const _tr = "traffic";
470482
const _w = "width";
471483
const _xagpb = "x-amz-geo-pricing-bucket";
472484
const _z = "zoom";

0 commit comments

Comments
 (0)