Aracılığıyla paylaş


@azure-rest/maps-render package

Arabirimler

CircularPath

Döngüsel bir yol belirtin.

CircularPathOptions

Döngüsel bir yolun stilini değiştiren seçenekler.

CopyrightCaptionOutput

Bu nesne başarılı bir telif hakkı çağrısından döndürülür

CopyrightOutput

Bu nesne başarılı bir telif hakkı isteğinden döndürülür

ErrorAdditionalInfoOutput

Kaynak yönetimi hatası ek bilgileri.

ErrorDetailOutput

Hata ayrıntısı.

ErrorResponseOutput

Başarısız işlemlerin hata ayrıntılarını döndürmek için tüm Azure Resource Manager API'leri için genel hata yanıtı. (Bu, OData hata yanıt biçimini de izler.).

GetCopyrightCaption
GetCopyrightForTile
GetCopyrightForWorld
GetCopyrightFromBoundingBox
GetMapAttribution
GetMapStateTile
GetMapStaticImage
GetMapTile
GetMapTileset
MapAttributionOutput

Kutucuk kümesinin istenen bölümü için telif hakkı atfı.

MapTilesetOutput

TileJSON biçimindeki bir kutucuk kümesi için meta veriler.

MapsRenderClientOptions

İstemci için isteğe bağlı parametreler

Pin

Raptiyenin konumunu ve etiket metnini belirtin.

PinOptions

Varsayılan/yok resim stili için sabitleme seçenekleri..

PinSet
PolygonalPath

Çokgen bir yol belirtin.

PolygonalPathOptions

Çokgen bir yolun stilini değiştiren seçenekler.

RegionCopyrightsCountryOutput

Ülke özelliği

RegionCopyrightsOutput
RenderGetCopyrightCaption200Response

Get Copyright Caption API,İşleme hizmetinden istenen kutucuklarla kullanılacak telif hakkı bilgilerini sunmak üzere tasarlanmış bir HTTP GET isteğidir. Haritanın tamamı için temel bir telif hakkına ek olarak, bazı ülkeler/bölgeler için belirli telif hakkı gruplarına hizmet verebilir.

Harita isteği için telif haklarına alternatif olarak, sağlayıcı bilgilerini haritada görüntülemek için açıklamalı alt yazılar da döndürebilir.

RenderGetCopyrightCaptionDefaultResponse

Get Copyright Caption API,İşleme hizmetinden istenen kutucuklarla kullanılacak telif hakkı bilgilerini sunmak üzere tasarlanmış bir HTTP GET isteğidir. Haritanın tamamı için temel bir telif hakkına ek olarak, bazı ülkeler/bölgeler için belirli telif hakkı gruplarına hizmet verebilir.

Harita isteği için telif haklarına alternatif olarak, sağlayıcı bilgilerini haritada görüntülemek için açıklamalı alt yazılar da döndürebilir.

RenderGetCopyrightForTile200Response

Belirli bir kutucuğun telif hakkı bilgilerini almak için, isteğin kutucuğun yakınlaştırma düzeyini ve x ve y koordinatlarını belirtmesi gerekir. Daha fazla bilgi için bkz. Yakınlaştırma Düzeyleri ve Kutucuk Kılavuzu .

Telif Hakkı API'si, İşleme hizmeti için telif hakkı bilgilerini sunmak üzere tasarlanmıştır. Api, haritanın tamamı için temel telif haklarına ek olarak bazı ülkeler/bölgeler için belirli telif hakkı gruplarına da hizmet sunmaktadır.

RenderGetCopyrightForTileDefaultResponse

Belirli bir kutucuğun telif hakkı bilgilerini almak için, isteğin kutucuğun yakınlaştırma düzeyini ve x ve y koordinatlarını belirtmesi gerekir. Daha fazla bilgi için bkz. Yakınlaştırma Düzeyleri ve Kutucuk Kılavuzu .

Telif Hakkı API'si, İşleme hizmeti için telif hakkı bilgilerini sunmak üzere tasarlanmıştır. Api, haritanın tamamı için temel telif haklarına ek olarak bazı ülkeler/bölgeler için belirli telif hakkı gruplarına da hizmet sunmaktadır.

RenderGetCopyrightForTileQueryParam
RenderGetCopyrightForTileQueryParamProperties
RenderGetCopyrightForWorld200Response

Dünya için telif hakkı bilgilerini döndürür. Tüm dünya için varsayılan telif hakkı bilgilerini almak için kutucuk veya sınırlayıcı kutu belirtmeyin.

Telif Hakkı API'si, İşleme hizmeti için telif hakkı bilgilerini sunmak üzere tasarlanmıştır. Api, haritanın tamamı için temel telif haklarına ek olarak bazı ülkeler/bölgeler için belirli telif hakkı gruplarına da hizmet sunmaktadır.

RenderGetCopyrightForWorldDefaultResponse

Dünya için telif hakkı bilgilerini döndürür. Tüm dünya için varsayılan telif hakkı bilgilerini almak için kutucuk veya sınırlayıcı kutu belirtmeyin.

Telif Hakkı API'si, İşleme hizmeti için telif hakkı bilgilerini sunmak üzere tasarlanmıştır. Api, haritanın tamamı için temel telif haklarına ek olarak bazı ülkeler/bölgeler için belirli telif hakkı gruplarına da hizmet sunmaktadır.

RenderGetCopyrightForWorldQueryParam
RenderGetCopyrightForWorldQueryParamProperties
RenderGetCopyrightFromBoundingBox200Response

Belirli bir sınırlayıcı kutu için telif hakkı bilgilerini döndürür. Sınırlayıcı kutu istekleri en düşük ve enlem (EPSG-3857) koordinatlarını belirtmelidir

RenderGetCopyrightFromBoundingBoxDefaultResponse

Belirli bir sınırlayıcı kutu için telif hakkı bilgilerini döndürür. Sınırlayıcı kutu istekleri en düşük ve enlem (EPSG-3857) koordinatlarını belirtmelidir

RenderGetCopyrightFromBoundingBoxQueryParam
RenderGetCopyrightFromBoundingBoxQueryParamProperties
RenderGetMapAttribution200Response

Get Map Attribution API'si, kullanıcıların kutucuk kümesinin bir bölümü için harita telif hakkı ilişkilendirme bilgileri istemesine olanak tanır.

RenderGetMapAttributionDefaultResponse

Get Map Attribution API'si, kullanıcıların kutucuk kümesinin bir bölümü için harita telif hakkı ilişkilendirme bilgileri istemesine olanak tanır.

RenderGetMapAttributionQueryParam
RenderGetMapAttributionQueryParamProperties
RenderGetMapStateTile200Headers
RenderGetMapStateTile200Response

Durum kutucuklarını genellikle harita denetimi veya SDK'nın iç mekan haritalar modülüyle tümleştirilecek şekilde vektör biçiminde getirir. Kullanıcı dinamik stili etkinleştirdikten sonra harita denetimi bu API'yi çağırır. Daha fazla bilgi için bkz. Yakınlaştırma Düzeyleri ve Kutucuk Kılavuzu .

RenderGetMapStateTileDefaultResponse

Durum kutucuklarını genellikle harita denetimi veya SDK'nın iç mekan haritalar modülüyle tümleştirilecek şekilde vektör biçiminde getirir. Kullanıcı dinamik stili etkinleştirdikten sonra harita denetimi bu API'yi çağırır. Daha fazla bilgi için bkz. Yakınlaştırma Düzeyleri ve Kutucuk Kılavuzu .

RenderGetMapStateTileQueryParam
RenderGetMapStateTileQueryParamProperties
RenderGetMapStaticImage200Headers
RenderGetMapStaticImage200Response

Bu işleme API'si, kullanıcı tanımlı bir alanın statik, rasterleştirilmiş harita görünümlerini oluşturur. İstenen kullanıcı deneyimi etkileşimli harita denetimleri gerektirmediğinde veya bant genişliği sınırlı olduğunda basit web uygulamaları için uygundur. Bu API, haritaları tarayıcı dışındaki uygulamalara, arka uç hizmetlerine, rapor oluşturma veya masaüstü uygulamalarına eklemek için de kullanışlıdır.

Bu API, temel veri görselleştirme parametreleri içerir:

  • Birden çok stilde etiketlenmiş raptler.
  • Daire, yol ve çokgen geometri türlerini işleme.

Daha fazla bilgi ve ayrıntılı örnekler için bkz. Raster eşlemesinde özel verileri işleme.

Bbox parametresinin boyutları, yakınlaştırma düzeyine bağlı olarak kısıtlanır. Bu, sonuçta elde edilen görüntünün uygun bir ayrıntı düzeyine sahip olmasını sağlar.

Yakınlaştırma Düzeyi Min Lon Aralığı Maksimum Lon Aralığı Min Lat Aralığı Maksimum Lat Aralığı
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

Not: API'ye merkezi veya bbox parametresi sağlanmalıdır.

RenderGetMapStaticImageDefaultResponse

Bu işleme API'si, kullanıcı tanımlı bir alanın statik, rasterleştirilmiş harita görünümlerini oluşturur. İstenen kullanıcı deneyimi etkileşimli harita denetimleri gerektirmediğinde veya bant genişliği sınırlı olduğunda basit web uygulamaları için uygundur. Bu API, haritaları tarayıcı dışındaki uygulamalara, arka uç hizmetlerine, rapor oluşturma veya masaüstü uygulamalarına eklemek için de kullanışlıdır.

Bu API, temel veri görselleştirme parametreleri içerir:

  • Birden çok stilde etiketlenmiş raptler.
  • Daire, yol ve çokgen geometri türlerini işleme.

Daha fazla bilgi ve ayrıntılı örnekler için bkz. Raster eşlemesinde özel verileri işleme.

Bbox parametresinin boyutları, yakınlaştırma düzeyine bağlı olarak kısıtlanır. Bu, sonuçta elde edilen görüntünün uygun bir ayrıntı düzeyine sahip olmasını sağlar.

Yakınlaştırma Düzeyi Min Lon Aralığı Maksimum Lon Aralığı Min Lat Aralığı Maksimum Lat Aralığı
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

Not: API'ye merkezi veya bbox parametresi sağlanmalıdır.

RenderGetMapStaticImageQueryParam
RenderGetMapStaticImageQueryParamProperties
RenderGetMapTile200Headers
RenderGetMapTile200Response

Kullanıcıların genellikle bir harita denetimi veya SDK ile tümleştirilmesi için vektör veya raster biçimlerinde harita kutucukları istemesine olanak tanıyan bir HTTP GET isteğindeki Get Map Tiles API'si. İstenebilecek bazı örnek kutucuklar Azure Haritalar yol kutucukları, gerçek zamanlı Weather Radar kutucukları veya Azure Haritalar Creatorkullanılarak oluşturulan harita kutucuklarıdır. Varsayılan olarak Azure Haritalar, web haritası denetimi (Web SDK) için vektör kutucukları kullanır ve Android SDK .

RenderGetMapTileDefaultResponse

Kullanıcıların genellikle bir harita denetimi veya SDK ile tümleştirilmesi için vektör veya raster biçimlerinde harita kutucukları istemesine olanak tanıyan bir HTTP GET isteğindeki Get Map Tiles API'si. İstenebilecek bazı örnek kutucuklar Azure Haritalar yol kutucukları, gerçek zamanlı Weather Radar kutucukları veya Azure Haritalar Creatorkullanılarak oluşturulan harita kutucuklarıdır. Varsayılan olarak Azure Haritalar, web haritası denetimi (Web SDK) için vektör kutucukları kullanır ve Android SDK .

RenderGetMapTileQueryParam
RenderGetMapTileQueryParamProperties
RenderGetMapTileset200Response

Harita Kutucuk Kümesi Al API'si kullanıcıların kutucuk kümesi için meta veri istemesine olanak tanır.

RenderGetMapTilesetDefaultResponse

Harita Kutucuk Kümesi Al API'si kullanıcıların kutucuk kümesi için meta veri istemesine olanak tanır.

RenderGetMapTilesetQueryParam
RenderGetMapTilesetQueryParamProperties
Routes

Tür Diğer Adları

MapsRenderClient
RenderGetCopyrightCaptionParameters
RenderGetCopyrightForTileParameters
RenderGetCopyrightForWorldParameters
RenderGetCopyrightFromBoundingBoxParameters
RenderGetMapAttributionParameters
RenderGetMapStateTileParameters
RenderGetMapStaticImageParameters
RenderGetMapTileParameters
RenderGetMapTilesetParameters

İşlevler

createPathQuery((PolygonalPath | CircularPath)[])

eşleme statik görüntüsü isteği almak için bir yol sorgu dizesi oluşturun.

Örnek

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[])

Eşleme statik görüntüsünü almak için sabit sorgu dizesi oluşturma

Örnek

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)

Bir abonelik anahtarından MapsRenderClient örneği oluşturur.

Örnek

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)

Bir Azure Identity TokenCredential'ndan MapsRender örneği oluşturur.

Örnek

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)

Bir Azure Identity AzureSASCredential'ndan MapsRender örneği oluşturur.

Örnek

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")

Belirli bir yakınlaştırma düzeyi için koordinatın içine düştüğü XY kutucuk koordinatlarını hesaplar. Başvuru: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code

Örnek

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"));

İşlev Ayrıntıları

createPathQuery((PolygonalPath | CircularPath)[])

eşleme statik görüntüsü isteği almak için bir yol sorgu dizesi oluşturun.

Örnek

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

Parametreler

paths

(PolygonalPath | CircularPath)[]

Resim üzerinde çizmek istediğiniz PolygonalPath ve CircularPath koleksiyonu.

Döndürülenler

string

createPinsQuery(PinSet[])

Eşleme statik görüntüsünü almak için sabit sorgu dizesi oluşturma

Örnek

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

Parametreler

pinSets

PinSet[]

Döndürülenler

string

  • Oluşturulan sorgu dizesi.

default(AzureKeyCredential, ClientOptions)

Bir abonelik anahtarından MapsRenderClient örneği oluşturur.

Örnek

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

Parametreler

credential
AzureKeyCredential

Hizmete yönelik isteklerin kimliğini doğrulamak için kullanılan bir AzureKeyCredential örneği

options
ClientOptions

İşleme İstemcisi'ni yapılandırmak için kullanılan seçenekler

Döndürülenler

default(TokenCredential, string, ClientOptions)

Bir Azure Identity TokenCredential'ndan MapsRender örneği oluşturur.

Örnek

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

Parametreler

credential
TokenCredential

Hizmete yönelik isteklerin kimliğini doğrulamak için kullanılan TokenCredential örneği

mapsAccountClientId

string

Belirli bir harita kaynağının Azure Haritalar istemci kimliği

options
ClientOptions

İşleme İstemcisi'ni yapılandırmak için kullanılan seçenekler

Döndürülenler

default(AzureSASCredential, ClientOptions)

Bir Azure Identity AzureSASCredential'ndan MapsRender örneği oluşturur.

Örnek

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

Parametreler

credential
AzureSASCredential

Hizmete yönelik isteklerin kimliğini doğrulamak için kullanılan bir AzureSASCredential örneği

options
ClientOptions

İşleme İstemcisi'ni yapılandırmak için kullanılan seçenekler

Döndürülenler

isUnexpected(RenderGetMapTile200Response | RenderGetMapTileDefaultResponse)

function isUnexpected(response: RenderGetMapTile200Response | RenderGetMapTileDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetMapTileset200Response | RenderGetMapTilesetDefaultResponse)

function isUnexpected(response: RenderGetMapTileset200Response | RenderGetMapTilesetDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetMapAttribution200Response | RenderGetMapAttributionDefaultResponse)

function isUnexpected(response: RenderGetMapAttribution200Response | RenderGetMapAttributionDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetMapStateTile200Response | RenderGetMapStateTileDefaultResponse)

function isUnexpected(response: RenderGetMapStateTile200Response | RenderGetMapStateTileDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetCopyrightCaption200Response | RenderGetCopyrightCaptionDefaultResponse)

function isUnexpected(response: RenderGetCopyrightCaption200Response | RenderGetCopyrightCaptionDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetMapStaticImage200Response | RenderGetMapStaticImageDefaultResponse)

function isUnexpected(response: RenderGetMapStaticImage200Response | RenderGetMapStaticImageDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetCopyrightFromBoundingBox200Response | RenderGetCopyrightFromBoundingBoxDefaultResponse)

function isUnexpected(response: RenderGetCopyrightFromBoundingBox200Response | RenderGetCopyrightFromBoundingBoxDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetCopyrightForTile200Response | RenderGetCopyrightForTileDefaultResponse)

function isUnexpected(response: RenderGetCopyrightForTile200Response | RenderGetCopyrightForTileDefaultResponse): response

Parametreler

Döndürülenler

response

isUnexpected(RenderGetCopyrightForWorld200Response | RenderGetCopyrightForWorldDefaultResponse)

function isUnexpected(response: RenderGetCopyrightForWorld200Response | RenderGetCopyrightForWorldDefaultResponse): response

Parametreler

Döndürülenler

response

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

Belirli bir yakınlaştırma düzeyi için koordinatın içine düştüğü XY kutucuk koordinatlarını hesaplar. Başvuru: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code

Örnek

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 }

Parametreler

position
LatLon

Koordinatı [enlem, boylam] biçiminde konumlandırın.

zoom

number

Yakınlaştırma düzeyi.

tileSize

"256" | "512"

Kutucuk piramidindeki kutucukların boyutu.

Döndürülenler

{ x: number, y: number }

Kutucuk XY koordinatları.