MapsRenderClient Class

  • java.lang.Object
    • com.azure.maps.render.MapsRenderClient

public final class MapsRenderClient

Initializes a new instance of the synchronous RenderClient type. MapsRenderClient instances are created via the MapsRenderClientBuilder, as shown below. Creating a sync client using a AzureKeyCredential:

// Authenticates using subscription key
 AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY"));

 // Creates a builder
 MapsRenderClientBuilder builder = new MapsRenderClientBuilder();
 builder.credential(keyCredential);
 builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));

 // Builds the client
 MapsRenderClient client = builder.buildClient();

Method Summary

Modifier and Type Method and Description
void downloadMapStateTile(OutputStream stream, String statesetId, TileIndex tileIndex)

Download Map State Tile Fetches state tiles in vector format typically to be integrated into indoor maps module of map control or SDK.

Response<Void> downloadMapStateTileWithResponse(OutputStream stream, String statesetId, TileIndex tileIndex, Context context)

Download Map State Tile

CopyrightCaption getCopyrightCaption()

Get Copyright Caption Copyrights API is designed to serve copyright information for Render Tile service.

Response<CopyrightCaption> getCopyrightCaptionWithResponse(Context context)

Get Copyright Caption Copyrights API is designed to serve copyright information for Render Tile service.

Copyright getCopyrightForTile(TileIndex tileIndex, boolean includeText)

Get Copyright For Tile **Applies to**: S0 and S1 pricing tiers.

Response<Copyright> getCopyrightForTileWithResponse(TileIndex tileIndex, boolean includeText, Context context)

Get Copyright For Tile Copyrights With Response API is designed to serve copyright information for Render Tile service with response.

Copyright getCopyrightForWorld(boolean includeText)

Get Copyright For World **Applies to**: S0 and S1 pricing tiers.

Response<Copyright> getCopyrightForWorldWithResponse(boolean includeText, Context context)

Get Copyright For World Copyrights with response API is designed to serve copyright information with response for Render Tile service.

Copyright getCopyrightFromBoundingBox(GeoBoundingBox boundingBox, boolean includeText)

Get Copyright From Bounding Box **Applies to**: S0 and S1 pricing tiers.

Response<Copyright> getCopyrightFromBoundingBoxWithResponse(GeoBoundingBox boundingBox, boolean includeText, Context context)

Get Copyright From Bounding Box Returns copyright information for a given bounding box with response.

MapAttribution getMapAttribution(TilesetId tilesetId, int zoom, GeoBoundingBox bounds)

Get Map Attribution

Response<MapAttribution> getMapAttributionWithResponse(TilesetId tilesetId, int zoom, GeoBoundingBox bounds, Context context)

Get Map Attribution The Get Map Attribution With Response API allows users to request map copyright attribution information for a section of a tileset with response

BinaryData getMapStaticImage(MapStaticImageOptions options)

Get Map Static Image The static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20.

Response<BinaryData> getMapStaticImageWithResponse(MapStaticImageOptions options, Context context)

Get Map Static Image The static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20.

BinaryData getMapTile(MapTileOptions options)

Get Map Tile

MapTileset getMapTileset(TilesetId tilesetId)

Get Map Tileset

Response<MapTileset> getMapTilesetWithResponse(TilesetId tilesetId, Context context)

Get Map Tileset The Get Map Tileset API allows users to request metadata for a tileset.

Response<BinaryData> getMapTileWithResponse(MapTileOptions options, Context context)

Get Map Tile

Methods inherited from java.lang.Object

Method Details

downloadMapStateTile

public void downloadMapStateTile(OutputStream stream, String statesetId, TileIndex tileIndex)

Download Map State Tile Fetches state tiles in vector format typically to be integrated into indoor maps module of map control or SDK. The map control will call this API after user turns on dynamic styling (see [Zoom Levels and Tile Grid](Zoom levels and tile grid)).

Parameters:

stream - The output stream to which the tile is written to.
statesetId - The stateset id.
tileIndex - Parameter group.

downloadMapStateTileWithResponse

public Response<Void> downloadMapStateTileWithResponse(OutputStream stream, String statesetId, TileIndex tileIndex, Context context)

Download Map State Tile

Parameters:

stream - The output stream to which the tile is written to.
statesetId - The stateset id
tileIndex - Parameter group
context - the context associated with this operation

Returns:

the map tile

getCopyrightCaption

public CopyrightCaption getCopyrightCaption()

Get Copyright Caption Copyrights API is designed to serve copyright information for Render Tile service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries. As an alternative to copyrights for map request, one can receive captions for displaying the map provider information on the map.

System.out.println("Get Copyright Caption");
 client.getCopyrightCaption();

Returns:

this object is returned from a successful copyright call.

getCopyrightCaptionWithResponse

public Response<CopyrightCaption> getCopyrightCaptionWithResponse(Context context)

Get Copyright Caption Copyrights API is designed to serve copyright information for Render Tile service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries. As an alternative to copyrights for map request, one can receive captions for displaying the map provider information on the map.

System.out.println("Get Copyright Caption");
 client.getCopyrightCaption();

Parameters:

context - the context associated with this operation

Returns:

this object is returned from a successful copyright call.

getCopyrightForTile

public Copyright getCopyrightForTile(TileIndex tileIndex, boolean includeText)

Get Copyright For Tile **Applies to**: S0 and S1 pricing tiers. Copyrights API is designed to serve copyright information for Render Tile service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries. Returns the copyright information for a given tile. To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates (see: Zoom Levels and Tile Grid).

client.getCopyrightForTile(new TileIndex().setX(9).setY(22).setZ(6), true);

Parameters:

tileIndex - Parameter group.
includeText - Yes/no value to exclude textual data from response. Only images and country names will be in response.

Returns:

this object is returned from a successful copyright request.

getCopyrightForTileWithResponse

public Response<Copyright> getCopyrightForTileWithResponse(TileIndex tileIndex, boolean includeText, Context context)

Get Copyright For Tile Copyrights With Response API is designed to serve copyright information for Render Tile service with response. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries. Returns the copyright information for a given tile. To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates (see: Zoom Levels and Tile Grid)

client.getCopyrightForTile(new TileIndex().setX(9).setY(22).setZ(6), true);

Parameters:

tileIndex - Parameter group
includeText - Yes/no value to exclude textual data from response. Only images and country names will be in response.
context - the context associated with this operation.

Returns:

the copyright for the tile.

getCopyrightForWorld

public Copyright getCopyrightForWorld(boolean includeText)

Get Copyright For World **Applies to**: S0 and S1 pricing tiers. Copyrights API is designed to serve copyright information for Render Tile service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries. Returns the copyright information for the world. To obtain the default copyright information for the whole world, do not specify a tile or bounding box.

client.getCopyrightForWorld(true);

Parameters:

includeText - Yes/no value to exclude textual data from response. Only images and country names will be in response.

Returns:

this object is returned from a successful copyright request.

getCopyrightForWorldWithResponse

public Response<Copyright> getCopyrightForWorldWithResponse(boolean includeText, Context context)

Get Copyright For World Copyrights with response API is designed to serve copyright information with response for Render Tile service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries. Returns the copyright information for the world. To obtain the default copyright information for the whole world, do not specify a tile or bounding box.

client.getCopyrightForWorld(true);

Parameters:

includeText - Yes/no value to exclude textual data from response. Only images and country names will be in response.
context - the context associated with this operation.

Returns:

the copyright response.

getCopyrightFromBoundingBox

public Copyright getCopyrightFromBoundingBox(GeoBoundingBox boundingBox, boolean includeText)

Get Copyright From Bounding Box **Applies to**: S0 and S1 pricing tiers. Returns copyright information for a given bounding box. Bounding-box requests should specify the minimum and maximum longitude and latitude (EPSG-3857) coordinates.

GeoBoundingBox boundingBox = new GeoBoundingBox(52.41064, 4.84228, 52.41072, 4.84239);
 client.getCopyrightFromBoundingBox(boundingBox, true);

Parameters:

boundingBox - the GeoBoundingBox for which copyright information is needed.
includeText - Yes/no value to exclude textual data from response. Only images and country names will be in response.

Returns:

this object is returned from a successful copyright request.

getCopyrightFromBoundingBoxWithResponse

public Response<Copyright> getCopyrightFromBoundingBoxWithResponse(GeoBoundingBox boundingBox, boolean includeText, Context context)

Get Copyright From Bounding Box Returns copyright information for a given bounding box with response. Bounding-box requests should specify the minimum and maximum longitude and latitude (EPSG-3857) coordinates.

GeoBoundingBox boundingBox = new GeoBoundingBox(52.41064, 4.84228, 52.41072, 4.84239);
 client.getCopyrightFromBoundingBox(boundingBox, true);

Parameters:

boundingBox - the GeoBoundingBox for which copyright information is needed.
includeText - Yes/no value to exclude textual data from response. Only images and country names will be in response.
context - the context associated with this operation.

Returns:

the copyright information.

getMapAttribution

public MapAttribution getMapAttribution(TilesetId tilesetId, int zoom, GeoBoundingBox bounds)

Get Map Attribution

System.out.println("Get Map Attribution");
 GeoBoundingBox bounds = new GeoBoundingBox(-122.414162, 47.57949, -122.247157, 47.668372);
 new TilesetId();
 client.getMapAttribution(TilesetId.MICROSOFT_BASE, 6, bounds);

Parameters:

tilesetId - the tileset id.
zoom - Zoom level for the desired map attribution.
bounds - the GeoBoundingBox surrounding the area for which attribution is needed.

Returns:

copyright attribution for the requested section of a tileset.

getMapAttributionWithResponse

public Response<MapAttribution> getMapAttributionWithResponse(TilesetId tilesetId, int zoom, GeoBoundingBox bounds, Context context)

Get Map Attribution The Get Map Attribution With Response API allows users to request map copyright attribution information for a section of a tileset with response

System.out.println("Get Map Attribution");
 GeoBoundingBox bounds = new GeoBoundingBox(-122.414162, 47.57949, -122.247157, 47.668372);
 new TilesetId();
 client.getMapAttribution(TilesetId.MICROSOFT_BASE, 6, bounds);

Parameters:

tilesetId - the tileset id.
zoom - Zoom level for the desired map attribution.
bounds - the GeoBoundingBox surrounding the area for which attribution is needed.
context - the context associated with this operation.

Returns:

copyright attribution for the requested section of a tileset.

getMapStaticImage

public BinaryData getMapStaticImage(MapStaticImageOptions options)

Get Map Static Image The static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20. The static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20. The supported resolution range for the map image is from 1x1 to 8192x8192. If you are deciding when to use the static image service over the map tile service, you may want to consider how you would like to interact with the rendered map. If the map contents will be relatively unchanging, a static map is a good choice. If you want to support a lot of zooming, panning and changing of the map content, the map tile service would be a better choice.

System.out.println("Get Map Static Image");
 GeoBoundingBox bbox = new GeoBoundingBox(1.355233, 42.982261, 24.980233, 56.526017);
 new StaticMapLayer();
 new RasterTileFormat();
 MapStaticImageOptions mapStaticImageOptions = new MapStaticImageOptions().setStaticMapLayer(StaticMapLayer.BASIC)
     .setBoundingBox(bbox);
 client.getMapStaticImage(mapStaticImageOptions).toStream();

Parameters:

options - the MapStaticImageOptions used in the call.

Returns:

BinaryData

getMapStaticImageWithResponse

public Response<BinaryData> getMapStaticImageWithResponse(MapStaticImageOptions options, Context context)

Get Map Static Image The static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20. The static image service renders a user-defined, rectangular image containing a map section using a zoom level from 0 to 20. The supported resolution range for the map image is from 1x1 to 8192x8192. If you are deciding when to use the static image service over the map tile service, you may want to consider how you would like to interact with the rendered map. If the map contents will be relatively unchanging, a static map is a good choice. If you want to support a lot of zooming, panning and changing of the map content, the map tile service would be a better choice.

System.out.println("Get Map Static Image");
 GeoBoundingBox bbox = new GeoBoundingBox(1.355233, 42.982261, 24.980233, 56.526017);
 new StaticMapLayer();
 new RasterTileFormat();
 MapStaticImageOptions mapStaticImageOptions = new MapStaticImageOptions().setStaticMapLayer(StaticMapLayer.BASIC)
     .setBoundingBox(bbox);
 client.getMapStaticImage(mapStaticImageOptions).toStream();

Parameters:

options - the MapStaticImageOptions used in the call.
context - the context associated with this operation.

Returns:

the response.

getMapTile

public BinaryData getMapTile(MapTileOptions options)

Get Map Tile

System.out.println("Get Map Tile");
 MapTileOptions mapTileOptions = new MapTileOptions();
 mapTileOptions.setTilesetId(TilesetId.MICROSOFT_BASE_ROAD);
 mapTileOptions.setTileIndex(new TileIndex().setX(10).setY(22).setZ(6));
 client.getMapTile(mapTileOptions);

The Get Map Tiles API allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK.

Parameters:

options - the MapTileOptions to control the API behavior.

Returns:

BinaryData

getMapTileset

public MapTileset getMapTileset(TilesetId tilesetId)

Get Map Tileset

System.out.println("Get Map Tileset");
 new TilesetId();
 client.getMapTileset(TilesetId.MICROSOFT_BASE);

The Get Map Tileset API allows users to request metadata for a tileset.

Parameters:

tilesetId - the tileset id.

Returns:

metadata for a tileset in the TileJSON format.

getMapTilesetWithResponse

public Response<MapTileset> getMapTilesetWithResponse(TilesetId tilesetId, Context context)

Get Map Tileset The Get Map Tileset API allows users to request metadata for a tileset.

System.out.println("Get Map Tileset");
 new TilesetId();
 client.getMapTileset(TilesetId.MICROSOFT_BASE);

Parameters:

tilesetId - the tileset id.
context - the context associated with this operation.

Returns:

metadata for a tileset in the TileJSON format.

getMapTileWithResponse

public Response<BinaryData> getMapTileWithResponse(MapTileOptions options, Context context)

Get Map Tile

System.out.println("Get Map Tile");
 MapTileOptions mapTileOptions = new MapTileOptions();
 mapTileOptions.setTilesetId(TilesetId.MICROSOFT_BASE_ROAD);
 mapTileOptions.setTileIndex(new TileIndex().setX(10).setY(22).setZ(6));
 client.getMapTile(mapTileOptions);

The Get Map Tiles API allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK.

Parameters:

options - the MapTileOptions to control the API behavior.
context - the context associated with this operation.

Returns:

the response.

Applies to