다음을 통해 공유


@azure-rest/maps-render package

인터페이스

CircularPath

순환 경로를 지정합니다.

CircularPathOptions

원형 경로의 스타일을 수정하는 옵션입니다.

CopyrightCaptionOutput

이 개체는 성공적인 저작권 호출에서 반환됩니다.

CopyrightOutput

이 개체는 성공적인 저작권 요청에서 반환됩니다.

ErrorAdditionalInfoOutput

리소스 관리 오류 추가 정보입니다.

ErrorDetailOutput

오류 세부 정보입니다.

ErrorResponseOutput

실패한 작업에 대한 오류 세부 정보를 반환하는 모든 Azure Resource Manager API에 대한 일반적인 오류 응답입니다. 또한 OData 오류 응답 형식을 따릅니다.

GetCopyrightCaption
GetCopyrightForTile
GetCopyrightForWorld
GetCopyrightFromBoundingBox
GetMapAttribution
GetMapStateTile
GetMapStaticImage
GetMapTile
GetMapTileset
MapAttributionOutput

타일 세트의 요청된 섹션에 대한 저작권 특성입니다.

MapTilesetOutput

TileJSON 형식의 타일 세트에 대한 메타데이터입니다.

MapsRenderClientOptions

클라이언트에 대한 선택적 매개 변수

Pin

핀의 위치 및 레이블 텍스트 방법을 지정합니다.

PinOptions

기본/없음 이미지 스타일에 대한 고정 옵션입니다.

PinSet
PolygonalPath

다각형 경로를 지정합니다.

PolygonalPathOptions

다각형 경로의 스타일을 수정하는 옵션입니다.

RegionCopyrightsCountryOutput

국가 속성

RegionCopyrightsOutput
RenderGetCopyrightCaption200Response

Get Copyright Caption API는 Render 서비스에서 요청한 타일과 함께 사용할 저작권 정보를 제공하도록 설계된 HTTP GET 요청입니다. 전체 지도에 대한 기본 저작권 외에도 일부 국가/지역의 특정 저작권 그룹을 제공할 수 있습니다.

지도 요청에 대한 저작권 대신 지도에 공급자 정보를 표시하기 위한 캡션을 반환할 수도 있습니다.

RenderGetCopyrightCaptionDefaultResponse

Get Copyright Caption API는 Render 서비스에서 요청한 타일과 함께 사용할 저작권 정보를 제공하도록 설계된 HTTP GET 요청입니다. 전체 지도에 대한 기본 저작권 외에도 일부 국가/지역의 특정 저작권 그룹을 제공할 수 있습니다.

지도 요청에 대한 저작권 대신 지도에 공급자 정보를 표시하기 위한 캡션을 반환할 수도 있습니다.

RenderGetCopyrightForTile200Response

특정 타일에 대한 저작권 정보를 얻으려면 요청에서 타일의 확대/축소 수준과 x 및 y 좌표를 지정해야 합니다. 자세한 내용은 확대/축소 수준 및 타일 그리드참조하세요.

Copyrights API는 Render 서비스에 대한 저작권 정보를 제공하도록 설계되었습니다. 전체 지도에 대한 기본 저작권 외에도 API는 일부 국가/지역에 대한 특정 저작권 그룹을 제공하고 있습니다.

RenderGetCopyrightForTileDefaultResponse

특정 타일에 대한 저작권 정보를 얻으려면 요청에서 타일의 확대/축소 수준과 x 및 y 좌표를 지정해야 합니다. 자세한 내용은 확대/축소 수준 및 타일 그리드참조하세요.

Copyrights API는 Render 서비스에 대한 저작권 정보를 제공하도록 설계되었습니다. 전체 지도에 대한 기본 저작권 외에도 API는 일부 국가/지역에 대한 특정 저작권 그룹을 제공하고 있습니다.

RenderGetCopyrightForTileQueryParam
RenderGetCopyrightForTileQueryParamProperties
RenderGetCopyrightForWorld200Response

세계의 저작권 정보를 반환합니다. 전 세계에 대한 기본 저작권 정보를 얻으려면 타일 또는 경계 상자를 지정하지 마세요.

Copyrights API는 Render 서비스에 대한 저작권 정보를 제공하도록 설계되었습니다. 전체 지도에 대한 기본 저작권 외에도 API는 일부 국가/지역에 대한 특정 저작권 그룹을 제공하고 있습니다.

RenderGetCopyrightForWorldDefaultResponse

세계의 저작권 정보를 반환합니다. 전 세계에 대한 기본 저작권 정보를 얻으려면 타일 또는 경계 상자를 지정하지 마세요.

Copyrights API는 Render 서비스에 대한 저작권 정보를 제공하도록 설계되었습니다. 전체 지도에 대한 기본 저작권 외에도 API는 일부 국가/지역에 대한 특정 저작권 그룹을 제공하고 있습니다.

RenderGetCopyrightForWorldQueryParam
RenderGetCopyrightForWorldQueryParamProperties
RenderGetCopyrightFromBoundingBox200Response

지정된 경계 상자에 대한 저작권 정보를 반환합니다. 경계 상자 요청은 최소 및 최대 경도 및 위도(EPSG-3857) 좌표를 지정해야 합니다.

RenderGetCopyrightFromBoundingBoxDefaultResponse

지정된 경계 상자에 대한 저작권 정보를 반환합니다. 경계 상자 요청은 최소 및 최대 경도 및 위도(EPSG-3857) 좌표를 지정해야 합니다.

RenderGetCopyrightFromBoundingBoxQueryParam
RenderGetCopyrightFromBoundingBoxQueryParamProperties
RenderGetMapAttribution200Response

Get Map Attribution API를 사용하면 사용자가 타일 세트의 섹션에 대한 지도 저작권 특성 정보를 요청할 수 있습니다.

RenderGetMapAttributionDefaultResponse

Get Map Attribution API를 사용하면 사용자가 타일 세트의 섹션에 대한 지도 저작권 특성 정보를 요청할 수 있습니다.

RenderGetMapAttributionQueryParam
RenderGetMapAttributionQueryParamProperties
RenderGetMapStateTile200Headers
RenderGetMapStateTile200Response

일반적으로 지도 컨트롤 또는 SDK의 실내 지도 모듈에 통합되는 벡터 형식의 상태 타일을 가져옵니다. 맵 컨트롤은 사용자가 동적 스타일을 켜면 이 API를 호출합니다. 자세한 내용은 확대/축소 수준 및 타일 그리드참조하세요.

RenderGetMapStateTileDefaultResponse

일반적으로 지도 컨트롤 또는 SDK의 실내 지도 모듈에 통합되는 벡터 형식의 상태 타일을 가져옵니다. 맵 컨트롤은 사용자가 동적 스타일을 켜면 이 API를 호출합니다. 자세한 내용은 확대/축소 수준 및 타일 그리드참조하세요.

RenderGetMapStateTileQueryParam
RenderGetMapStateTileQueryParamProperties
RenderGetMapStaticImage200Headers
RenderGetMapStaticImage200Response

이 렌더링 API는 사용자 정의 영역의 래스터화된 정적 지도 보기를 생성합니다. 원하는 사용자 환경에 대화형 맵 컨트롤이 필요하지 않거나 대역폭이 제한되는 경우 경량 웹 애플리케이션에 적합합니다. 이 API는 브라우저 외부, 백 엔드 서비스, 보고서 생성 또는 데스크톱 애플리케이션의 애플리케이션에 맵을 포함하는 데에도 유용합니다.

이 API에는 기본 데이터 시각화를 위한 매개 변수가 포함됩니다.

  • 여러 스타일의 레이블이 지정된 압정입니다.
  • 원, 경로 및 다각형 기하 도형 형식을 렌더링합니다.

자세한 내용 및 자세한 예제는 래스터 맵사용자 지정 데이터 렌더링 참조하세요.

bbox 매개 변수의 차원은 확대/축소 수준에 따라 제한됩니다. 이렇게 하면 결과 이미지에 적절한 수준의 세부 정보가 보장됩니다.

확대/축소 수준 최소 론 범위 최대 Lon 범위 최소 위도 범위 최대 위도 범위
0 56.25 360.0 30.1105585173 180.0
1 28.125 360.0 14.87468995 180.0
2 14.063 351.5625 7.4130741851 137.9576312246
3 7.03125 175.78125 3.7034501005 73.6354071932
4 3.515625 87.890625 1.8513375155 35.4776115315
5 1.7578125 43.9453125 0.925620264 17.4589959239
6 0.87890625 21.97265625 0.4628040687 8.6907788223
7 0.439453125 10.986328125 0.2314012764 4.3404320789
8 0.2197265625 5.4931640625 0.1157005434 2.1695927024
9 0.1098632812 2.7465820312 0.0578502599 1.0847183194
10 0.0549316406 1.3732910156 0.0289251285 0.5423494021
11 0.0274658203 0.6866455078 0.014462564 0.2711734813
12 0.0137329102 0.3433227539 0.007231282 0.1355865882
13 0.0068664551 0.171661377 0.003615641 0.067793275
14 0.0034332275 0.0858306885 0.0018078205 0.0338966351
15 0.0017166138 0.0429153442 0.0009039102 0.0169483173
16 0.0008583069 0.0214576721 0.0004519551 0.0084741586
17 0.0004291534 0.0107288361 0.0002259776 0.0042370793
18 0.0002145767 0.005364418 0.0001129888 0.0021185396
19 0.0001072884 0.002682209 5.64944E-05 0.0010592698
20 5.36442E-05 0.0013411045 2.82472E-05 0.0005296349

참고: 센터 또는 bbox 매개 변수를 API에 제공해야 합니다.

RenderGetMapStaticImageDefaultResponse

이 렌더링 API는 사용자 정의 영역의 래스터화된 정적 지도 보기를 생성합니다. 원하는 사용자 환경에 대화형 맵 컨트롤이 필요하지 않거나 대역폭이 제한되는 경우 경량 웹 애플리케이션에 적합합니다. 이 API는 브라우저 외부, 백 엔드 서비스, 보고서 생성 또는 데스크톱 애플리케이션의 애플리케이션에 맵을 포함하는 데에도 유용합니다.

이 API에는 기본 데이터 시각화를 위한 매개 변수가 포함됩니다.

  • 여러 스타일의 레이블이 지정된 압정입니다.
  • 원, 경로 및 다각형 기하 도형 형식을 렌더링합니다.

자세한 내용 및 자세한 예제는 래스터 맵사용자 지정 데이터 렌더링 참조하세요.

bbox 매개 변수의 차원은 확대/축소 수준에 따라 제한됩니다. 이렇게 하면 결과 이미지에 적절한 수준의 세부 정보가 보장됩니다.

확대/축소 수준 최소 론 범위 최대 Lon 범위 최소 위도 범위 최대 위도 범위
0 56.25 360.0 30.1105585173 180.0
1 28.125 360.0 14.87468995 180.0
2 14.063 351.5625 7.4130741851 137.9576312246
3 7.03125 175.78125 3.7034501005 73.6354071932
4 3.515625 87.890625 1.8513375155 35.4776115315
5 1.7578125 43.9453125 0.925620264 17.4589959239
6 0.87890625 21.97265625 0.4628040687 8.6907788223
7 0.439453125 10.986328125 0.2314012764 4.3404320789
8 0.2197265625 5.4931640625 0.1157005434 2.1695927024
9 0.1098632812 2.7465820312 0.0578502599 1.0847183194
10 0.0549316406 1.3732910156 0.0289251285 0.5423494021
11 0.0274658203 0.6866455078 0.014462564 0.2711734813
12 0.0137329102 0.3433227539 0.007231282 0.1355865882
13 0.0068664551 0.171661377 0.003615641 0.067793275
14 0.0034332275 0.0858306885 0.0018078205 0.0338966351
15 0.0017166138 0.0429153442 0.0009039102 0.0169483173
16 0.0008583069 0.0214576721 0.0004519551 0.0084741586
17 0.0004291534 0.0107288361 0.0002259776 0.0042370793
18 0.0002145767 0.005364418 0.0001129888 0.0021185396
19 0.0001072884 0.002682209 5.64944E-05 0.0010592698
20 5.36442E-05 0.0013411045 2.82472E-05 0.0005296349

참고: 센터 또는 bbox 매개 변수를 API에 제공해야 합니다.

RenderGetMapStaticImageQueryParam
RenderGetMapStaticImageQueryParamProperties
RenderGetMapTile200Headers
RenderGetMapTile200Response

HTTP GET 요청의 Get Map Tiles API로, 일반적으로 사용자가 벡터 또는 래스터 형식의 지도 타일을 맵 컨트롤 또는 SDK에 통합하도록 요청할 수 있습니다. 요청될 수 있는 몇 가지 예제 타일은 Azure Maps 로드 타일, 실시간 Weather Radar 타일 또는 Azure Maps Creator사용하여 만든 지도 타일입니다. 기본적으로 Azure Maps는 웹 맵 컨트롤(Web SDK)에 벡터 타일을 사용하고 Android SDK.

RenderGetMapTileDefaultResponse

HTTP GET 요청의 Get Map Tiles API로, 일반적으로 사용자가 벡터 또는 래스터 형식의 지도 타일을 맵 컨트롤 또는 SDK에 통합하도록 요청할 수 있습니다. 요청될 수 있는 몇 가지 예제 타일은 Azure Maps 로드 타일, 실시간 Weather Radar 타일 또는 Azure Maps Creator사용하여 만든 지도 타일입니다. 기본적으로 Azure Maps는 웹 맵 컨트롤(Web SDK)에 벡터 타일을 사용하고 Android SDK.

RenderGetMapTileQueryParam
RenderGetMapTileQueryParamProperties
RenderGetMapTileset200Response

지도 타일 세트 가져오기 API를 사용하면 사용자가 타일 세트에 대한 메타데이터를 요청할 수 있습니다.

RenderGetMapTilesetDefaultResponse

지도 타일 세트 가져오기 API를 사용하면 사용자가 타일 세트에 대한 메타데이터를 요청할 수 있습니다.

RenderGetMapTilesetQueryParam
RenderGetMapTilesetQueryParamProperties
Routes

형식 별칭

MapsRenderClient
RenderGetCopyrightCaptionParameters
RenderGetCopyrightForTileParameters
RenderGetCopyrightForWorldParameters
RenderGetCopyrightFromBoundingBoxParameters
RenderGetMapAttributionParameters
RenderGetMapStateTileParameters
RenderGetMapStaticImageParameters
RenderGetMapTileParameters
RenderGetMapTilesetParameters

함수

createPathQuery((PolygonalPath | CircularPath)[])

지도 정적 이미지 요청을 가져올 경로 쿼리 문자열을 만듭니다.

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender, { CircularPath, PolygonalPath, createPathQuery } from "@azure-rest/maps-render";
import { createWriteStream } from "node:fs";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");

const circularPath: CircularPath = {
  center: [52.4559, 13.228],
  radiusInMeters: 10000,
  options: {
    lineColor: "000000",
    lineOpacity: 0.9,
    lineWidthInPixels: 2,
  },
};

const linearPath: PolygonalPath = {
  coordinates: [
    [52.577, 13.35],
    [52.6, 13.2988],
    [52.32, 13.2988],
  ],
  options: {
    lineColor: "000000",
    lineOpacity: 0.9,
    lineWidthInPixels: 2,
  },
};

const polygonPath: PolygonalPath = {
  coordinates: [
    [52.577, 13.35],
    [52.6, 13.2988],
    [52.32, 13.2988],
    [52.577, 13.35],
  ],
  options: {
    lineColor: "000000",
    lineOpacity: 0.9,
    lineWidthInPixels: 2,
    fillColor: "FFFFFF",
    fillOpacity: 0.8,
  },
};

const path = createPathQuery([circularPath, linearPath, polygonPath]);
// Send the request
const response = await client
  .path("/map/static")
  .get({
    queryParameters: {
      bbox: [13.228, 52.4559, 13.5794, 52.629],
      path,
    },
  })
  .asNodeStream();

// Handle the error.
if (!response.body) {
  throw Error("No response body");
}

response.body.pipe(createWriteStream("path.png"));
createPinsQuery(PinSet[])

지도 정적 이미지 가져오기 핀 쿼리 문자열 만들기

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender, { PinSet, createPinsQuery } from "@azure-rest/maps-render";
import { createWriteStream } from "node:fs";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");

const pins: PinSet[] = [
  {
    pins: [
      { coordinate: [52.577, 13.35], label: "Label start" },
      { coordinate: [52.6, 13.2988], label: "Label end" },
    ],
    pinImage: "default",
    options: {
      scale: 0.9,
      pinColor: "FF0000",
      labelColor: "0000FF",
      labelSizeInPixels: 18,
    },
  },
];

const path = createPinsQuery(pins);

const response = await client
  .path("/map/static")
  .get({
    queryParameters: {
      bbox: [13.228, 52.4559, 13.5794, 52.62],
      zoom: 10,
      path,
    },
    skipUrlEncoding: true,
  })
  .asNodeStream();

// Handle the error.
if (!response.body) {
  throw Error("No response body");
}

response.body.pipe(createWriteStream("pin.png"));
default(AzureKeyCredential, ClientOptions)

구독 키에서 MapsRenderClient의 인스턴스를 만듭니다.

예제

import { AzureKeyCredential } from "@azure/core-auth";
import MapsRender from "@azure-rest/maps-render";

const credential = new AzureKeyCredential("<subscription-key>");
const client = MapsRender(credential);
default(TokenCredential, string, ClientOptions)

Azure ID TokenCredentialMapsRender 인스턴스를 만듭니다.

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender from "@azure-rest/maps-render";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");
default(AzureSASCredential, ClientOptions)

Azure ID AzureSASCredentialMapsRender 인스턴스를 만듭니다.

예제

import { AzureSASCredential } from "@azure/core-auth";
import MapsRender from "@azure-rest/maps-render";

const credential = new AzureSASCredential("<SAS Token>");
const client = MapsRender(credential);
isUnexpected(RenderGetMapTile200Response | RenderGetMapTileDefaultResponse)
isUnexpected(RenderGetMapTileset200Response | RenderGetMapTilesetDefaultResponse)
isUnexpected(RenderGetMapAttribution200Response | RenderGetMapAttributionDefaultResponse)
isUnexpected(RenderGetMapStateTile200Response | RenderGetMapStateTileDefaultResponse)
isUnexpected(RenderGetCopyrightCaption200Response | RenderGetCopyrightCaptionDefaultResponse)
isUnexpected(RenderGetMapStaticImage200Response | RenderGetMapStaticImageDefaultResponse)
isUnexpected(RenderGetCopyrightFromBoundingBox200Response | RenderGetCopyrightFromBoundingBoxDefaultResponse)
isUnexpected(RenderGetCopyrightForTile200Response | RenderGetCopyrightForTileDefaultResponse)
isUnexpected(RenderGetCopyrightForWorld200Response | RenderGetCopyrightForWorldDefaultResponse)
positionToTileXY(LatLon, number, "256" | "512")

특정 확대/축소 수준에 대해 좌표가 속하는 XY 타일 좌표를 계산합니다. 참조: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender, { positionToTileXY } from "@azure-rest/maps-render";
import { createWriteStream } from "node:fs";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");

const zoom = 6;
// Use the helper function `positionToTileXY` to get the tile index from the coordinate.
const { x, y } = positionToTileXY([47.61559, -122.33817], 6, "256");
const response = await client
  .path("/map/tile")
  .get({
    queryParameters: {
      tilesetId: "microsoft.base.road",
      zoom,
      x,
      y,
    },
  })
  .asNodeStream();

// Handle the error.
if (!response.body) {
  throw Error("No response body");
}

response.body.pipe(createWriteStream("tile.png"));

함수 세부 정보

createPathQuery((PolygonalPath | CircularPath)[])

지도 정적 이미지 요청을 가져올 경로 쿼리 문자열을 만듭니다.

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender, { CircularPath, PolygonalPath, createPathQuery } from "@azure-rest/maps-render";
import { createWriteStream } from "node:fs";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");

const circularPath: CircularPath = {
  center: [52.4559, 13.228],
  radiusInMeters: 10000,
  options: {
    lineColor: "000000",
    lineOpacity: 0.9,
    lineWidthInPixels: 2,
  },
};

const linearPath: PolygonalPath = {
  coordinates: [
    [52.577, 13.35],
    [52.6, 13.2988],
    [52.32, 13.2988],
  ],
  options: {
    lineColor: "000000",
    lineOpacity: 0.9,
    lineWidthInPixels: 2,
  },
};

const polygonPath: PolygonalPath = {
  coordinates: [
    [52.577, 13.35],
    [52.6, 13.2988],
    [52.32, 13.2988],
    [52.577, 13.35],
  ],
  options: {
    lineColor: "000000",
    lineOpacity: 0.9,
    lineWidthInPixels: 2,
    fillColor: "FFFFFF",
    fillOpacity: 0.8,
  },
};

const path = createPathQuery([circularPath, linearPath, polygonPath]);
// Send the request
const response = await client
  .path("/map/static")
  .get({
    queryParameters: {
      bbox: [13.228, 52.4559, 13.5794, 52.629],
      path,
    },
  })
  .asNodeStream();

// Handle the error.
if (!response.body) {
  throw Error("No response body");
}

response.body.pipe(createWriteStream("path.png"));
function createPathQuery(paths: (PolygonalPath | CircularPath)[]): string

매개 변수

paths

(PolygonalPath | CircularPath)[]

이미지에 그리려는 PolygonalPathCircularPath 컬렉션입니다.

반환

string

createPinsQuery(PinSet[])

지도 정적 이미지 가져오기 핀 쿼리 문자열 만들기

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender, { PinSet, createPinsQuery } from "@azure-rest/maps-render";
import { createWriteStream } from "node:fs";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");

const pins: PinSet[] = [
  {
    pins: [
      { coordinate: [52.577, 13.35], label: "Label start" },
      { coordinate: [52.6, 13.2988], label: "Label end" },
    ],
    pinImage: "default",
    options: {
      scale: 0.9,
      pinColor: "FF0000",
      labelColor: "0000FF",
      labelSizeInPixels: 18,
    },
  },
];

const path = createPinsQuery(pins);

const response = await client
  .path("/map/static")
  .get({
    queryParameters: {
      bbox: [13.228, 52.4559, 13.5794, 52.62],
      zoom: 10,
      path,
    },
    skipUrlEncoding: true,
  })
  .asNodeStream();

// Handle the error.
if (!response.body) {
  throw Error("No response body");
}

response.body.pipe(createWriteStream("pin.png"));
function createPinsQuery(pinSets: PinSet[]): string

매개 변수

pinSets

PinSet[]

반환

string

  • 구성된 쿼리 문자열입니다.

default(AzureKeyCredential, ClientOptions)

구독 키에서 MapsRenderClient의 인스턴스를 만듭니다.

예제

import { AzureKeyCredential } from "@azure/core-auth";
import MapsRender from "@azure-rest/maps-render";

const credential = new AzureKeyCredential("<subscription-key>");
const client = MapsRender(credential);
function default(credential: AzureKeyCredential, options?: ClientOptions): MapsRenderClient

매개 변수

credential
AzureKeyCredential

서비스에 대한 요청을 인증하는 데 사용되는 AzureKeyCredential 인스턴스

options
ClientOptions

렌더링 클라이언트를 구성하는 데 사용되는 옵션

반환

default(TokenCredential, string, ClientOptions)

Azure ID TokenCredentialMapsRender 인스턴스를 만듭니다.

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender from "@azure-rest/maps-render";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");
function default(credential: TokenCredential, mapsAccountClientId: string, options?: ClientOptions): MapsRenderClient

매개 변수

credential
TokenCredential

서비스에 대한 요청을 인증하는 데 사용되는 TokenCredential 인스턴스

mapsAccountClientId

string

특정 맵 리소스의 Azure Maps 클라이언트 ID

options
ClientOptions

렌더링 클라이언트를 구성하는 데 사용되는 옵션

반환

default(AzureSASCredential, ClientOptions)

Azure ID AzureSASCredentialMapsRender 인스턴스를 만듭니다.

예제

import { AzureSASCredential } from "@azure/core-auth";
import MapsRender from "@azure-rest/maps-render";

const credential = new AzureSASCredential("<SAS Token>");
const client = MapsRender(credential);
function default(credential: AzureSASCredential, options?: ClientOptions): MapsRenderClient

매개 변수

credential
AzureSASCredential

서비스에 대한 요청을 인증하는 데 사용되는 AzureSASCredential 인스턴스

options
ClientOptions

렌더링 클라이언트를 구성하는 데 사용되는 옵션

반환

isUnexpected(RenderGetMapTile200Response | RenderGetMapTileDefaultResponse)

function isUnexpected(response: RenderGetMapTile200Response | RenderGetMapTileDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetMapTileset200Response | RenderGetMapTilesetDefaultResponse)

function isUnexpected(response: RenderGetMapTileset200Response | RenderGetMapTilesetDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetMapAttribution200Response | RenderGetMapAttributionDefaultResponse)

function isUnexpected(response: RenderGetMapAttribution200Response | RenderGetMapAttributionDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetMapStateTile200Response | RenderGetMapStateTileDefaultResponse)

function isUnexpected(response: RenderGetMapStateTile200Response | RenderGetMapStateTileDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetCopyrightCaption200Response | RenderGetCopyrightCaptionDefaultResponse)

function isUnexpected(response: RenderGetCopyrightCaption200Response | RenderGetCopyrightCaptionDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetMapStaticImage200Response | RenderGetMapStaticImageDefaultResponse)

function isUnexpected(response: RenderGetMapStaticImage200Response | RenderGetMapStaticImageDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetCopyrightFromBoundingBox200Response | RenderGetCopyrightFromBoundingBoxDefaultResponse)

function isUnexpected(response: RenderGetCopyrightFromBoundingBox200Response | RenderGetCopyrightFromBoundingBoxDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetCopyrightForTile200Response | RenderGetCopyrightForTileDefaultResponse)

function isUnexpected(response: RenderGetCopyrightForTile200Response | RenderGetCopyrightForTileDefaultResponse): response

매개 변수

반환

response

isUnexpected(RenderGetCopyrightForWorld200Response | RenderGetCopyrightForWorldDefaultResponse)

function isUnexpected(response: RenderGetCopyrightForWorld200Response | RenderGetCopyrightForWorldDefaultResponse): response

매개 변수

반환

response

positionToTileXY(LatLon, number, "256" | "512")

특정 확대/축소 수준에 대해 좌표가 속하는 XY 타일 좌표를 계산합니다. 참조: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code

예제

import { DefaultAzureCredential } from "@azure/identity";
import MapsRender, { positionToTileXY } from "@azure-rest/maps-render";
import { createWriteStream } from "node:fs";

const credential = new DefaultAzureCredential();
const client = MapsRender(credential, "<maps-account-client-id>");

const zoom = 6;
// Use the helper function `positionToTileXY` to get the tile index from the coordinate.
const { x, y } = positionToTileXY([47.61559, -122.33817], 6, "256");
const response = await client
  .path("/map/tile")
  .get({
    queryParameters: {
      tilesetId: "microsoft.base.road",
      zoom,
      x,
      y,
    },
  })
  .asNodeStream();

// Handle the error.
if (!response.body) {
  throw Error("No response body");
}

response.body.pipe(createWriteStream("tile.png"));
function positionToTileXY(position: LatLon, zoom: number, tileSize: "256" | "512"): { x: number, y: number }

매개 변수

position
LatLon

[위도, 경도] 형식의 위치 좌표입니다.

zoom

number

확대/축소 수준입니다.

tileSize

"256" | "512"

타일 피라미드의 타일 크기입니다.

반환

{ x: number, y: number }

타일 XY 좌표입니다.