@azure-rest/maps-render 2.0.0-beta.1 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +48 -34
  3. package/dist/browser/createMultiCollection.d.ts +7 -0
  4. package/dist/browser/createMultiCollection.d.ts.map +1 -0
  5. package/dist/browser/createPathQuery.d.ts +117 -0
  6. package/dist/browser/createPathQuery.d.ts.map +1 -0
  7. package/{dist-esm/src → dist/browser}/createPathQuery.js +41 -24
  8. package/dist/browser/createPathQuery.js.map +1 -0
  9. package/dist/browser/createPinsQuery.d.ts +102 -0
  10. package/dist/browser/createPinsQuery.d.ts.map +1 -0
  11. package/{dist-esm/src → dist/browser}/createPinsQuery.js +44 -25
  12. package/dist/browser/createPinsQuery.js.map +1 -0
  13. package/dist/browser/generated/clientDefinitions.d.ts +131 -0
  14. package/dist/browser/generated/clientDefinitions.d.ts.map +1 -0
  15. package/dist/browser/generated/clientDefinitions.js +4 -0
  16. package/dist/browser/generated/clientDefinitions.js.map +1 -0
  17. package/dist/browser/generated/index.d.ts +9 -0
  18. package/dist/browser/generated/index.d.ts.map +1 -0
  19. package/dist/browser/generated/index.js +11 -0
  20. package/dist/browser/generated/index.js.map +1 -0
  21. package/dist/browser/generated/isUnexpected.d.ts +11 -0
  22. package/dist/browser/generated/isUnexpected.d.ts.map +1 -0
  23. package/dist/browser/generated/isUnexpected.js +79 -0
  24. package/dist/browser/generated/isUnexpected.js.map +1 -0
  25. package/dist/browser/generated/logger.d.ts +2 -0
  26. package/dist/browser/generated/logger.d.ts.map +1 -0
  27. package/dist/browser/generated/logger.js +5 -0
  28. package/dist/browser/generated/logger.js.map +1 -0
  29. package/dist/browser/generated/mapsRenderClient.d.ts +15 -0
  30. package/dist/browser/generated/mapsRenderClient.d.ts.map +1 -0
  31. package/dist/browser/generated/mapsRenderClient.js +42 -0
  32. package/dist/browser/generated/mapsRenderClient.js.map +1 -0
  33. package/dist/browser/generated/outputModels.d.ts +93 -0
  34. package/dist/browser/generated/outputModels.d.ts.map +1 -0
  35. package/dist/browser/generated/outputModels.js +4 -0
  36. package/dist/browser/generated/outputModels.js.map +1 -0
  37. package/dist/browser/generated/parameters.d.ts +384 -0
  38. package/dist/browser/generated/parameters.d.ts.map +1 -0
  39. package/dist/browser/generated/parameters.js +4 -0
  40. package/dist/browser/generated/parameters.js.map +1 -0
  41. package/dist/browser/generated/responses.d.ts +248 -0
  42. package/dist/browser/generated/responses.d.ts.map +1 -0
  43. package/dist/browser/generated/responses.js +4 -0
  44. package/dist/browser/generated/responses.js.map +1 -0
  45. package/dist/browser/index.d.ts +7 -0
  46. package/dist/browser/index.d.ts.map +1 -0
  47. package/dist/browser/index.js +9 -0
  48. package/dist/browser/index.js.map +1 -0
  49. package/dist/browser/mapsRender.d.ts +53 -0
  50. package/dist/browser/mapsRender.d.ts.map +1 -0
  51. package/{dist-esm/src → dist/browser}/mapsRender.js +1 -1
  52. package/dist/browser/mapsRender.js.map +1 -0
  53. package/dist/browser/package.json +3 -0
  54. package/dist/browser/positionToTileXY.d.ts +47 -0
  55. package/dist/browser/positionToTileXY.d.ts.map +1 -0
  56. package/{dist-esm/src → dist/browser}/positionToTileXY.js +23 -2
  57. package/dist/browser/positionToTileXY.js.map +1 -0
  58. package/dist/commonjs/createMultiCollection.d.ts +7 -0
  59. package/dist/commonjs/createMultiCollection.d.ts.map +1 -0
  60. package/dist/commonjs/createMultiCollection.js +16 -0
  61. package/dist/commonjs/createMultiCollection.js.map +1 -0
  62. package/dist/commonjs/createPathQuery.d.ts +117 -0
  63. package/dist/commonjs/createPathQuery.d.ts.map +1 -0
  64. package/dist/commonjs/createPathQuery.js +117 -0
  65. package/dist/commonjs/createPathQuery.js.map +1 -0
  66. package/dist/commonjs/createPinsQuery.d.ts +102 -0
  67. package/dist/commonjs/createPinsQuery.d.ts.map +1 -0
  68. package/dist/commonjs/createPinsQuery.js +96 -0
  69. package/dist/commonjs/createPinsQuery.js.map +1 -0
  70. package/dist/commonjs/generated/clientDefinitions.d.ts +131 -0
  71. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  72. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  73. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  74. package/dist/commonjs/generated/index.d.ts +9 -0
  75. package/dist/commonjs/generated/index.d.ts.map +1 -0
  76. package/dist/commonjs/generated/index.js +14 -0
  77. package/dist/commonjs/generated/index.js.map +1 -0
  78. package/dist/commonjs/generated/isUnexpected.d.ts +11 -0
  79. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  80. package/dist/commonjs/generated/isUnexpected.js +82 -0
  81. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  82. package/dist/commonjs/generated/logger.d.ts +2 -0
  83. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  84. package/dist/commonjs/generated/logger.js +8 -0
  85. package/dist/commonjs/generated/logger.js.map +1 -0
  86. package/dist/commonjs/generated/mapsRenderClient.d.ts +15 -0
  87. package/dist/commonjs/generated/mapsRenderClient.d.ts.map +1 -0
  88. package/dist/commonjs/generated/mapsRenderClient.js +45 -0
  89. package/dist/commonjs/generated/mapsRenderClient.js.map +1 -0
  90. package/dist/commonjs/generated/outputModels.d.ts +93 -0
  91. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  92. package/dist/commonjs/generated/outputModels.js +5 -0
  93. package/dist/commonjs/generated/outputModels.js.map +1 -0
  94. package/dist/commonjs/generated/parameters.d.ts +384 -0
  95. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  96. package/dist/commonjs/generated/parameters.js +5 -0
  97. package/dist/commonjs/generated/parameters.js.map +1 -0
  98. package/dist/commonjs/generated/responses.d.ts +248 -0
  99. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  100. package/dist/commonjs/generated/responses.js +5 -0
  101. package/dist/commonjs/generated/responses.js.map +1 -0
  102. package/dist/commonjs/index.d.ts +7 -0
  103. package/dist/commonjs/index.d.ts.map +1 -0
  104. package/dist/commonjs/index.js +12 -0
  105. package/dist/commonjs/index.js.map +1 -0
  106. package/dist/commonjs/mapsRender.d.ts +53 -0
  107. package/dist/commonjs/mapsRender.d.ts.map +1 -0
  108. package/dist/commonjs/mapsRender.js +44 -0
  109. package/dist/commonjs/mapsRender.js.map +1 -0
  110. package/dist/commonjs/package.json +3 -0
  111. package/dist/commonjs/positionToTileXY.d.ts +47 -0
  112. package/dist/commonjs/positionToTileXY.d.ts.map +1 -0
  113. package/dist/commonjs/positionToTileXY.js +68 -0
  114. package/dist/commonjs/positionToTileXY.js.map +1 -0
  115. package/dist/commonjs/tsdoc-metadata.json +11 -0
  116. package/dist/esm/createMultiCollection.d.ts +7 -0
  117. package/dist/esm/createMultiCollection.d.ts.map +1 -0
  118. package/dist/esm/createMultiCollection.js +13 -0
  119. package/dist/esm/createMultiCollection.js.map +1 -0
  120. package/dist/esm/createPathQuery.d.ts +117 -0
  121. package/dist/esm/createPathQuery.d.ts.map +1 -0
  122. package/dist/esm/createPathQuery.js +114 -0
  123. package/dist/esm/createPathQuery.js.map +1 -0
  124. package/dist/esm/createPinsQuery.d.ts +102 -0
  125. package/dist/esm/createPinsQuery.d.ts.map +1 -0
  126. package/dist/esm/createPinsQuery.js +93 -0
  127. package/dist/esm/createPinsQuery.js.map +1 -0
  128. package/dist/esm/generated/clientDefinitions.d.ts +131 -0
  129. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  130. package/dist/esm/generated/clientDefinitions.js +4 -0
  131. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  132. package/dist/esm/generated/index.d.ts +9 -0
  133. package/dist/esm/generated/index.d.ts.map +1 -0
  134. package/dist/esm/generated/index.js +11 -0
  135. package/dist/esm/generated/index.js.map +1 -0
  136. package/dist/esm/generated/isUnexpected.d.ts +11 -0
  137. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  138. package/dist/esm/generated/isUnexpected.js +79 -0
  139. package/dist/esm/generated/isUnexpected.js.map +1 -0
  140. package/dist/esm/generated/logger.d.ts +2 -0
  141. package/dist/esm/generated/logger.d.ts.map +1 -0
  142. package/dist/esm/generated/logger.js +5 -0
  143. package/dist/esm/generated/logger.js.map +1 -0
  144. package/dist/esm/generated/mapsRenderClient.d.ts +15 -0
  145. package/dist/esm/generated/mapsRenderClient.d.ts.map +1 -0
  146. package/dist/esm/generated/mapsRenderClient.js +42 -0
  147. package/dist/esm/generated/mapsRenderClient.js.map +1 -0
  148. package/dist/esm/generated/outputModels.d.ts +93 -0
  149. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  150. package/dist/esm/generated/outputModels.js +4 -0
  151. package/dist/esm/generated/outputModels.js.map +1 -0
  152. package/dist/esm/generated/parameters.d.ts +384 -0
  153. package/dist/esm/generated/parameters.d.ts.map +1 -0
  154. package/dist/esm/generated/parameters.js +4 -0
  155. package/dist/esm/generated/parameters.js.map +1 -0
  156. package/dist/esm/generated/responses.d.ts +248 -0
  157. package/dist/esm/generated/responses.d.ts.map +1 -0
  158. package/dist/esm/generated/responses.js +4 -0
  159. package/dist/esm/generated/responses.js.map +1 -0
  160. package/dist/esm/index.d.ts +7 -0
  161. package/dist/esm/index.d.ts.map +1 -0
  162. package/dist/esm/index.js +9 -0
  163. package/dist/esm/index.js.map +1 -0
  164. package/dist/esm/mapsRender.d.ts +53 -0
  165. package/dist/esm/mapsRender.d.ts.map +1 -0
  166. package/dist/esm/mapsRender.js +40 -0
  167. package/dist/esm/mapsRender.js.map +1 -0
  168. package/dist/esm/package.json +3 -0
  169. package/dist/esm/positionToTileXY.d.ts +47 -0
  170. package/dist/esm/positionToTileXY.d.ts.map +1 -0
  171. package/dist/esm/positionToTileXY.js +65 -0
  172. package/dist/esm/positionToTileXY.js.map +1 -0
  173. package/dist/react-native/createMultiCollection.d.ts +7 -0
  174. package/dist/react-native/createMultiCollection.d.ts.map +1 -0
  175. package/dist/react-native/createMultiCollection.js +13 -0
  176. package/dist/react-native/createMultiCollection.js.map +1 -0
  177. package/dist/react-native/createPathQuery.d.ts +117 -0
  178. package/dist/react-native/createPathQuery.d.ts.map +1 -0
  179. package/dist/react-native/createPathQuery.js +114 -0
  180. package/dist/react-native/createPathQuery.js.map +1 -0
  181. package/dist/react-native/createPinsQuery.d.ts +102 -0
  182. package/dist/react-native/createPinsQuery.d.ts.map +1 -0
  183. package/dist/react-native/createPinsQuery.js +93 -0
  184. package/dist/react-native/createPinsQuery.js.map +1 -0
  185. package/dist/react-native/generated/clientDefinitions.d.ts +131 -0
  186. package/dist/react-native/generated/clientDefinitions.d.ts.map +1 -0
  187. package/dist/react-native/generated/clientDefinitions.js +4 -0
  188. package/dist/react-native/generated/clientDefinitions.js.map +1 -0
  189. package/dist/react-native/generated/index.d.ts +9 -0
  190. package/dist/react-native/generated/index.d.ts.map +1 -0
  191. package/dist/react-native/generated/index.js +11 -0
  192. package/dist/react-native/generated/index.js.map +1 -0
  193. package/dist/react-native/generated/isUnexpected.d.ts +11 -0
  194. package/dist/react-native/generated/isUnexpected.d.ts.map +1 -0
  195. package/dist/react-native/generated/isUnexpected.js +79 -0
  196. package/dist/react-native/generated/isUnexpected.js.map +1 -0
  197. package/dist/react-native/generated/logger.d.ts +2 -0
  198. package/dist/react-native/generated/logger.d.ts.map +1 -0
  199. package/dist/react-native/generated/logger.js +5 -0
  200. package/dist/react-native/generated/logger.js.map +1 -0
  201. package/dist/react-native/generated/mapsRenderClient.d.ts +15 -0
  202. package/dist/react-native/generated/mapsRenderClient.d.ts.map +1 -0
  203. package/dist/react-native/generated/mapsRenderClient.js +42 -0
  204. package/dist/react-native/generated/mapsRenderClient.js.map +1 -0
  205. package/dist/react-native/generated/outputModels.d.ts +93 -0
  206. package/dist/react-native/generated/outputModels.d.ts.map +1 -0
  207. package/dist/react-native/generated/outputModels.js +4 -0
  208. package/dist/react-native/generated/outputModels.js.map +1 -0
  209. package/dist/react-native/generated/parameters.d.ts +384 -0
  210. package/dist/react-native/generated/parameters.d.ts.map +1 -0
  211. package/dist/react-native/generated/parameters.js +4 -0
  212. package/dist/react-native/generated/parameters.js.map +1 -0
  213. package/dist/react-native/generated/responses.d.ts +248 -0
  214. package/dist/react-native/generated/responses.d.ts.map +1 -0
  215. package/dist/react-native/generated/responses.js +4 -0
  216. package/dist/react-native/generated/responses.js.map +1 -0
  217. package/dist/react-native/index.d.ts +7 -0
  218. package/dist/react-native/index.d.ts.map +1 -0
  219. package/dist/react-native/index.js +9 -0
  220. package/dist/react-native/index.js.map +1 -0
  221. package/dist/react-native/mapsRender.d.ts +53 -0
  222. package/dist/react-native/mapsRender.d.ts.map +1 -0
  223. package/dist/react-native/mapsRender.js +40 -0
  224. package/dist/react-native/mapsRender.js.map +1 -0
  225. package/dist/react-native/package.json +3 -0
  226. package/dist/react-native/positionToTileXY.d.ts +47 -0
  227. package/dist/react-native/positionToTileXY.d.ts.map +1 -0
  228. package/dist/react-native/positionToTileXY.js +65 -0
  229. package/dist/react-native/positionToTileXY.js.map +1 -0
  230. package/package.json +73 -52
  231. package/dist/index.js +0 -404
  232. package/dist/index.js.map +0 -1
  233. package/dist-esm/src/createPathQuery.js.map +0 -1
  234. package/dist-esm/src/createPinsQuery.js.map +0 -1
  235. package/dist-esm/src/index.js +0 -9
  236. package/dist-esm/src/index.js.map +0 -1
  237. package/dist-esm/src/mapsRender.js.map +0 -1
  238. package/dist-esm/src/positionToTileXY.js.map +0 -1
  239. package/review/maps-render.api.md +0 -564
  240. package/types/maps-render-rest.d.ts +0 -1212
  241. /package/{dist-esm/src → dist/browser}/createMultiCollection.js +0 -0
  242. /package/{dist-esm/src → dist/browser}/createMultiCollection.js.map +0 -0
@@ -0,0 +1,248 @@
1
+ import { RawHttpHeaders } from "@azure/core-rest-pipeline";
2
+ import { HttpResponse } from "@azure-rest/core-client";
3
+ import { ErrorResponseOutput, MapTilesetOutput, MapAttributionOutput, CopyrightCaptionOutput, CopyrightOutput } from "./outputModels.js";
4
+ export interface RenderGetMapTile200Headers {
5
+ /** The content-type for the response. */
6
+ "content-type"?: string;
7
+ }
8
+ /**
9
+ *
10
+ * The `Get Map Tiles` API in an HTTP GET request that allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK. Some example tiles that can be requested are Azure Maps road tiles, real-time Weather Radar tiles or the map tiles created using [Azure Maps Creator](https://aka.ms/amcreator). By default, Azure Maps uses vector tiles for its web map control ([Web SDK](/azure/azure-maps/about-azure-maps#web-sdk)) and [Android SDK](/azure/azure-maps/about-azure-maps#android-sdk).
11
+ */
12
+ export interface RenderGetMapTile200Response extends HttpResponse {
13
+ status: "200";
14
+ /** Value may contain any sequence of octets */
15
+ body: Uint8Array;
16
+ headers: RawHttpHeaders & RenderGetMapTile200Headers;
17
+ }
18
+ /**
19
+ *
20
+ * The `Get Map Tiles` API in an HTTP GET request that allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK. Some example tiles that can be requested are Azure Maps road tiles, real-time Weather Radar tiles or the map tiles created using [Azure Maps Creator](https://aka.ms/amcreator). By default, Azure Maps uses vector tiles for its web map control ([Web SDK](/azure/azure-maps/about-azure-maps#web-sdk)) and [Android SDK](/azure/azure-maps/about-azure-maps#android-sdk).
21
+ */
22
+ export interface RenderGetMapTileDefaultResponse extends HttpResponse {
23
+ status: string;
24
+ body: ErrorResponseOutput;
25
+ }
26
+ /**
27
+ *
28
+ * The Get Map Tileset API allows users to request metadata for a tileset.
29
+ */
30
+ export interface RenderGetMapTileset200Response extends HttpResponse {
31
+ status: "200";
32
+ body: MapTilesetOutput;
33
+ }
34
+ /**
35
+ *
36
+ * The Get Map Tileset API allows users to request metadata for a tileset.
37
+ */
38
+ export interface RenderGetMapTilesetDefaultResponse extends HttpResponse {
39
+ status: string;
40
+ body: ErrorResponseOutput;
41
+ }
42
+ /**
43
+ *
44
+ * The `Get Map Attribution` API allows users to request map copyright attribution information for a section of a tileset.
45
+ */
46
+ export interface RenderGetMapAttribution200Response extends HttpResponse {
47
+ status: "200";
48
+ body: MapAttributionOutput;
49
+ }
50
+ /**
51
+ *
52
+ * The `Get Map Attribution` API allows users to request map copyright attribution information for a section of a tileset.
53
+ */
54
+ export interface RenderGetMapAttributionDefaultResponse extends HttpResponse {
55
+ status: string;
56
+ body: ErrorResponseOutput;
57
+ }
58
+ export interface RenderGetMapStateTile200Headers {
59
+ /** The content-type for the response. */
60
+ "content-type"?: string;
61
+ }
62
+ /**
63
+ *
64
+ * 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. For more information, see [Zoom Levels and Tile Grid](/azure/location-based-services/zoom-levels-and-tile-grid).
65
+ */
66
+ export interface RenderGetMapStateTile200Response extends HttpResponse {
67
+ status: "200";
68
+ /** Value may contain any sequence of octets */
69
+ body: Uint8Array;
70
+ headers: RawHttpHeaders & RenderGetMapStateTile200Headers;
71
+ }
72
+ /**
73
+ *
74
+ * 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. For more information, see [Zoom Levels and Tile Grid](/azure/location-based-services/zoom-levels-and-tile-grid).
75
+ */
76
+ export interface RenderGetMapStateTileDefaultResponse extends HttpResponse {
77
+ status: string;
78
+ body: ErrorResponseOutput;
79
+ }
80
+ /**
81
+ *
82
+ * The `Get Copyright Caption` API is an HTTP GET request designed to serve copyright information to be used with tiles requested from the Render service. In addition to a basic copyright for the whole map, it can serve specific groups of copyrights for some countries/regions.
83
+ *
84
+ * As an alternative to copyrights for map request, it can also return captions for displaying provider information on the map.
85
+ */
86
+ export interface RenderGetCopyrightCaption200Response extends HttpResponse {
87
+ status: "200";
88
+ body: CopyrightCaptionOutput;
89
+ }
90
+ /**
91
+ *
92
+ * The `Get Copyright Caption` API is an HTTP GET request designed to serve copyright information to be used with tiles requested from the Render service. In addition to a basic copyright for the whole map, it can serve specific groups of copyrights for some countries/regions.
93
+ *
94
+ * As an alternative to copyrights for map request, it can also return captions for displaying provider information on the map.
95
+ */
96
+ export interface RenderGetCopyrightCaptionDefaultResponse extends HttpResponse {
97
+ status: string;
98
+ body: ErrorResponseOutput;
99
+ }
100
+ export interface RenderGetMapStaticImage200Headers {
101
+ /** The content-type for the response. */
102
+ "content-type"?: string;
103
+ }
104
+ /**
105
+ * This rendering API produces static, rasterized map views of a user-defined area. It's suitable for lightweight web applications, when the desired user experience doesn't require interactive map controls, or when bandwidth is limited. This API is also useful for embedding maps in applications outside of the browser, in backend services, report generation, or desktop applications.
106
+ *
107
+ * This API includes parameters for basic data visualization:
108
+ *
109
+ * - Labeled pushpins in multiple styles.
110
+ * - Render circle, path, and polygon geometry types.
111
+ *
112
+ * For more information and detailed examples, see [Render custom data on a raster map](/azure/azure-maps/how-to-render-custom-data).
113
+ * <br><br>
114
+ * The dimensions of the bbox parameter are constrained, depending on the zoom level. This ensures the resulting image has an appropriate level of detail.
115
+ * <br><br>
116
+ *
117
+ * |Zoom Level | Min Lon Range | Max Lon Range | Min Lat Range| Max Lat Range|
118
+ * |:----------|:----------------|:----------------|:----------------|:-------------|
119
+ * |0 | 56.25 | 360.0 | 30.1105585173 | 180.0 |
120
+ * |1 | 28.125 | 360.0 | 14.87468995 | 180.0 |
121
+ * |2 | 14.063 | 351.5625 | 7.4130741851 | 137.9576312246 |
122
+ * |3 | 7.03125 | 175.78125 | 3.7034501005 | 73.6354071932 |
123
+ * |4 | 3.515625 | 87.890625 | 1.8513375155 | 35.4776115315 |
124
+ * |5 | 1.7578125 | 43.9453125 | 0.925620264 | 17.4589959239 |
125
+ * |6 | 0.87890625 | 21.97265625 | 0.4628040687 | 8.6907788223 |
126
+ * |7 | 0.439453125 | 10.986328125 | 0.2314012764 | 4.3404320789 |
127
+ * |8 | 0.2197265625 | 5.4931640625 | 0.1157005434 | 2.1695927024 |
128
+ * |9 | 0.1098632812 | 2.7465820312 | 0.0578502599 | 1.0847183194 |
129
+ * |10 | 0.0549316406 | 1.3732910156 | 0.0289251285 | 0.5423494021 |
130
+ * |11 | 0.0274658203 | 0.6866455078 | 0.014462564 | 0.2711734813 |
131
+ * |12 | 0.0137329102 | 0.3433227539 | 0.007231282 | 0.1355865882 |
132
+ * |13 | 0.0068664551 | 0.171661377 | 0.003615641 | 0.067793275 |
133
+ * |14 | 0.0034332275 | 0.0858306885 | 0.0018078205 | 0.0338966351 |
134
+ * |15 | 0.0017166138 | 0.0429153442 | 0.0009039102 | 0.0169483173 |
135
+ * |16 | 0.0008583069 | 0.0214576721 | 0.0004519551 | 0.0084741586 |
136
+ * |17 | 0.0004291534 | 0.0107288361 | 0.0002259776 | 0.0042370793 |
137
+ * |18 | 0.0002145767 | 0.005364418 | 0.0001129888 | 0.0021185396 |
138
+ * |19 | 0.0001072884 | 0.002682209 | 5.64944E-05 | 0.0010592698 |
139
+ * |20 | 5.36442E-05 | 0.0013411045 | 2.82472E-05 | 0.0005296349 |
140
+ *
141
+ * _Note_ : Either **center** or **bbox** parameter must be supplied to the API.
142
+ */
143
+ export interface RenderGetMapStaticImage200Response extends HttpResponse {
144
+ status: "200";
145
+ /** Value may contain any sequence of octets */
146
+ body: Uint8Array;
147
+ headers: RawHttpHeaders & RenderGetMapStaticImage200Headers;
148
+ }
149
+ /**
150
+ * This rendering API produces static, rasterized map views of a user-defined area. It's suitable for lightweight web applications, when the desired user experience doesn't require interactive map controls, or when bandwidth is limited. This API is also useful for embedding maps in applications outside of the browser, in backend services, report generation, or desktop applications.
151
+ *
152
+ * This API includes parameters for basic data visualization:
153
+ *
154
+ * - Labeled pushpins in multiple styles.
155
+ * - Render circle, path, and polygon geometry types.
156
+ *
157
+ * For more information and detailed examples, see [Render custom data on a raster map](/azure/azure-maps/how-to-render-custom-data).
158
+ * <br><br>
159
+ * The dimensions of the bbox parameter are constrained, depending on the zoom level. This ensures the resulting image has an appropriate level of detail.
160
+ * <br><br>
161
+ *
162
+ * |Zoom Level | Min Lon Range | Max Lon Range | Min Lat Range| Max Lat Range|
163
+ * |:----------|:----------------|:----------------|:----------------|:-------------|
164
+ * |0 | 56.25 | 360.0 | 30.1105585173 | 180.0 |
165
+ * |1 | 28.125 | 360.0 | 14.87468995 | 180.0 |
166
+ * |2 | 14.063 | 351.5625 | 7.4130741851 | 137.9576312246 |
167
+ * |3 | 7.03125 | 175.78125 | 3.7034501005 | 73.6354071932 |
168
+ * |4 | 3.515625 | 87.890625 | 1.8513375155 | 35.4776115315 |
169
+ * |5 | 1.7578125 | 43.9453125 | 0.925620264 | 17.4589959239 |
170
+ * |6 | 0.87890625 | 21.97265625 | 0.4628040687 | 8.6907788223 |
171
+ * |7 | 0.439453125 | 10.986328125 | 0.2314012764 | 4.3404320789 |
172
+ * |8 | 0.2197265625 | 5.4931640625 | 0.1157005434 | 2.1695927024 |
173
+ * |9 | 0.1098632812 | 2.7465820312 | 0.0578502599 | 1.0847183194 |
174
+ * |10 | 0.0549316406 | 1.3732910156 | 0.0289251285 | 0.5423494021 |
175
+ * |11 | 0.0274658203 | 0.6866455078 | 0.014462564 | 0.2711734813 |
176
+ * |12 | 0.0137329102 | 0.3433227539 | 0.007231282 | 0.1355865882 |
177
+ * |13 | 0.0068664551 | 0.171661377 | 0.003615641 | 0.067793275 |
178
+ * |14 | 0.0034332275 | 0.0858306885 | 0.0018078205 | 0.0338966351 |
179
+ * |15 | 0.0017166138 | 0.0429153442 | 0.0009039102 | 0.0169483173 |
180
+ * |16 | 0.0008583069 | 0.0214576721 | 0.0004519551 | 0.0084741586 |
181
+ * |17 | 0.0004291534 | 0.0107288361 | 0.0002259776 | 0.0042370793 |
182
+ * |18 | 0.0002145767 | 0.005364418 | 0.0001129888 | 0.0021185396 |
183
+ * |19 | 0.0001072884 | 0.002682209 | 5.64944E-05 | 0.0010592698 |
184
+ * |20 | 5.36442E-05 | 0.0013411045 | 2.82472E-05 | 0.0005296349 |
185
+ *
186
+ * _Note_ : Either **center** or **bbox** parameter must be supplied to the API.
187
+ */
188
+ export interface RenderGetMapStaticImageDefaultResponse extends HttpResponse {
189
+ status: string;
190
+ body: ErrorResponseOutput;
191
+ }
192
+ /**
193
+ *
194
+ * Returns copyright information for a given bounding box. Bounding-box requests should specify the minimum and maximum longitude and latitude (EPSG-3857) coordinates
195
+ */
196
+ export interface RenderGetCopyrightFromBoundingBox200Response extends HttpResponse {
197
+ status: "200";
198
+ body: CopyrightOutput;
199
+ }
200
+ /**
201
+ *
202
+ * Returns copyright information for a given bounding box. Bounding-box requests should specify the minimum and maximum longitude and latitude (EPSG-3857) coordinates
203
+ */
204
+ export interface RenderGetCopyrightFromBoundingBoxDefaultResponse extends HttpResponse {
205
+ status: string;
206
+ body: ErrorResponseOutput;
207
+ }
208
+ /**
209
+ *
210
+ * To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates. For more information, see [Zoom Levels and Tile Grid](/azure/azure-maps/zoom-levels-and-tile-grid).
211
+ *
212
+ * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.
213
+ */
214
+ export interface RenderGetCopyrightForTile200Response extends HttpResponse {
215
+ status: "200";
216
+ body: CopyrightOutput;
217
+ }
218
+ /**
219
+ *
220
+ * To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates. For more information, see [Zoom Levels and Tile Grid](/azure/azure-maps/zoom-levels-and-tile-grid).
221
+ *
222
+ * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.
223
+ */
224
+ export interface RenderGetCopyrightForTileDefaultResponse extends HttpResponse {
225
+ status: string;
226
+ body: ErrorResponseOutput;
227
+ }
228
+ /**
229
+ *
230
+ * Returns the copyright information for the world. To obtain the default copyright information for the whole world, don't specify a tile or bounding box.
231
+ *
232
+ * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.
233
+ */
234
+ export interface RenderGetCopyrightForWorld200Response extends HttpResponse {
235
+ status: "200";
236
+ body: CopyrightOutput;
237
+ }
238
+ /**
239
+ *
240
+ * Returns the copyright information for the world. To obtain the default copyright information for the whole world, don't specify a tile or bounding box.
241
+ *
242
+ * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.
243
+ */
244
+ export interface RenderGetCopyrightForWorldDefaultResponse extends HttpResponse {
245
+ status: string;
246
+ body: ErrorResponseOutput;
247
+ }
248
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/generated/responses.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,0BAA0B;IACzC,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,MAAM,EAAE,KAAK,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,cAAc,GAAG,0BAA0B,CAAC;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA+B,SAAQ,YAAY;IAClE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,kCAAmC,SAAQ,YAAY;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,kCAAmC,SAAQ,YAAY;IACtE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,sCAAuC,SAAQ,YAAY;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,+BAA+B;IAC9C,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,gCAAiC,SAAQ,YAAY;IACpE,MAAM,EAAE,KAAK,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,cAAc,GAAG,+BAA+B,CAAC;CAC3D;AAED;;;GAGG;AACH,MAAM,WAAW,oCAAqC,SAAQ,YAAY;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,oCAAqC,SAAQ,YAAY;IACxE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,wCAAyC,SAAQ,YAAY;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,iCAAiC;IAChD,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,kCAAmC,SAAQ,YAAY;IACtE,MAAM,EAAE,KAAK,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,cAAc,GAAG,iCAAiC,CAAC;CAC7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,sCAAuC,SAAQ,YAAY;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,4CACf,SAAQ,YAAY;IACpB,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,gDACf,SAAQ,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,oCAAqC,SAAQ,YAAY;IACxE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wCAAyC,SAAQ,YAAY;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,qCAAsC,SAAQ,YAAY;IACzE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,yCACf,SAAQ,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=responses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/generated/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n ErrorResponseOutput,\n MapTilesetOutput,\n MapAttributionOutput,\n CopyrightCaptionOutput,\n CopyrightOutput,\n} from \"./outputModels.js\";\n\nexport interface RenderGetMapTile200Headers {\n /** The content-type for the response. */\n \"content-type\"?: string;\n}\n\n/**\n *\n * The `Get Map Tiles` API in an HTTP GET request that allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK. Some example tiles that can be requested are Azure Maps road tiles, real-time Weather Radar tiles or the map tiles created using [Azure Maps Creator](https://aka.ms/amcreator). By default, Azure Maps uses vector tiles for its web map control ([Web SDK](/azure/azure-maps/about-azure-maps#web-sdk)) and [Android SDK](/azure/azure-maps/about-azure-maps#android-sdk).\n */\nexport interface RenderGetMapTile200Response extends HttpResponse {\n status: \"200\";\n /** Value may contain any sequence of octets */\n body: Uint8Array;\n headers: RawHttpHeaders & RenderGetMapTile200Headers;\n}\n\n/**\n *\n * The `Get Map Tiles` API in an HTTP GET request that allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK. Some example tiles that can be requested are Azure Maps road tiles, real-time Weather Radar tiles or the map tiles created using [Azure Maps Creator](https://aka.ms/amcreator). By default, Azure Maps uses vector tiles for its web map control ([Web SDK](/azure/azure-maps/about-azure-maps#web-sdk)) and [Android SDK](/azure/azure-maps/about-azure-maps#android-sdk).\n */\nexport interface RenderGetMapTileDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The Get Map Tileset API allows users to request metadata for a tileset.\n */\nexport interface RenderGetMapTileset200Response extends HttpResponse {\n status: \"200\";\n body: MapTilesetOutput;\n}\n\n/**\n *\n * The Get Map Tileset API allows users to request metadata for a tileset.\n */\nexport interface RenderGetMapTilesetDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The `Get Map Attribution` API allows users to request map copyright attribution information for a section of a tileset.\n */\nexport interface RenderGetMapAttribution200Response extends HttpResponse {\n status: \"200\";\n body: MapAttributionOutput;\n}\n\n/**\n *\n * The `Get Map Attribution` API allows users to request map copyright attribution information for a section of a tileset.\n */\nexport interface RenderGetMapAttributionDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface RenderGetMapStateTile200Headers {\n /** The content-type for the response. */\n \"content-type\"?: string;\n}\n\n/**\n *\n * 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. For more information, see [Zoom Levels and Tile Grid](/azure/location-based-services/zoom-levels-and-tile-grid).\n */\nexport interface RenderGetMapStateTile200Response extends HttpResponse {\n status: \"200\";\n /** Value may contain any sequence of octets */\n body: Uint8Array;\n headers: RawHttpHeaders & RenderGetMapStateTile200Headers;\n}\n\n/**\n *\n * 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. For more information, see [Zoom Levels and Tile Grid](/azure/location-based-services/zoom-levels-and-tile-grid).\n */\nexport interface RenderGetMapStateTileDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The `Get Copyright Caption` API is an HTTP GET request designed to serve copyright information to be used with tiles requested from the Render service. In addition to a basic copyright for the whole map, it can serve specific groups of copyrights for some countries/regions.\n *\n * As an alternative to copyrights for map request, it can also return captions for displaying provider information on the map.\n */\nexport interface RenderGetCopyrightCaption200Response extends HttpResponse {\n status: \"200\";\n body: CopyrightCaptionOutput;\n}\n\n/**\n *\n * The `Get Copyright Caption` API is an HTTP GET request designed to serve copyright information to be used with tiles requested from the Render service. In addition to a basic copyright for the whole map, it can serve specific groups of copyrights for some countries/regions.\n *\n * As an alternative to copyrights for map request, it can also return captions for displaying provider information on the map.\n */\nexport interface RenderGetCopyrightCaptionDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\nexport interface RenderGetMapStaticImage200Headers {\n /** The content-type for the response. */\n \"content-type\"?: string;\n}\n\n/**\n * This rendering API produces static, rasterized map views of a user-defined area. It's suitable for lightweight web applications, when the desired user experience doesn't require interactive map controls, or when bandwidth is limited. This API is also useful for embedding maps in applications outside of the browser, in backend services, report generation, or desktop applications.\n *\n * This API includes parameters for basic data visualization:\n *\n * - Labeled pushpins in multiple styles.\n * - Render circle, path, and polygon geometry types.\n *\n * For more information and detailed examples, see [Render custom data on a raster map](/azure/azure-maps/how-to-render-custom-data).\n * <br><br>\n * The dimensions of the bbox parameter are constrained, depending on the zoom level. This ensures the resulting image has an appropriate level of detail.\n * <br><br>\n *\n * |Zoom Level | Min Lon Range | Max Lon Range | Min Lat Range| Max Lat Range|\n * |:----------|:----------------|:----------------|:----------------|:-------------|\n * |0 | 56.25 | 360.0 | 30.1105585173 | 180.0 |\n * |1 | 28.125 | 360.0 | 14.87468995 | 180.0 |\n * |2 | 14.063 | 351.5625 | 7.4130741851 | 137.9576312246 |\n * |3 | 7.03125 | 175.78125 | 3.7034501005 | 73.6354071932 |\n * |4 | 3.515625 | 87.890625 | 1.8513375155 | 35.4776115315 |\n * |5 | 1.7578125 | 43.9453125 | 0.925620264 | 17.4589959239 |\n * |6 | 0.87890625 | 21.97265625 | 0.4628040687 | 8.6907788223 |\n * |7 | 0.439453125 | 10.986328125 | 0.2314012764 | 4.3404320789 |\n * |8 | 0.2197265625 | 5.4931640625 | 0.1157005434 | 2.1695927024 |\n * |9 | 0.1098632812 | 2.7465820312 | 0.0578502599 | 1.0847183194 |\n * |10 | 0.0549316406 | 1.3732910156 | 0.0289251285 | 0.5423494021 |\n * |11 | 0.0274658203 | 0.6866455078 | 0.014462564 | 0.2711734813 |\n * |12 | 0.0137329102 | 0.3433227539 | 0.007231282 | 0.1355865882 |\n * |13 | 0.0068664551 | 0.171661377 | 0.003615641 | 0.067793275 |\n * |14 | 0.0034332275 | 0.0858306885 | 0.0018078205 | 0.0338966351 |\n * |15 | 0.0017166138 | 0.0429153442 | 0.0009039102 | 0.0169483173 |\n * |16 | 0.0008583069 | 0.0214576721 | 0.0004519551 | 0.0084741586 |\n * |17 | 0.0004291534 | 0.0107288361 | 0.0002259776 | 0.0042370793 |\n * |18 | 0.0002145767 | 0.005364418 | 0.0001129888 | 0.0021185396 |\n * |19 | 0.0001072884 | 0.002682209 | 5.64944E-05 | 0.0010592698 |\n * |20 | 5.36442E-05 | 0.0013411045 | 2.82472E-05 | 0.0005296349 |\n *\n * _Note_ : Either **center** or **bbox** parameter must be supplied to the API.\n */\nexport interface RenderGetMapStaticImage200Response extends HttpResponse {\n status: \"200\";\n /** Value may contain any sequence of octets */\n body: Uint8Array;\n headers: RawHttpHeaders & RenderGetMapStaticImage200Headers;\n}\n\n/**\n * This rendering API produces static, rasterized map views of a user-defined area. It's suitable for lightweight web applications, when the desired user experience doesn't require interactive map controls, or when bandwidth is limited. This API is also useful for embedding maps in applications outside of the browser, in backend services, report generation, or desktop applications.\n *\n * This API includes parameters for basic data visualization:\n *\n * - Labeled pushpins in multiple styles.\n * - Render circle, path, and polygon geometry types.\n *\n * For more information and detailed examples, see [Render custom data on a raster map](/azure/azure-maps/how-to-render-custom-data).\n * <br><br>\n * The dimensions of the bbox parameter are constrained, depending on the zoom level. This ensures the resulting image has an appropriate level of detail.\n * <br><br>\n *\n * |Zoom Level | Min Lon Range | Max Lon Range | Min Lat Range| Max Lat Range|\n * |:----------|:----------------|:----------------|:----------------|:-------------|\n * |0 | 56.25 | 360.0 | 30.1105585173 | 180.0 |\n * |1 | 28.125 | 360.0 | 14.87468995 | 180.0 |\n * |2 | 14.063 | 351.5625 | 7.4130741851 | 137.9576312246 |\n * |3 | 7.03125 | 175.78125 | 3.7034501005 | 73.6354071932 |\n * |4 | 3.515625 | 87.890625 | 1.8513375155 | 35.4776115315 |\n * |5 | 1.7578125 | 43.9453125 | 0.925620264 | 17.4589959239 |\n * |6 | 0.87890625 | 21.97265625 | 0.4628040687 | 8.6907788223 |\n * |7 | 0.439453125 | 10.986328125 | 0.2314012764 | 4.3404320789 |\n * |8 | 0.2197265625 | 5.4931640625 | 0.1157005434 | 2.1695927024 |\n * |9 | 0.1098632812 | 2.7465820312 | 0.0578502599 | 1.0847183194 |\n * |10 | 0.0549316406 | 1.3732910156 | 0.0289251285 | 0.5423494021 |\n * |11 | 0.0274658203 | 0.6866455078 | 0.014462564 | 0.2711734813 |\n * |12 | 0.0137329102 | 0.3433227539 | 0.007231282 | 0.1355865882 |\n * |13 | 0.0068664551 | 0.171661377 | 0.003615641 | 0.067793275 |\n * |14 | 0.0034332275 | 0.0858306885 | 0.0018078205 | 0.0338966351 |\n * |15 | 0.0017166138 | 0.0429153442 | 0.0009039102 | 0.0169483173 |\n * |16 | 0.0008583069 | 0.0214576721 | 0.0004519551 | 0.0084741586 |\n * |17 | 0.0004291534 | 0.0107288361 | 0.0002259776 | 0.0042370793 |\n * |18 | 0.0002145767 | 0.005364418 | 0.0001129888 | 0.0021185396 |\n * |19 | 0.0001072884 | 0.002682209 | 5.64944E-05 | 0.0010592698 |\n * |20 | 5.36442E-05 | 0.0013411045 | 2.82472E-05 | 0.0005296349 |\n *\n * _Note_ : Either **center** or **bbox** parameter must be supplied to the API.\n */\nexport interface RenderGetMapStaticImageDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * Returns copyright information for a given bounding box. Bounding-box requests should specify the minimum and maximum longitude and latitude (EPSG-3857) coordinates\n */\nexport interface RenderGetCopyrightFromBoundingBox200Response\n extends HttpResponse {\n status: \"200\";\n body: CopyrightOutput;\n}\n\n/**\n *\n * Returns copyright information for a given bounding box. Bounding-box requests should specify the minimum and maximum longitude and latitude (EPSG-3857) coordinates\n */\nexport interface RenderGetCopyrightFromBoundingBoxDefaultResponse\n extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates. For more information, see [Zoom Levels and Tile Grid](/azure/azure-maps/zoom-levels-and-tile-grid).\n *\n * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.\n */\nexport interface RenderGetCopyrightForTile200Response extends HttpResponse {\n status: \"200\";\n body: CopyrightOutput;\n}\n\n/**\n *\n * To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates. For more information, see [Zoom Levels and Tile Grid](/azure/azure-maps/zoom-levels-and-tile-grid).\n *\n * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.\n */\nexport interface RenderGetCopyrightForTileDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * Returns the copyright information for the world. To obtain the default copyright information for the whole world, don't specify a tile or bounding box.\n *\n * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.\n */\nexport interface RenderGetCopyrightForWorld200Response extends HttpResponse {\n status: \"200\";\n body: CopyrightOutput;\n}\n\n/**\n *\n * Returns the copyright information for the world. To obtain the default copyright information for the whole world, don't specify a tile or bounding box.\n *\n * Copyrights API is designed to serve copyright information for Render service. In addition to basic copyright for the whole map, API is serving specific groups of copyrights for some countries/regions.\n */\nexport interface RenderGetCopyrightForWorldDefaultResponse\n extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import MapsRender from "./mapsRender.js";
2
+ export * from "./generated/index.js";
3
+ export * from "./positionToTileXY.js";
4
+ export * from "./createPinsQuery.js";
5
+ export * from "./createPathQuery.js";
6
+ export default MapsRender;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,eAAe,UAAU,CAAC"}
@@ -0,0 +1,9 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import MapsRender from "./mapsRender.js";
4
+ export * from "./generated/index.js";
5
+ export * from "./positionToTileXY.js";
6
+ export * from "./createPinsQuery.js";
7
+ export * from "./createPathQuery.js";
8
+ export default MapsRender;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,eAAe,UAAU,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsRender from \"./mapsRender.js\";\n\nexport * from \"./generated/index.js\";\nexport * from \"./positionToTileXY.js\";\nexport * from \"./createPinsQuery.js\";\nexport * from \"./createPathQuery.js\";\n\nexport default MapsRender;\n"]}
@@ -0,0 +1,53 @@
1
+ import type { ClientOptions } from "@azure-rest/core-client";
2
+ import type { AzureKeyCredential, AzureSASCredential, TokenCredential } from "@azure/core-auth";
3
+ import type { MapsRenderClient } from "./generated/index.js";
4
+ /**
5
+ * Creates an instance of MapsRenderClient from a subscription key.
6
+ *
7
+ * @example
8
+ * ```ts snippet:ReadmeSampleCreateClient_SubscriptionKey
9
+ * import { AzureKeyCredential } from "@azure/core-auth";
10
+ * import MapsRender from "@azure-rest/maps-render";
11
+ *
12
+ * const credential = new AzureKeyCredential("<subscription-key>");
13
+ * const client = MapsRender(credential);
14
+ *```
15
+ *
16
+ * @param credential - An AzureKeyCredential instance used to authenticate requests to the service
17
+ * @param options - Options used to configure the Render Client
18
+ */
19
+ export default function MapsRender(credential: AzureKeyCredential, options?: ClientOptions): MapsRenderClient;
20
+ /**
21
+ * Creates an instance of MapsRender from an Azure Identity `TokenCredential`.
22
+ *
23
+ * @example
24
+ * ```ts snippet:ReadmeSampleCreateClient_TokenCredential
25
+ * import { DefaultAzureCredential } from "@azure/identity";
26
+ * import MapsRender from "@azure-rest/maps-render";
27
+ *
28
+ * const credential = new DefaultAzureCredential();
29
+ * const client = MapsRender(credential, "<maps-account-client-id>");
30
+ *```
31
+ *
32
+ * @param credential - An TokenCredential instance used to authenticate requests to the service
33
+ * @param mapsAccountClientId - The Azure Maps client id of a specific map resource
34
+ * @param options - Options used to configure the Render Client
35
+ */
36
+ export default function MapsRender(credential: TokenCredential, mapsAccountClientId: string, options?: ClientOptions): MapsRenderClient;
37
+ /**
38
+ * Creates an instance of MapsRender from an Azure Identity `AzureSASCredential`.
39
+ *
40
+ * @example
41
+ * ```ts snippet:ReadmeSampleCreateClient_SASToken
42
+ * import { AzureSASCredential } from "@azure/core-auth";
43
+ * import MapsRender from "@azure-rest/maps-render";
44
+ *
45
+ * const credential = new AzureSASCredential("<SAS Token>");
46
+ * const client = MapsRender(credential);
47
+ * ```
48
+ *
49
+ * @param credential - An AzureSASCredential instance used to authenticate requests to the service
50
+ * @param options - Options used to configure the Render Client
51
+ */
52
+ export default function MapsRender(credential: AzureSASCredential, options?: ClientOptions): MapsRenderClient;
53
+ //# sourceMappingURL=mapsRender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsRender.d.ts","sourceRoot":"","sources":["../../src/mapsRender.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIhG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,gBAAgB,CAAC;AACpB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,UAAU,EAAE,eAAe,EAC3B,mBAAmB,EAAE,MAAM,EAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,gBAAgB,CAAC;AACpB;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,gBAAgB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  import { isSASCredential, isTokenCredential } from "@azure/core-auth";
4
4
  import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline";
5
5
  import { createMapsClientIdPolicy } from "@azure/maps-common";
6
- import createClient from "../generated/mapsRenderClient";
6
+ import createClient from "./generated/mapsRenderClient.js";
7
7
  export default function MapsRender(credential, clientIdOrOptions = {}, maybeOptions = {}) {
8
8
  const options = typeof clientIdOrOptions === "string" ? maybeOptions : clientIdOrOptions;
9
9
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsRender.js","sourceRoot":"","sources":["../../src/mapsRender.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,YAAY,MAAM,iCAAiC,CAAC;AA6D3D,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,UAAqE,EACrE,oBAA4C,EAAE,EAC9C,eAA8B,EAAE;IAEhC,MAAM,OAAO,GAAG,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAEzF;;;;OAIG;IACH,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,MAAM,GAAG,YAAY,CAAC,SAAgB,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,CAAC,QAAQ,CAAC,SAAS,CACvB,+BAA+B,CAAC;YAC9B,UAAU;YACV,MAAM,EAAE,sCAAsC;SAC/C,CAAC,CACH,CAAC;QACF,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC9D,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,YAAY,CAAC,SAAgB,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;YACxB,IAAI,EAAE,yBAAyB;YAC/B,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI;gBAC7B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,WAAW,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;gBACxE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport type { AzureKeyCredential, AzureSASCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isSASCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { createMapsClientIdPolicy } from \"@azure/maps-common\";\nimport type { MapsRenderClient } from \"./generated/index.js\";\nimport createClient from \"./generated/mapsRenderClient.js\";\n\n/**\n * Creates an instance of MapsRenderClient from a subscription key.\n *\n * @example\n * ```ts snippet:ReadmeSampleCreateClient_SubscriptionKey\n * import { AzureKeyCredential } from \"@azure/core-auth\";\n * import MapsRender from \"@azure-rest/maps-render\";\n *\n * const credential = new AzureKeyCredential(\"<subscription-key>\");\n * const client = MapsRender(credential);\n *```\n *\n * @param credential - An AzureKeyCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the Render Client\n */\nexport default function MapsRender(\n credential: AzureKeyCredential,\n options?: ClientOptions,\n): MapsRenderClient;\n/**\n * Creates an instance of MapsRender from an Azure Identity `TokenCredential`.\n *\n * @example\n * ```ts snippet:ReadmeSampleCreateClient_TokenCredential\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import MapsRender from \"@azure-rest/maps-render\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = MapsRender(credential, \"<maps-account-client-id>\");\n *```\n *\n * @param credential - An TokenCredential instance used to authenticate requests to the service\n * @param mapsAccountClientId - The Azure Maps client id of a specific map resource\n * @param options - Options used to configure the Render Client\n */\nexport default function MapsRender(\n credential: TokenCredential,\n mapsAccountClientId: string,\n options?: ClientOptions,\n): MapsRenderClient;\n/**\n * Creates an instance of MapsRender from an Azure Identity `AzureSASCredential`.\n *\n * @example\n * ```ts snippet:ReadmeSampleCreateClient_SASToken\n * import { AzureSASCredential } from \"@azure/core-auth\";\n * import MapsRender from \"@azure-rest/maps-render\";\n *\n * const credential = new AzureSASCredential(\"<SAS Token>\");\n * const client = MapsRender(credential);\n * ```\n *\n * @param credential - An AzureSASCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the Render Client\n */\nexport default function MapsRender(\n credential: AzureSASCredential,\n options?: ClientOptions,\n): MapsRenderClient;\nexport default function MapsRender(\n credential: TokenCredential | AzureKeyCredential | AzureSASCredential,\n clientIdOrOptions: string | ClientOptions = {},\n maybeOptions: ClientOptions = {},\n): MapsRenderClient {\n const options = typeof clientIdOrOptions === \"string\" ? maybeOptions : clientIdOrOptions;\n\n /**\n * maps service requires a header \"ms-x-client-id\", which is different from the standard Microsoft Entra ID.\n * So we need to do our own implementation.\n * This customized authentication is following by this guide: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md#custom-authentication\n */\n if (isTokenCredential(credential)) {\n const clientId = typeof clientIdOrOptions === \"string\" ? clientIdOrOptions : \"\";\n if (!clientId) {\n throw Error(\"Client id is needed for TokenCredential\");\n }\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: \"https://atlas.microsoft.com/.default\",\n }),\n );\n client.pipeline.addPolicy(createMapsClientIdPolicy(clientId));\n return client;\n }\n\n if (isSASCredential(credential)) {\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy({\n name: \"mapsSASCredentialPolicy\",\n async sendRequest(request, next) {\n request.headers.set(\"Authorization\", `jwt-sas ${credential.signature}`);\n return next(request);\n },\n });\n return client;\n }\n\n return createClient(credential, options);\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,47 @@
1
+ import type { LatLon } from "@azure/maps-common";
2
+ /**
3
+ * Calculates the XY tile coordinates that a coordinate falls into for a specific zoom level.
4
+ * Reference: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code
5
+ *
6
+ * @example
7
+ * ```ts snippet:ReadmeSampleRequestMapTiles
8
+ * import { DefaultAzureCredential } from "@azure/identity";
9
+ * import MapsRender, { positionToTileXY } from "@azure-rest/maps-render";
10
+ * import { createWriteStream } from "node:fs";
11
+ *
12
+ * const credential = new DefaultAzureCredential();
13
+ * const client = MapsRender(credential, "<maps-account-client-id>");
14
+ *
15
+ * const zoom = 6;
16
+ * // Use the helper function `positionToTileXY` to get the tile index from the coordinate.
17
+ * const { x, y } = positionToTileXY([47.61559, -122.33817], 6, "256");
18
+ * const response = await client
19
+ * .path("/map/tile")
20
+ * .get({
21
+ * queryParameters: {
22
+ * tilesetId: "microsoft.base.road",
23
+ * zoom,
24
+ * x,
25
+ * y,
26
+ * },
27
+ * })
28
+ * .asNodeStream();
29
+ *
30
+ * // Handle the error.
31
+ * if (!response.body) {
32
+ * throw Error("No response body");
33
+ * }
34
+ *
35
+ * response.body.pipe(createWriteStream("tile.png"));
36
+ * ```
37
+ *
38
+ * @param position - Position coordinate in the format [latitude, longitude].
39
+ * @param zoom - Zoom level.
40
+ * @param tileSize - The size of the tiles in the tile pyramid.
41
+ * @returns Tile XY coordinates.
42
+ */
43
+ export declare function positionToTileXY(position: LatLon, zoom: number, tileSize: "512" | "256"): {
44
+ x: number;
45
+ y: number;
46
+ };
47
+ //# sourceMappingURL=positionToTileXY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"positionToTileXY.d.ts","sourceRoot":"","sources":["../../src/positionToTileXY.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAUjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,KAAK,GAAG,KAAK,GACtB;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAgB1B"}
@@ -12,14 +12,35 @@ const MAX_LONGITUDE = 180;
12
12
  * Reference: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code
13
13
  *
14
14
  * @example
15
- * ```ts
15
+ * ```ts snippet:ReadmeSampleRequestMapTiles
16
+ * import { DefaultAzureCredential } from "@azure/identity";
17
+ * import MapsRender, { positionToTileXY } from "@azure-rest/maps-render";
18
+ * import { createWriteStream } from "node:fs";
19
+ *
20
+ * const credential = new DefaultAzureCredential();
21
+ * const client = MapsRender(credential, "<maps-account-client-id>");
22
+ *
16
23
  * const zoom = 6;
24
+ * // Use the helper function `positionToTileXY` to get the tile index from the coordinate.
17
25
  * const { x, y } = positionToTileXY([47.61559, -122.33817], 6, "256");
18
26
  * const response = await client
19
27
  * .path("/map/tile")
20
28
  * .get({
21
- * queryParameters: { tilesetId: "microsoft.base.road", zoom, x, y },
29
+ * queryParameters: {
30
+ * tilesetId: "microsoft.base.road",
31
+ * zoom,
32
+ * x,
33
+ * y,
34
+ * },
22
35
  * })
36
+ * .asNodeStream();
37
+ *
38
+ * // Handle the error.
39
+ * if (!response.body) {
40
+ * throw Error("No response body");
41
+ * }
42
+ *
43
+ * response.body.pipe(createWriteStream("tile.png"));
23
44
  * ```
24
45
  *
25
46
  * @param position - Position coordinate in the format [latitude, longitude].
@@ -0,0 +1 @@
1
+ {"version":3,"file":"positionToTileXY.js","sourceRoot":"","sources":["../../src/positionToTileXY.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,SAAS,IAAI,CAAC,CAAS,EAAE,QAAgB,EAAE,QAAgB;IACzD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,YAAY,GAAG,CAAC,WAAW,CAAC;AAClC,MAAM,YAAY,GAAG,WAAW,CAAC;AACjC,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC;AAC3B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,IAAY,EACZ,QAAuB;IAEvB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;IAElE,MAAM,CAAC,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IAClC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;IACzD,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;IAEhF,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,yKAAyK;IACzK,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAE7D,OAAO;QACL,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,GAAG,GAAG,EAAE,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;QACtE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,GAAG,GAAG,EAAE,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;KACvE,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { LatLon } from \"@azure/maps-common\";\n\nfunction clip(n: number, minValue: number, maxValue: number): number {\n return Math.min(Math.max(n, minValue), maxValue);\n}\n\nconst MIN_LATITUDE = -85.05112878;\nconst MAX_LATITUDE = 85.05112878;\nconst MIN_LONGITUDE = -180;\nconst MAX_LONGITUDE = 180;\n/**\n * Calculates the XY tile coordinates that a coordinate falls into for a specific zoom level.\n * Reference: https://learn.microsoft.com/en-us/azure/azure-maps/zoom-levels-and-tile-grid?tabs=typescript#tile-math-source-code\n *\n * @example\n * ```ts snippet:ReadmeSampleRequestMapTiles\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import MapsRender, { positionToTileXY } from \"@azure-rest/maps-render\";\n * import { createWriteStream } from \"node:fs\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = MapsRender(credential, \"<maps-account-client-id>\");\n *\n * const zoom = 6;\n * // Use the helper function `positionToTileXY` to get the tile index from the coordinate.\n * const { x, y } = positionToTileXY([47.61559, -122.33817], 6, \"256\");\n * const response = await client\n * .path(\"/map/tile\")\n * .get({\n * queryParameters: {\n * tilesetId: \"microsoft.base.road\",\n * zoom,\n * x,\n * y,\n * },\n * })\n * .asNodeStream();\n *\n * // Handle the error.\n * if (!response.body) {\n * throw Error(\"No response body\");\n * }\n *\n * response.body.pipe(createWriteStream(\"tile.png\"));\n * ```\n *\n * @param position - Position coordinate in the format [latitude, longitude].\n * @param zoom - Zoom level.\n * @param tileSize - The size of the tiles in the tile pyramid.\n * @returns Tile XY coordinates.\n */\nexport function positionToTileXY(\n position: LatLon,\n zoom: number,\n tileSize: \"512\" | \"256\",\n): { x: number; y: number } {\n const latitude = clip(position[0], MIN_LATITUDE, MAX_LATITUDE);\n const longitude = clip(position[1], MIN_LONGITUDE, MAX_LONGITUDE);\n\n const x = (longitude + 180) / 360;\n const sinLatitude = Math.sin((latitude * Math.PI) / 180);\n const y = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);\n\n const tileSizeInNum = parseInt(tileSize);\n // tileSize needed in calculations as in rare cases the multiplying/rounding/dividing can make the difference of a pixel which can result in a completely different tile.\n const mapSize = Math.ceil(tileSizeInNum * Math.pow(2, zoom));\n\n return {\n x: Math.floor(clip(x * mapSize + 0.5, 0, mapSize - 1) / tileSizeInNum),\n y: Math.floor(clip(y * mapSize + 0.5, 0, mapSize - 1) / tileSizeInNum),\n };\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ * Workaround to create a path query string for [ collectionFormat: multi ](https://swagger.io/docs/specification/2-0/describing-parameters/#:~:text=csv%20(-,default,-)).
4
+ * This should be removed once the core-client support collectionFormat: multi.
5
+ */
6
+ export declare function createMultiCollection(key: string, values: string[]): string;
7
+ //# sourceMappingURL=createMultiCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMultiCollection.d.ts","sourceRoot":"","sources":["../../src/createMultiCollection.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAI3E"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createMultiCollection = createMultiCollection;
6
+ /**
7
+ * @internal
8
+ * Workaround to create a path query string for [ collectionFormat: multi ](https://swagger.io/docs/specification/2-0/describing-parameters/#:~:text=csv%20(-,default,-)).
9
+ * This should be removed once the core-client support collectionFormat: multi.
10
+ */
11
+ function createMultiCollection(key, values) {
12
+ return values.slice(1).reduce((acc, value) => {
13
+ return `${acc}&${key}=${value}`;
14
+ }, values[0] || "");
15
+ }
16
+ //# sourceMappingURL=createMultiCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMultiCollection.js","sourceRoot":"","sources":["../../src/createMultiCollection.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,sDAIC;AATD;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,GAAW,EAAE,MAAgB;IACjE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAC3C,OAAO,GAAG,GAAG,IAAI,GAAG,IAAI,KAAK,EAAE,CAAC;IAClC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * @internal\n * Workaround to create a path query string for [ collectionFormat: multi ](https://swagger.io/docs/specification/2-0/describing-parameters/#:~:text=csv%20(-,default,-)).\n * This should be removed once the core-client support collectionFormat: multi.\n */\nexport function createMultiCollection(key: string, values: string[]): string {\n return values.slice(1).reduce((acc, value) => {\n return `${acc}&${key}=${value}`;\n }, values[0] || \"\");\n}\n"]}