Skip to content

Commit fd1221d

Browse files
author
awstools
committed
feat(client-geo-maps): Added support for optional AdditionalFeatures parameter in the V2 GetTile API.
1 parent 9fd39c4 commit fd1221d

File tree

4 files changed

+116
-4
lines changed

4 files changed

+116
-4
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export interface GetTileCommandOutput extends GetTileCommandOutputType, __Metada
4646
* const config = {}; // type is GeoMapsClientConfig
4747
* const client = new GeoMapsClient(config);
4848
* const input = { // GetTileRequest
49+
* AdditionalFeatures: [ // TileAdditionalFeatureList
50+
* "STRING_VALUE",
51+
* ],
4952
* Tileset: "STRING_VALUE", // required
5053
* Z: "STRING_VALUE", // required
5154
* X: "STRING_VALUE", // required

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,10 +664,44 @@ export interface GetStyleDescriptorResponse {
664664
ETag?: string | undefined;
665665
}
666666

667+
/**
668+
* @public
669+
* @enum
670+
*/
671+
export const TileAdditionalFeature = {
672+
/**
673+
* Map elevation contour lines.
674+
*/
675+
CONTOUR_LINES: "ContourLines",
676+
/**
677+
* Map hillshading details for shading elevation changes.
678+
*/
679+
HILLSHADE: "Hillshade",
680+
/**
681+
* Map logistics details, including advanced pois and road networks.
682+
*/
683+
LOGISTICS: "Logistics",
684+
/**
685+
* Map transit details.
686+
*/
687+
TRANSIT: "Transit",
688+
} as const;
689+
690+
/**
691+
* @public
692+
*/
693+
export type TileAdditionalFeature = (typeof TileAdditionalFeature)[keyof typeof TileAdditionalFeature];
694+
667695
/**
668696
* @public
669697
*/
670698
export interface GetTileRequest {
699+
/**
700+
* <p>A list of optional additional parameters such as map styles that can be requested for each result.</p>
701+
* @public
702+
*/
703+
AdditionalFeatures?: TileAdditionalFeature[] | undefined;
704+
671705
/**
672706
* <p>Specifies the desired tile set.</p> <p>Valid Values: <code>raster.satellite | vector.basemap</code> </p>
673707
* @public

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export const se_GetTileCommand = async (
148148
b.p("X", () => input.X!, "{X}", false);
149149
b.p("Y", () => input.Y!, "{Y}", false);
150150
const query: any = map({
151+
[_af]: [() => input.AdditionalFeatures !== void 0, () => input[_AF]! || []],
151152
[_k]: [, input[_K]!],
152153
});
153154
let body: any;
@@ -428,6 +429,7 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
428429
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
429430
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
430431

432+
const _AF = "AdditionalFeatures";
431433
const _BB = "BoundingBox";
432434
const _BP = "BoundedPositions";
433435
const _C = "Center";
@@ -455,6 +457,7 @@ const _TM = "TravelModes";
455457
const _Tr = "Traffic";
456458
const _W = "Width";
457459
const _Z = "Zoom";
460+
const _af = "additional-features";
458461
const _bb = "bounding-box";
459462
const _bp = "bounded-positions";
460463
const _c = "center";

codegen/sdk-codegen/aws-models/geo-maps.json

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@
150150
"traits": {
151151
"smithy.api#documentation": "<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>",
152152
"smithy.api#httpLabel": {},
153+
"smithy.api#length": {
154+
"max": 50
155+
},
153156
"smithy.api#pattern": "^[0-9]+-[0-9]+\\.pbf$",
154157
"smithy.api#required": {}
155158
}
@@ -366,14 +369,20 @@
366369
"target": "com.amazonaws.geomaps#PositionListString",
367370
"traits": {
368371
"smithy.api#documentation": "<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>",
369-
"smithy.api#httpQuery": "bounding-box"
372+
"smithy.api#httpQuery": "bounding-box",
373+
"smithy.api#length": {
374+
"max": 100
375+
}
370376
}
371377
},
372378
"BoundedPositions": {
373379
"target": "com.amazonaws.geomaps#PositionListString",
374380
"traits": {
375381
"smithy.api#documentation": "<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>",
376-
"smithy.api#httpQuery": "bounded-positions"
382+
"smithy.api#httpQuery": "bounded-positions",
383+
"smithy.api#length": {
384+
"max": 2000
385+
}
377386
}
378387
},
379388
"Center": {
@@ -448,7 +457,11 @@
448457
"target": "com.amazonaws.geomaps#SensitiveInteger",
449458
"traits": {
450459
"smithy.api#documentation": "<p>Applies additional space (in pixels) around overlay feature to prevent them from being cut or obscured.</p> <note> <p>Value for max and min is determined by:</p> <p>Min: <code>1</code> </p> <p>Max: <code>min(height, width)/4</code> </p> </note> <p>Example: <code>100</code> </p>",
451-
"smithy.api#httpQuery": "padding"
460+
"smithy.api#httpQuery": "padding",
461+
"smithy.api#range": {
462+
"min": 0,
463+
"max": 350
464+
}
452465
}
453466
},
454467
"PoliticalView": {
@@ -758,6 +771,13 @@
758771
"com.amazonaws.geomaps#GetTileRequest": {
759772
"type": "structure",
760773
"members": {
774+
"AdditionalFeatures": {
775+
"target": "com.amazonaws.geomaps#TileAdditionalFeatureList",
776+
"traits": {
777+
"smithy.api#documentation": "<p>A list of optional additional parameters such as map styles that can be requested for each result.</p>",
778+
"smithy.api#httpQuery": "additional-features"
779+
}
780+
},
761781
"Tileset": {
762782
"target": "com.amazonaws.geomaps#Tileset",
763783
"traits": {
@@ -771,6 +791,9 @@
771791
"traits": {
772792
"smithy.api#documentation": "<p>The zoom value for the map tile.</p>",
773793
"smithy.api#httpLabel": {},
794+
"smithy.api#length": {
795+
"max": 2
796+
},
774797
"smithy.api#pattern": "\\d+",
775798
"smithy.api#required": {}
776799
}
@@ -780,6 +803,9 @@
780803
"traits": {
781804
"smithy.api#documentation": "<p>The X axis value for the map tile. Must be between 0 and 19.</p>",
782805
"smithy.api#httpLabel": {},
806+
"smithy.api#length": {
807+
"max": 7
808+
},
783809
"smithy.api#pattern": "\\d+",
784810
"smithy.api#required": {}
785811
}
@@ -789,6 +815,9 @@
789815
"traits": {
790816
"smithy.api#documentation": "<p>The Y axis value for the map tile.</p>",
791817
"smithy.api#httpLabel": {},
818+
"smithy.api#length": {
819+
"max": 7
820+
},
792821
"smithy.api#pattern": "\\d+",
793822
"smithy.api#required": {}
794823
}
@@ -2030,7 +2059,8 @@
20302059
"type": "string",
20312060
"traits": {
20322061
"smithy.api#length": {
2033-
"min": 7
2062+
"min": 7,
2063+
"max": 7000
20342064
},
20352065
"smithy.api#pattern": "^(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?)(,(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?))*$",
20362066
"smithy.api#sensitive": {}
@@ -2169,6 +2199,45 @@
21692199
"smithy.api#retryable": {}
21702200
}
21712201
},
2202+
"com.amazonaws.geomaps#TileAdditionalFeature": {
2203+
"type": "string",
2204+
"traits": {
2205+
"smithy.api#enum": [
2206+
{
2207+
"name": "CONTOUR_LINES",
2208+
"value": "ContourLines",
2209+
"documentation": "Map elevation contour lines."
2210+
},
2211+
{
2212+
"name": "HILLSHADE",
2213+
"value": "Hillshade",
2214+
"documentation": "Map hillshading details for shading elevation changes."
2215+
},
2216+
{
2217+
"name": "LOGISTICS",
2218+
"value": "Logistics",
2219+
"documentation": "Map logistics details, including advanced pois and road networks."
2220+
},
2221+
{
2222+
"name": "TRANSIT",
2223+
"value": "Transit",
2224+
"documentation": "Map transit details."
2225+
}
2226+
]
2227+
}
2228+
},
2229+
"com.amazonaws.geomaps#TileAdditionalFeatureList": {
2230+
"type": "list",
2231+
"member": {
2232+
"target": "com.amazonaws.geomaps#TileAdditionalFeature"
2233+
},
2234+
"traits": {
2235+
"smithy.api#length": {
2236+
"max": 4
2237+
},
2238+
"smithy.api#uniqueItems": {}
2239+
}
2240+
},
21722241
"com.amazonaws.geomaps#Tileset": {
21732242
"type": "string",
21742243
"traits": {
@@ -2211,6 +2280,9 @@
22112280
"target": "com.amazonaws.geomaps#TravelMode"
22122281
},
22132282
"traits": {
2283+
"smithy.api#length": {
2284+
"max": 2
2285+
},
22142286
"smithy.api#uniqueItems": {}
22152287
}
22162288
},

0 commit comments

Comments
 (0)