This operation is no longer current and may be deprecated in the future. We recommend upgrading to GetSprites unless you require Grab data.
-
GetMapSprites is part of a previous Amazon Location Service Maps API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).
-
The version 2 GetSprites operation gives a better user experience and is compatible with the remainder of the V2 Maps API.
-
If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under geo-maps or geo_maps, not under location.
-
Since Grab is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using Grab.
-
Start your version 2 API journey with the Maps V2 API Reference or the Developer Guide.
Retrieves the sprite sheet corresponding to a map resource. The sprite sheet is a PNG image paired with a JSON document describing the offsets of individual icons that will be displayed on a rendered map.
Parameters:
-
map_name
(ResourceName)
–
The map resource associated with the sprite file.
-
file_name
(str)
–
The name of the sprite file. Use the following file names for the sprite sheet:
For the JSON document containing image offsets. Use the following file names:
-
key
(Optional[ApiKey], default:
None
)
–
The optional API key to authorize the request.
Raises:
Source code in docs_src/capo_location/_services/async_location.py
| async def get_map_sprites(
self,
map_name: "capo_location.types.resource_name.ResourceName",
file_name: str,
*,
config_overrides: Optional[AsyncLocationClientConfig] = None,
key: Optional["capo_location.types.api_key.ApiKey"] = None,
) -> "capo_location.types.get_map_sprites_response.GetMapSpritesResponse":
"""<important> <p>This operation is no longer current and may be deprecated in the future. We recommend upgrading to <a href="https://docs.aws.amazon.com/location/latest/APIReference/API_geomaps_GetSprites.html"> <code>GetSprites</code> </a> unless you require <code>Grab</code> data.</p> <ul> <li> <p> <code>GetMapSprites</code> is part of a previous Amazon Location Service Maps API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).</p> </li> <li> <p>The version 2 <code>GetSprites</code> operation gives a better user experience and is compatible with the remainder of the V2 Maps API.</p> </li> <li> <p>If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under <code>geo-maps</code> or <code>geo_maps</code>, not under <code>location</code>.</p> </li> <li> <p>Since <code>Grab</code> is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using <code>Grab</code>.</p> </li> <li> <p>Start your version 2 API journey with the <a href="https://docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html">Maps V2 API Reference</a> or the <a href="https://docs.aws.amazon.com/location/latest/developerguide/maps.html">Developer Guide</a>.</p> </li> </ul> </important> <p>Retrieves the sprite sheet corresponding to a map resource. The sprite sheet is a PNG image paired with a JSON document describing the offsets of individual icons that will be displayed on a rendered map.</p>
Args:
map_name: <p>The map resource associated with the sprite file.</p>
file_name: <p>The name of the sprite file. Use the following file names for the sprite sheet:</p> <ul> <li> <p> <code>sprites.png</code> </p> </li> <li> <p> <code>[email protected]</code> for high pixel density displays</p> </li> </ul> <p>For the JSON document containing image offsets. Use the following file names:</p> <ul> <li> <p> <code>sprites.json</code> </p> </li> <li> <p> <code>[email protected]</code> for high pixel density displays</p> </li> </ul>
key: <p>The optional <a href="https://docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
Raises:
capo_location.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.</p>
capo_location.errors.internal_server_exception.InternalServerException: <p>The request has failed to process because of an unknown server error, exception, or failure.</p>
capo_location.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource that you've entered was not found in your AWS account.</p>
capo_location.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling.</p>
capo_location.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service. </p>
capo_location.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_location.types.get_map_sprites_request.GetMapSpritesRequest]",
) -> AsyncOperationResponse[
"capo_location.types.get_map_sprites_response.GetMapSpritesResponse"
]:
import capo_location._operations.location_service.get_map_sprites
(
output,
http_response,
) = await capo_location._operations.location_service.get_map_sprites.async_get_map_sprites(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_location.types.get_map_sprites_request.GetMapSpritesRequest",
) -> dict[str, Any]:
import capo_location.types.get_map_sprites_request
return capo_location.types.get_map_sprites_request.redact_sensitive(input_)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetMapSprites", redact_input=_redact_input),
)
input_: capo_location.types.get_map_sprites_request.GetMapSpritesRequest = {
"map_name": map_name,
"file_name": file_name,
}
if key is not None:
input_["key"] = key
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|