@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 |
지도 요청에 대한 저작권 대신 지도에 공급자 정보를 표시하기 위한 캡션을 반환할 수도 있습니다. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetCopyrightCaptionDefaultResponse |
지도 요청에 대한 저작권 대신 지도에 공급자 정보를 표시하기 위한 캡션을 반환할 수도 있습니다. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapAttributionDefaultResponse |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapAttributionQueryParam | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapAttributionQueryParamProperties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStateTile200Headers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStateTile200Response |
일반적으로 지도 컨트롤 또는 SDK의 실내 지도 모듈에 통합되는 벡터 형식의 상태 타일을 가져옵니다. 맵 컨트롤은 사용자가 동적 스타일을 켜면 이 API를 호출합니다. 자세한 내용은 확대/축소 수준 및 타일 그리드 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStateTileDefaultResponse |
일반적으로 지도 컨트롤 또는 SDK의 실내 지도 모듈에 통합되는 벡터 형식의 상태 타일을 가져옵니다. 맵 컨트롤은 사용자가 동적 스타일을 켜면 이 API를 호출합니다. 자세한 내용은 확대/축소 수준 및 타일 그리드 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStateTileQueryParam | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStateTileQueryParamProperties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStaticImage200Headers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStaticImage200Response |
이 렌더링 API는 사용자 정의 영역의 래스터화된 정적 지도 보기를 생성합니다. 원하는 사용자 환경에 대화형 맵 컨트롤이 필요하지 않거나 대역폭이 제한되는 경우 경량 웹 애플리케이션에 적합합니다. 이 API는 브라우저 외부, 백 엔드 서비스, 보고서 생성 또는 데스크톱 애플리케이션의 애플리케이션에 맵을 포함하는 데에도 유용합니다. 이 API에는 기본 데이터 시각화를 위한 매개 변수가 포함됩니다.
자세한 내용 및 자세한 예제는 래스터 맵사용자 지정 데이터 렌더링
참고: 센터 또는 bbox 매개 변수를 API에 제공해야 합니다. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStaticImageDefaultResponse |
이 렌더링 API는 사용자 정의 영역의 래스터화된 정적 지도 보기를 생성합니다. 원하는 사용자 환경에 대화형 맵 컨트롤이 필요하지 않거나 대역폭이 제한되는 경우 경량 웹 애플리케이션에 적합합니다. 이 API는 브라우저 외부, 백 엔드 서비스, 보고서 생성 또는 데스크톱 애플리케이션의 애플리케이션에 맵을 포함하는 데에도 유용합니다. 이 API에는 기본 데이터 시각화를 위한 매개 변수가 포함됩니다.
자세한 내용 및 자세한 예제는 래스터 맵사용자 지정 데이터 렌더링
참고: 센터 또는 bbox 매개 변수를 API에 제공해야 합니다. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStaticImageQueryParam | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapStaticImageQueryParamProperties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTile200Headers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTile200Response |
HTTP GET 요청의 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTileDefaultResponse |
HTTP GET 요청의 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTileQueryParam | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTileQueryParamProperties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTileset200Response |
지도 타일 세트 가져오기 API를 사용하면 사용자가 타일 세트에 대한 메타데이터를 요청할 수 있습니다. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTilesetDefaultResponse |
지도 타일 세트 가져오기 API를 사용하면 사용자가 타일 세트에 대한 메타데이터를 요청할 수 있습니다. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTilesetQueryParam | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RenderGetMapTilesetQueryParamProperties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Routes |
형식 별칭
함수
create |
지도 정적 이미지 요청을 가져올 예제
|
create |
지도 정적 이미지 가져오기 예제
|
default(Azure |
구독 키에서 MapsRenderClient의 인스턴스를 만듭니다. 예제
|
default(Token |
Azure ID 예제
|
default(Azure |
Azure ID 예제
|
is |
|
is |
|
is |
|
is |
|
is |
|
is |
|
is |
|
is |
|
is |
|
position |
특정 확대/축소 수준에 대해 좌표가 속하는 XY 타일 좌표를 계산합니다. 참조: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code 예제
|
함수 세부 정보
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)[]
이미지에 그리려는 PolygonalPath 및 CircularPath 컬렉션입니다.
반환
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 TokenCredential
MapsRender 인스턴스를 만듭니다.
예제
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 AzureSASCredential
MapsRender 인스턴스를 만듭니다.
예제
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 좌표입니다.