@itwin/map-layers-formats 5.0.0-dev.1 → 5.0.0-dev.100

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 (211) hide show
  1. package/CHANGELOG.md +73 -1
  2. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +3 -3
  3. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  4. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +4 -4
  5. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  6. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +70 -67
  7. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  8. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +17 -0
  9. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  10. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +2 -2
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
  12. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +4 -2
  13. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  14. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.d.ts +1 -1
  15. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.d.ts.map +1 -1
  16. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js +7 -4
  17. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
  18. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +2 -2
  19. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -1
  20. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js +3 -2
  21. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -1
  22. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +5 -5
  23. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -1
  24. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js +20 -20
  25. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -1
  26. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +3 -3
  27. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  28. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +37 -32
  29. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  30. package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts +1 -1
  31. package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts.map +1 -1
  32. package/lib/cjs/ArcGisFeature/EsriSymbology.js +28 -7
  33. package/lib/cjs/ArcGisFeature/EsriSymbology.js.map +1 -1
  34. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js +48 -72
  35. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  36. package/lib/cjs/Feature/DefaultMarkerIcon.js +9 -9
  37. package/lib/cjs/Feature/DefaultMarkerIcon.js.map +1 -1
  38. package/lib/cjs/Feature/FeatureCanvasRenderer.d.ts +2 -2
  39. package/lib/cjs/Feature/FeatureCanvasRenderer.d.ts.map +1 -1
  40. package/lib/cjs/Feature/FeatureCanvasRenderer.js +2 -0
  41. package/lib/cjs/Feature/FeatureCanvasRenderer.js.map +1 -1
  42. package/lib/cjs/Feature/FeatureInfoReader.js +20 -20
  43. package/lib/cjs/Feature/FeatureInfoReader.js.map +1 -1
  44. package/lib/cjs/Feature/FeatureSymbology.js.map +1 -1
  45. package/lib/cjs/Feature/RandomMapColor.js +10 -10
  46. package/lib/cjs/Feature/RandomMapColor.js.map +1 -1
  47. package/lib/cjs/GeoJSON/GeoJSONGeometry.d.ts +1 -1
  48. package/lib/cjs/GeoJSON/GeoJSONGeometry.d.ts.map +1 -1
  49. package/lib/cjs/GeoJSON/GeoJSONGeometry.js.map +1 -1
  50. package/lib/cjs/GeoJSON/GeoJSONGeometryReader.d.ts +1 -1
  51. package/lib/cjs/GeoJSON/GeoJSONGeometryReader.d.ts.map +1 -1
  52. package/lib/cjs/GeoJSON/GeoJSONGeometryReader.js +5 -4
  53. package/lib/cjs/GeoJSON/GeoJSONGeometryReader.js.map +1 -1
  54. package/lib/cjs/GoogleMaps/GoogleMapDecorator.d.ts +36 -0
  55. package/lib/cjs/GoogleMaps/GoogleMapDecorator.d.ts.map +1 -0
  56. package/lib/cjs/GoogleMaps/GoogleMapDecorator.js +87 -0
  57. package/lib/cjs/GoogleMaps/GoogleMapDecorator.js.map +1 -0
  58. package/lib/cjs/GoogleMaps/GoogleMaps.d.ts +166 -0
  59. package/lib/cjs/GoogleMaps/GoogleMaps.d.ts.map +1 -0
  60. package/lib/cjs/GoogleMaps/GoogleMaps.js +56 -0
  61. package/lib/cjs/GoogleMaps/GoogleMaps.js.map +1 -0
  62. package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.d.ts +10 -0
  63. package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.d.ts.map +1 -0
  64. package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.js +20 -0
  65. package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.js.map +1 -0
  66. package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.d.ts +25 -0
  67. package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.d.ts.map +1 -0
  68. package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.js +232 -0
  69. package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.js.map +1 -0
  70. package/lib/cjs/Icons/MapInfoIcon.js.map +1 -1
  71. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.js +3 -3
  72. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -1
  73. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.d.ts +4 -4
  74. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.d.ts.map +1 -1
  75. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.js +58 -51
  76. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -1
  77. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.d.ts +3 -3
  78. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.d.ts.map +1 -1
  79. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.js +6 -5
  80. package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.js.map +1 -1
  81. package/lib/cjs/Tools/GeometryTerrainDraper.d.ts +1 -1
  82. package/lib/cjs/Tools/GeometryTerrainDraper.d.ts.map +1 -1
  83. package/lib/cjs/Tools/GeometryTerrainDraper.js +13 -9
  84. package/lib/cjs/Tools/GeometryTerrainDraper.js.map +1 -1
  85. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts +1 -1
  86. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts.map +1 -1
  87. package/lib/cjs/Tools/MapFeatureInfoDecorator.js +60 -56
  88. package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -1
  89. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts +1 -1
  90. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts.map +1 -1
  91. package/lib/cjs/Tools/MapFeatureInfoTool.js +16 -19
  92. package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -1
  93. package/lib/cjs/internal/GoogleMapsUtils.d.ts +38 -0
  94. package/lib/cjs/internal/GoogleMapsUtils.d.ts.map +1 -0
  95. package/lib/cjs/internal/GoogleMapsUtils.js +104 -0
  96. package/lib/cjs/internal/GoogleMapsUtils.js.map +1 -0
  97. package/lib/cjs/map-layers-formats.d.ts +4 -3
  98. package/lib/cjs/map-layers-formats.d.ts.map +1 -1
  99. package/lib/cjs/map-layers-formats.js +4 -3
  100. package/lib/cjs/map-layers-formats.js.map +1 -1
  101. package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
  102. package/lib/cjs/mapLayersFormats.js +10 -7
  103. package/lib/cjs/mapLayersFormats.js.map +1 -1
  104. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +2 -2
  105. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  106. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +4 -4
  107. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  108. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +52 -49
  109. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  110. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +17 -0
  111. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  112. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +2 -2
  113. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
  114. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +3 -1
  115. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  116. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.d.ts +1 -1
  117. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.d.ts.map +1 -1
  118. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js +5 -2
  119. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
  120. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +2 -2
  121. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -1
  122. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js +2 -1
  123. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -1
  124. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +5 -5
  125. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -1
  126. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js +2 -2
  127. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -1
  128. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +3 -3
  129. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  130. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +37 -32
  131. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  132. package/lib/esm/ArcGisFeature/EsriSymbology.d.ts +1 -1
  133. package/lib/esm/ArcGisFeature/EsriSymbology.d.ts.map +1 -1
  134. package/lib/esm/ArcGisFeature/EsriSymbology.js +27 -6
  135. package/lib/esm/ArcGisFeature/EsriSymbology.js.map +1 -1
  136. package/lib/esm/ArcGisFeature/esriPBuffer.gen.js +48 -72
  137. package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  138. package/lib/esm/Feature/DefaultMarkerIcon.js +9 -9
  139. package/lib/esm/Feature/DefaultMarkerIcon.js.map +1 -1
  140. package/lib/esm/Feature/FeatureCanvasRenderer.d.ts +2 -2
  141. package/lib/esm/Feature/FeatureCanvasRenderer.d.ts.map +1 -1
  142. package/lib/esm/Feature/FeatureCanvasRenderer.js +2 -0
  143. package/lib/esm/Feature/FeatureCanvasRenderer.js.map +1 -1
  144. package/lib/esm/Feature/FeatureInfoReader.js +20 -20
  145. package/lib/esm/Feature/FeatureInfoReader.js.map +1 -1
  146. package/lib/esm/Feature/FeatureSymbology.js.map +1 -1
  147. package/lib/esm/Feature/RandomMapColor.js +10 -10
  148. package/lib/esm/Feature/RandomMapColor.js.map +1 -1
  149. package/lib/esm/GeoJSON/GeoJSONGeometry.d.ts +1 -1
  150. package/lib/esm/GeoJSON/GeoJSONGeometry.d.ts.map +1 -1
  151. package/lib/esm/GeoJSON/GeoJSONGeometry.js.map +1 -1
  152. package/lib/esm/GeoJSON/GeoJSONGeometryReader.d.ts +1 -1
  153. package/lib/esm/GeoJSON/GeoJSONGeometryReader.d.ts.map +1 -1
  154. package/lib/esm/GeoJSON/GeoJSONGeometryReader.js +2 -1
  155. package/lib/esm/GeoJSON/GeoJSONGeometryReader.js.map +1 -1
  156. package/lib/esm/GoogleMaps/GoogleMapDecorator.d.ts +36 -0
  157. package/lib/esm/GoogleMaps/GoogleMapDecorator.d.ts.map +1 -0
  158. package/lib/esm/GoogleMaps/GoogleMapDecorator.js +82 -0
  159. package/lib/esm/GoogleMaps/GoogleMapDecorator.js.map +1 -0
  160. package/lib/esm/GoogleMaps/GoogleMaps.d.ts +166 -0
  161. package/lib/esm/GoogleMaps/GoogleMaps.d.ts.map +1 -0
  162. package/lib/esm/GoogleMaps/GoogleMaps.js +53 -0
  163. package/lib/esm/GoogleMaps/GoogleMaps.js.map +1 -0
  164. package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.d.ts +10 -0
  165. package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.d.ts.map +1 -0
  166. package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.js +16 -0
  167. package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.js.map +1 -0
  168. package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.d.ts +25 -0
  169. package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.d.ts.map +1 -0
  170. package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.js +228 -0
  171. package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.js.map +1 -0
  172. package/lib/esm/Icons/MapInfoIcon.js.map +1 -1
  173. package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.js +2 -2
  174. package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -1
  175. package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.d.ts +4 -4
  176. package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.d.ts.map +1 -1
  177. package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.js +49 -42
  178. package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -1
  179. package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.d.ts +3 -3
  180. package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.d.ts.map +1 -1
  181. package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.js +3 -2
  182. package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.js.map +1 -1
  183. package/lib/esm/Tools/GeometryTerrainDraper.d.ts +1 -1
  184. package/lib/esm/Tools/GeometryTerrainDraper.d.ts.map +1 -1
  185. package/lib/esm/Tools/GeometryTerrainDraper.js +11 -7
  186. package/lib/esm/Tools/GeometryTerrainDraper.js.map +1 -1
  187. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts +1 -1
  188. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts.map +1 -1
  189. package/lib/esm/Tools/MapFeatureInfoDecorator.js +58 -54
  190. package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -1
  191. package/lib/esm/Tools/MapFeatureInfoTool.d.ts +1 -1
  192. package/lib/esm/Tools/MapFeatureInfoTool.d.ts.map +1 -1
  193. package/lib/esm/Tools/MapFeatureInfoTool.js +16 -19
  194. package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -1
  195. package/lib/esm/internal/GoogleMapsUtils.d.ts +38 -0
  196. package/lib/esm/internal/GoogleMapsUtils.d.ts.map +1 -0
  197. package/lib/esm/internal/GoogleMapsUtils.js +101 -0
  198. package/lib/esm/internal/GoogleMapsUtils.js.map +1 -0
  199. package/lib/esm/map-layers-formats.d.ts +4 -3
  200. package/lib/esm/map-layers-formats.d.ts.map +1 -1
  201. package/lib/esm/map-layers-formats.js +4 -3
  202. package/lib/esm/map-layers-formats.js.map +1 -1
  203. package/lib/esm/mapLayersFormats.d.ts.map +1 -1
  204. package/lib/esm/mapLayersFormats.js +7 -4
  205. package/lib/esm/mapLayersFormats.js.map +1 -1
  206. package/lib/public/images/google_on_non_white.png +0 -0
  207. package/lib/public/images/google_on_non_white_hdpi.png +0 -0
  208. package/lib/public/images/google_on_white.png +0 -0
  209. package/lib/public/images/google_on_white_hdpi.png +0 -0
  210. package/lib/public/locales/en/mapLayersFormats.json +18 -18
  211. package/package.json +32 -28
@@ -9,15 +9,15 @@ const core_common_1 = require("@itwin/core-common");
9
9
  /** @internal */
10
10
  class DefaultMarkerIcon {
11
11
  static getSvgContent(color = core_common_1.ColorDef.fromString("#00AEEF")) {
12
- return `<?xml version="1.0" encoding="utf-8"?>
13
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
14
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
15
- viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">
16
- <g>
17
- <path fill="${color.toHexString()}" d="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9
18
- C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8
19
- c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>
20
- </g>
12
+ return `<?xml version="1.0" encoding="utf-8"?>
13
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
14
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
15
+ viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">
16
+ <g>
17
+ <path fill="${color.toHexString()}" d="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9
18
+ C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8
19
+ c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>
20
+ </g>
21
21
  </svg>`;
22
22
  }
23
23
  static getContent(color) {
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultMarkerIcon.js","sourceRoot":"","sources":["../../../src/Feature/DefaultMarkerIcon.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAAmE;AAEnE,gBAAgB;AAChB,MAAa,iBAAiB;IACpB,MAAM,CAAC,aAAa,CAAC,QAAkB,sBAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAC3E,OAAO;;;;;oBAKS,KAAK,CAAC,WAAW,EAAE;;;;WAI5B,CAAC;IACV,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,KAAgB;QACvC,OAAO;YACL,WAAW,EAAE,eAAe;YAC5B,SAAS,EAAE,iCAAmB,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAC9E,CAAC;IACJ,CAAC;CACF;AApBD,8CAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\r\n\r\n/** @internal */\r\nexport class DefaultMarkerIcon {\r\n private static getSvgContent(color: ColorDef = ColorDef.fromString(\"#00AEEF\")) {\r\n return `<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n <!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n <svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\r\n viewBox=\"0 0 365 560\" enable-background=\"new 0 0 365 560\" xml:space=\"preserve\">\r\n <g>\r\n <path fill=\"${color.toHexString()}\" d=\"M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9\r\n C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8\r\n c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z\"/>\r\n </g>\r\n </svg>`;\r\n }\r\n\r\n public static getContent(color?: ColorDef) {\r\n return {\r\n contentType: \"image/svg+xml\",\r\n imageData: Base64EncodedString.encode(DefaultMarkerIcon.getSvgContent(color)),\r\n };\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"DefaultMarkerIcon.js","sourceRoot":"","sources":["../../../src/Feature/DefaultMarkerIcon.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAAmE;AAEnE,gBAAgB;AAChB,MAAa,iBAAiB;IACpB,MAAM,CAAC,aAAa,CAAC,QAAkB,sBAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAC3E,OAAO;;;;;oBAKS,KAAK,CAAC,WAAW,EAAE;;;;WAI5B,CAAC;IACV,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,KAAgB;QACvC,OAAO;YACL,WAAW,EAAE,eAAe;YAC5B,SAAS,EAAE,iCAAmB,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAC9E,CAAC;IACJ,CAAC;CACF;AApBD,8CAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\n\n/** @internal */\nexport class DefaultMarkerIcon {\n private static getSvgContent(color: ColorDef = ColorDef.fromString(\"#00AEEF\")) {\n return `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n <!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n <svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 365 560\" enable-background=\"new 0 0 365 560\" xml:space=\"preserve\">\n <g>\n <path fill=\"${color.toHexString()}\" d=\"M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9\n C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8\n c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z\"/>\n </g>\n </svg>`;\n }\n\n public static getContent(color?: ColorDef) {\n return {\n contentType: \"image/svg+xml\",\n imageData: Base64EncodedString.encode(DefaultMarkerIcon.getSvgContent(color)),\n };\n }\n}\n\n"]}
@@ -1,6 +1,6 @@
1
- import { Transform } from "@itwin/core-geometry";
2
1
  import { FeatureGeometryBaseRenderer, FeatureSymbolizedRenderer, FeatureSymbologyRenderer } from "@itwin/core-frontend";
3
- import { ArcGisSymbologyCanvasRenderer } from "../ArcGisFeature/ArcGisSymbologyRenderer";
2
+ import { Transform } from "@itwin/core-geometry";
3
+ import { ArcGisSymbologyCanvasRenderer } from "../ArcGisFeature/ArcGisSymbologyRenderer.js";
4
4
  /** @internal */
5
5
  export declare class FeatureCanvasRenderer extends FeatureGeometryBaseRenderer implements FeatureSymbolizedRenderer {
6
6
  private _context;
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/Feature/FeatureCanvasRenderer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACxH,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAEzF,gBAAgB;AAChB,qBAAa,qBAAsB,SAAQ,2BAA4B,YAAW,yBAAyB;IACzG,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,OAAO,CAAgC;IAE/C,IAAY,cAAc,IAAI,wBAAwB,CAErD;IACe,oBAAoB,IAAI,IAAI,IAAI,yBAAyB;gBAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,6BAA6B,EAAE,oBAAoB,CAAC,EAAE,SAAS;IAMtH,SAAS,CAAC,SAAS;IAInB,SAAS,CAAC,SAAS;IAInB,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAIrC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;cAIrB,IAAI;cAKJ,MAAM;cAKN,YAAY;cAGZ,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;CAG/C"}
1
+ {"version":3,"file":"FeatureCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/Feature/FeatureCanvasRenderer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,gBAAgB;AAChB,qBAAa,qBAAsB,SAAQ,2BAA4B,YAAW,yBAAyB;IACzG,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,OAAO,CAAgC;IAE/C,IAAY,cAAc,IAAI,wBAAwB,CAErD;IACe,oBAAoB,IAAI,IAAI,IAAI,yBAAyB;gBAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,6BAA6B,EAAE,oBAAoB,CAAC,EAAE,SAAS;IAMtH,SAAS,CAAC,SAAS;IAInB,SAAS,CAAC,SAAS;IAInB,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAIrC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;cAIrB,IAAI;cAKJ,MAAM;cAKN,YAAY;cAGZ,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;CAG/C"}
@@ -8,6 +8,8 @@ exports.FeatureCanvasRenderer = void 0;
8
8
  const core_frontend_1 = require("@itwin/core-frontend");
9
9
  /** @internal */
10
10
  class FeatureCanvasRenderer extends core_frontend_1.FeatureGeometryBaseRenderer {
11
+ _context;
12
+ _symbol;
11
13
  get symbolRenderer() {
12
14
  return this._symbol;
13
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureCanvasRenderer.js","sourceRoot":"","sources":["../../../src/Feature/FeatureCanvasRenderer.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,wDAAwH;AAGxH,gBAAgB;AAChB,MAAa,qBAAsB,SAAQ,2CAA2B;IAIpE,IAAY,cAAc;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACe,oBAAoB,KAAuC,OAAO,IAAI,CAAC,CAAA,CAAC;IAExF,YAAY,OAAiC,EAAE,MAAqC,EAAE,oBAAgC;QACpH,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAES,MAAM,CAAC,CAAS,EAAE,CAAS;QACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC;IAES,MAAM,CAAC,CAAS,EAAE,CAAS;QACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC;IAES,KAAK,CAAC,IAAI;QAClB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAES,KAAK,CAAC,MAAM;QACpB,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAES,KAAK,CAAC,YAAY;IAC5B,CAAC;IAES,KAAK,CAAC,SAAS,CAAC,CAAS,EAAE,CAAS;QAC5C,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF;AA/CD,sDA+CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Transform } from \"@itwin/core-geometry\";\r\nimport { FeatureGeometryBaseRenderer, FeatureSymbolizedRenderer, FeatureSymbologyRenderer } from \"@itwin/core-frontend\";\r\nimport { ArcGisSymbologyCanvasRenderer } from \"../ArcGisFeature/ArcGisSymbologyRenderer\";\r\n\r\n/** @internal */\r\nexport class FeatureCanvasRenderer extends FeatureGeometryBaseRenderer implements FeatureSymbolizedRenderer {\r\n private _context: CanvasRenderingContext2D;\r\n private _symbol: ArcGisSymbologyCanvasRenderer;\r\n\r\n public get symbolRenderer(): FeatureSymbologyRenderer {\r\n return this._symbol;\r\n }\r\n public override hasSymbologyRenderer(): this is FeatureSymbolizedRenderer {return true;}\r\n\r\n constructor(context: CanvasRenderingContext2D, symbol: ArcGisSymbologyCanvasRenderer, world2PixelTransform?: Transform) {\r\n super(world2PixelTransform);\r\n this._symbol = symbol;\r\n this._context = context;\r\n }\r\n\r\n protected beginPath() {\r\n this._context.beginPath();\r\n }\r\n\r\n protected closePath() {\r\n this._context.closePath();\r\n }\r\n\r\n protected lineTo(x: number, y: number) {\r\n this._context.lineTo(x, y);\r\n }\r\n\r\n protected moveTo(x: number, y: number) {\r\n this._context.moveTo(x, y);\r\n }\r\n\r\n protected async fill() {\r\n this._symbol.applyFillStyle(this._context);\r\n this._context.fill();\r\n }\r\n\r\n protected async stroke() {\r\n this._symbol.applyStrokeStyle(this._context);\r\n this._context.stroke();\r\n }\r\n\r\n protected async finishPoints() {\r\n }\r\n\r\n protected async drawPoint(x: number, y: number) {\r\n this._symbol.drawPoint(this._context, x, y);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureCanvasRenderer.js","sourceRoot":"","sources":["../../../src/Feature/FeatureCanvasRenderer.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,wDAAwH;AAIxH,gBAAgB;AAChB,MAAa,qBAAsB,SAAQ,2CAA2B;IAC5D,QAAQ,CAA2B;IACnC,OAAO,CAAgC;IAE/C,IA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------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { FeatureGeometryBaseRenderer, FeatureSymbolizedRenderer, FeatureSymbologyRenderer } from \"@itwin/core-frontend\";\nimport { Transform } from \"@itwin/core-geometry\";\nimport { ArcGisSymbologyCanvasRenderer } from \"../ArcGisFeature/ArcGisSymbologyRenderer.js\";\n\n/** @internal */\nexport class FeatureCanvasRenderer extends FeatureGeometryBaseRenderer implements FeatureSymbolizedRenderer {\n private _context: CanvasRenderingContext2D;\n private _symbol: ArcGisSymbologyCanvasRenderer;\n\n public get symbolRenderer(): FeatureSymbologyRenderer {\n return this._symbol;\n }\n public override hasSymbologyRenderer(): this is FeatureSymbolizedRenderer {return true;}\n\n constructor(context: CanvasRenderingContext2D, symbol: ArcGisSymbologyCanvasRenderer, world2PixelTransform?: Transform) {\n super(world2PixelTransform);\n this._symbol = symbol;\n this._context = context;\n }\n\n protected beginPath() {\n this._context.beginPath();\n }\n\n protected closePath() {\n this._context.closePath();\n }\n\n protected lineTo(x: number, y: number) {\n this._context.lineTo(x, y);\n }\n\n protected moveTo(x: number, y: number) {\n this._context.moveTo(x, y);\n }\n\n protected async fill() {\n this._symbol.applyFillStyle(this._context);\n this._context.fill();\n }\n\n protected async stroke() {\n this._symbol.applyStrokeStyle(this._context);\n this._context.stroke();\n }\n\n protected async finishPoints() {\n }\n\n protected async drawPoint(x: number, y: number) {\n this._symbol.drawPoint(this._context, x, y);\n }\n}\n"]}
@@ -10,26 +10,26 @@ const appui_abstract_1 = require("@itwin/appui-abstract");
10
10
  * @internal
11
11
  */
12
12
  class FeatureInfoReader {
13
- constructor() {
14
- // Force display value of date to ISO 8601 format.
15
- // Turning this ON, will disable display value in end-user's locale
16
- this.forceDateDisplayValueToIso = false;
17
- this.toFixedWithoutPadding = (value) => {
18
- return (this.floatPrecision === undefined ? value : parseFloat(value.toFixed(this.floatPrecision)));
19
- };
20
- this.getDisplayValue = (typename, value) => {
21
- if (value === undefined) {
22
- return "";
23
- }
24
- else if (typename === appui_abstract_1.StandardTypeNames.DateTime && this.forceDateDisplayValueToIso) {
25
- return value.toISOString();
26
- }
27
- else {
28
- // eslint-disable-next-line @typescript-eslint/no-base-to-string
29
- return `${value}`;
30
- }
31
- };
32
- }
13
+ // Optionally you can set the floating precision
14
+ floatPrecision;
15
+ // Force display value of date to ISO 8601 format.
16
+ // Turning this ON, will disable display value in end-user's locale
17
+ forceDateDisplayValueToIso = false;
18
+ toFixedWithoutPadding = (value) => {
19
+ return (this.floatPrecision === undefined ? value : parseFloat(value.toFixed(this.floatPrecision)));
20
+ };
21
+ getDisplayValue = (typename, value) => {
22
+ if (value === undefined) {
23
+ return "";
24
+ }
25
+ else if (typename === appui_abstract_1.StandardTypeNames.DateTime && this.forceDateDisplayValueToIso) {
26
+ return value.toISOString();
27
+ }
28
+ else {
29
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
30
+ return `${value}`;
31
+ }
32
+ };
33
33
  }
34
34
  exports.FeatureInfoReader = FeatureInfoReader;
35
35
  //# sourceMappingURL=FeatureInfoReader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureInfoReader.js","sourceRoot":"","sources":["../../../src/Feature/FeatureInfoReader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,0DAAsE;AAEtE;;GAEG;AACH,MAAsB,iBAAiB;IAAvC;QAKE,kDAAkD;QAClD,mEAAmE;QAC5D,+BAA0B,GAAG,KAAK,CAAC;QAEhC,0BAAqB,GAAG,CAAC,KAAa,EAAE,EAAE;YAClD,OAAO,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QACtG,CAAC,CAAC;QAEQ,oBAAe,GAAG,CAAC,QAA2B,EAAE,KAAiC,EAAE,EAAE;YAC7F,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAQ,EAAE,CAAC;YACb,CAAC;iBAAM,IAAK,QAAQ,KAAK,kCAAiB,CAAC,QAAQ,IAAI,IAAI,CAAC,0BAA0B,EAAE,CAAC;gBACvF,OAAQ,KAAc,CAAC,WAAW,EAAE,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,gEAAgE;gBAChE,OAAO,GAAG,KAAK,EAAE,CAAC;YACpB,CAAC;QACH,CAAC,CAAC;IAEJ,CAAC;CAAA;AAxBD,8CAwBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Primitives, StandardTypeNames } from \"@itwin/appui-abstract\";\r\n\r\n/** Base feature infos reader\r\n * @internal\r\n */\r\nexport abstract class FeatureInfoReader {\r\n\r\n // Optionally you can set the floating precision\r\n public floatPrecision: number|undefined;\r\n\r\n // Force display value of date to ISO 8601 format.\r\n // Turning this ON, will disable display value in end-user's locale\r\n public forceDateDisplayValueToIso = false;\r\n\r\n protected toFixedWithoutPadding = (value: number) => {\r\n return (this.floatPrecision === undefined ? value : parseFloat(value.toFixed(this.floatPrecision)));\r\n };\r\n\r\n protected getDisplayValue = (typename: StandardTypeNames, value: Primitives.Value|undefined) => {\r\n if (value === undefined) {\r\n return \"\";\r\n } else if ( typename === StandardTypeNames.DateTime && this.forceDateDisplayValueToIso) {\r\n return (value as Date).toISOString();\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n return `${value}`;\r\n }\r\n };\r\n\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureInfoReader.js","sourceRoot":"","sources":["../../../src/Feature/FeatureInfoReader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,0DAAsE;AAEtE;;GAEG;AACH,MAAsB,iBAAiB;IAErC,gDAAgD;IACzC,cAAc,CAAmB;IAExC,kDAAkD;IAClD,mEAAmE;IAC5D,0BAA0B,GAAG,KAAK,CAAC;IAEhC,qBAAqB,GAAG,CAAC,KAAa,EAAE,EAAE;QAClD,OAAO,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC;IAEQ,eAAe,GAAG,CAAC,QAA2B,EAAE,KAAiC,EAAE,EAAE;QAC7F,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAQ,EAAE,CAAC;QACb,CAAC;aAAM,IAAK,QAAQ,KAAK,kCAAiB,CAAC,QAAQ,IAAI,IAAI,CAAC,0BAA0B,EAAE,CAAC;YACvF,OAAQ,KAAc,CAAC,WAAW,EAAE,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,gEAAgE;YAChE,OAAO,GAAG,KAAK,EAAE,CAAC;QACpB,CAAC;IACH,CAAC,CAAC;CAEH;AAxBD,8CAwBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { Primitives, StandardTypeNames } from \"@itwin/appui-abstract\";\n\n/** Base feature infos reader\n * @internal\n */\nexport abstract class FeatureInfoReader {\n\n // Optionally you can set the floating precision\n public floatPrecision: number|undefined;\n\n // Force display value of date to ISO 8601 format.\n // Turning this ON, will disable display value in end-user's locale\n public forceDateDisplayValueToIso = false;\n\n protected toFixedWithoutPadding = (value: number) => {\n return (this.floatPrecision === undefined ? value : parseFloat(value.toFixed(this.floatPrecision)));\n };\n\n protected getDisplayValue = (typename: StandardTypeNames, value: Primitives.Value|undefined) => {\n if (value === undefined) {\n return \"\";\n } else if ( typename === StandardTypeNames.DateTime && this.forceDateDisplayValueToIso) {\n return (value as Date).toISOString();\n } else {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return `${value}`;\n }\n };\n\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../../src/Feature/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,gBAAgB;AAChB,MAAsB,gBAAgB;CAErC;AAFD,4CAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @internal */\r\nexport abstract class FeatureSymbology {\r\n\r\n}\r\n\r\n/** @internal */\r\nexport interface FeatureDefaultSymbology {\r\n getSymbology: (geometryType: string) => FeatureSymbology;\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../../src/Feature/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,gBAAgB;AAChB,MAAsB,gBAAgB;CAErC;AAFD,4CAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @internal */\nexport abstract class FeatureSymbology {\n\n}\n\n/** @internal */\nexport interface FeatureDefaultSymbology {\n getSymbology: (geometryType: string) => FeatureSymbology;\n}\n"]}
@@ -8,6 +8,16 @@ exports.RandomMapColor = void 0;
8
8
  const core_common_1 = require("@itwin/core-common");
9
9
  /** @internal */
10
10
  class RandomMapColor {
11
+ static randomColorPalette = [
12
+ "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e",
13
+ "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac",
14
+ "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4",
15
+ "#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31c2c", "#fdbf6f", "#ff7f00", "#cab2d6",
16
+ "#fbb4ae", "#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff2000", "#ffff33", "#a65628", "#999999",
17
+ "#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#ffa07a",
18
+ "#b15928", "#6a3d9a", "#ffed6f", "#9e0142", "#5e4fa2", "#999900", "#1a9850", "#4d4d4d", "#6baed6",
19
+ "#71c671", "#388e8e", "#7d9ec0", "#7171c6", "#8e388e", "#8e8e38", "#00c957", "#cc3333", "#d1dbdd",
20
+ ];
11
21
  getColor() {
12
22
  return RandomMapColor.randomColorPalette[Math.floor(Math.random() * RandomMapColor.randomColorPalette.length)];
13
23
  }
@@ -16,14 +26,4 @@ class RandomMapColor {
16
26
  }
17
27
  }
18
28
  exports.RandomMapColor = RandomMapColor;
19
- RandomMapColor.randomColorPalette = [
20
- "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e",
21
- "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac",
22
- "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4",
23
- "#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31c2c", "#fdbf6f", "#ff7f00", "#cab2d6",
24
- "#fbb4ae", "#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff2000", "#ffff33", "#a65628", "#999999",
25
- "#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#ffa07a",
26
- "#b15928", "#6a3d9a", "#ffed6f", "#9e0142", "#5e4fa2", "#999900", "#1a9850", "#4d4d4d", "#6baed6",
27
- "#71c671", "#388e8e", "#7d9ec0", "#7171c6", "#8e388e", "#8e8e38", "#00c957", "#cc3333", "#d1dbdd",
28
- ];
29
29
  //# sourceMappingURL=RandomMapColor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RandomMapColor.js","sourceRoot":"","sources":["../../../src/Feature/RandomMapColor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAA8C;AAE9C,gBAAgB;AAChB,MAAa,cAAc;IAYlB,QAAQ;QACb,OAAO,cAAc,CAAC,kBAAkB,CAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClH,CAAC;IAEM,WAAW;QAChB,OAAO,sBAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;;AAlBH,wCAmBC;AAlByB,iCAAkB,GAAG;IAC3C,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;IACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;IACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;IACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;IACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;IACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;IACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;IACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;CAClG,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { ColorDef } from \"@itwin/core-common\";\r\n\r\n/** @internal */\r\nexport class RandomMapColor {\r\n private static readonly randomColorPalette = [\r\n \"#8c510a\", \"#bf812d\", \"#dfc27d\", \"#f6e8c3\", \"#f5f5f5\", \"#c7eae5\", \"#80cdc1\", \"#35978f\", \"#01665e\",\r\n \"#b2182b\", \"#d6604d\", \"#f4a582\", \"#fddbc7\", \"#f7f7f7\", \"#d1e5f0\", \"#92c5de\", \"#4393c3\", \"#2166ac\",\r\n \"#d73027\", \"#f46d43\", \"#fdae61\", \"#fee090\", \"#ffffbf\", \"#e0f3f8\", \"#abd9e9\", \"#74add1\", \"#4575b4\",\r\n \"#a6cee3\", \"#1f78b4\", \"#b2df8a\", \"#33a02c\", \"#fb9a99\", \"#e31c2c\", \"#fdbf6f\", \"#ff7f00\", \"#cab2d6\",\r\n \"#fbb4ae\", \"#e41a1c\", \"#377eb8\", \"#4daf4a\", \"#984ea3\", \"#ff2000\", \"#ffff33\", \"#a65628\", \"#999999\",\r\n \"#8dd3c7\", \"#ffffb3\", \"#bebada\", \"#fb8072\", \"#80b1d3\", \"#fdb462\", \"#b3de69\", \"#fccde5\", \"#ffa07a\",\r\n \"#b15928\", \"#6a3d9a\", \"#ffed6f\", \"#9e0142\", \"#5e4fa2\", \"#999900\", \"#1a9850\", \"#4d4d4d\", \"#6baed6\",\r\n \"#71c671\", \"#388e8e\", \"#7d9ec0\", \"#7171c6\", \"#8e388e\", \"#8e8e38\", \"#00c957\", \"#cc3333\", \"#d1dbdd\",\r\n ];\r\n\r\n public getColor() {\r\n return RandomMapColor.randomColorPalette[ Math.floor(Math.random() * RandomMapColor.randomColorPalette.length)];\r\n }\r\n\r\n public getColorDef() {\r\n return ColorDef.fromString(this.getColor());\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"RandomMapColor.js","sourceRoot":"","sources":["../../../src/Feature/RandomMapColor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAA8C;AAE9C,gBAAgB;AAChB,MAAa,cAAc;IACjB,MAAM,CAAU,kBAAkB,GAAG;QAC3C,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;KAClG,CAAC;IAEK,QAAQ;QACb,OAAO,cAAc,CAAC,kBAAkB,CAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClH,CAAC;IAEM,WAAW;QAChB,OAAO,sBAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;;AAlBH,wCAmBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ColorDef } from \"@itwin/core-common\";\n\n/** @internal */\nexport class RandomMapColor {\n private static readonly randomColorPalette = [\n \"#8c510a\", \"#bf812d\", \"#dfc27d\", \"#f6e8c3\", \"#f5f5f5\", \"#c7eae5\", \"#80cdc1\", \"#35978f\", \"#01665e\",\n \"#b2182b\", \"#d6604d\", \"#f4a582\", \"#fddbc7\", \"#f7f7f7\", \"#d1e5f0\", \"#92c5de\", \"#4393c3\", \"#2166ac\",\n \"#d73027\", \"#f46d43\", \"#fdae61\", \"#fee090\", \"#ffffbf\", \"#e0f3f8\", \"#abd9e9\", \"#74add1\", \"#4575b4\",\n \"#a6cee3\", \"#1f78b4\", \"#b2df8a\", \"#33a02c\", \"#fb9a99\", \"#e31c2c\", \"#fdbf6f\", \"#ff7f00\", \"#cab2d6\",\n \"#fbb4ae\", \"#e41a1c\", \"#377eb8\", \"#4daf4a\", \"#984ea3\", \"#ff2000\", \"#ffff33\", \"#a65628\", \"#999999\",\n \"#8dd3c7\", \"#ffffb3\", \"#bebada\", \"#fb8072\", \"#80b1d3\", \"#fdb462\", \"#b3de69\", \"#fccde5\", \"#ffa07a\",\n \"#b15928\", \"#6a3d9a\", \"#ffed6f\", \"#9e0142\", \"#5e4fa2\", \"#999900\", \"#1a9850\", \"#4d4d4d\", \"#6baed6\",\n \"#71c671\", \"#388e8e\", \"#7d9ec0\", \"#7171c6\", \"#8e388e\", \"#8e8e38\", \"#00c957\", \"#cc3333\", \"#d1dbdd\",\n ];\n\n public getColor() {\n return RandomMapColor.randomColorPalette[ Math.floor(Math.random() * RandomMapColor.randomColorPalette.length)];\n }\n\n public getColorDef() {\n return ColorDef.fromString(this.getColor());\n }\n}\n\n"]}
@@ -1,4 +1,4 @@
1
- import * as GeoJson from "geojson";
1
+ import GeoJson from "geojson";
2
2
  /** @internal */
3
3
  export type Coord = number[];
4
4
  /** @internal */ export type RingCoords = Coord[];
@@ -1 +1 @@
1
- {"version":3,"file":"GeoJSONGeometry.d.ts","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,gBAAgB;AAChB,MAAM,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAE7B,gBAAgB,CAChB,MAAM,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;AAEjC,gBAAgB;AAChB,MAAM,MAAM,eAAe,GAAG,UAAU,EAAE,CAAC;AAE3C,gBAAgB;AAChB,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,gBAAgB;AAChB,qBAAa,oBAAoB;WACjB,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ;WACnC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ;WAC/B,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ;CAC7C"}
1
+ {"version":3,"file":"GeoJSONGeometry.d.ts","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometry.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,gBAAgB;AAChB,MAAM,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAE7B,gBAAgB,CAChB,MAAM,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;AAEjC,gBAAgB;AAChB,MAAM,MAAM,eAAe,GAAG,UAAU,EAAE,CAAC;AAE3C,gBAAgB;AAChB,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,gBAAgB;AAChB,qBAAa,oBAAoB;WACjB,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ;WACnC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ;WAC/B,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ;CAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"GeoJSONGeometry.js","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometry.ts"],"names":[],"mappings":";;;AAqBA,gBAAgB;AAChB,MAAa,oBAAoB;IACxB,MAAM,CAAC,YAAY,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC9K,MAAM,CAAC,QAAQ,CAAC,IAAsB,IAAG,OAAQ,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC1G,MAAM,CAAC,OAAO,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,CAAA,CAAC;CAC5G;AAJD,oDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport * as GeoJson from \"geojson\";\r\n\r\n/** @internal */\r\nexport type Coord = number[];\r\n\r\n/** @internal */ // Array of 2 or 3 numbers\r\nexport type RingCoords = Coord[];\r\n\r\n/** @internal */\r\nexport type MultiRingCoords = RingCoords[];\r\n\r\n/** @internal */\r\nexport interface MultiPath {\r\n lengths: number[];\r\n coords: number[];\r\n}\r\n\r\n/** @internal */\r\nexport class GeoJSONGeometryUtils {\r\n public static isRingOrPath(geom: GeoJson.Geometry) {return geom.type === \"LineString\" || geom.type === \"MultiLineString\" || geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\r\n public static isFilled(geom: GeoJson.Geometry) {return geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\r\n public static isPoint(geom: GeoJson.Geometry) {return geom.type === \"Point\" || geom.type === \"MultiPoint\";}\r\n}\r\n"]}
1
+ {"version":3,"file":"GeoJSONGeometry.js","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometry.ts"],"names":[],"mappings":";;;AAqBA,gBAAgB;AAChB,MAAa,oBAAoB;IACxB,MAAM,CAAC,YAAY,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC9K,MAAM,CAAC,QAAQ,CAAC,IAAsB,IAAG,OAAQ,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC1G,MAAM,CAAC,OAAO,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,CAAA,CAAC;CAC5G;AAJD,oDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport GeoJson from \"geojson\";\n\n/** @internal */\nexport type Coord = number[];\n\n/** @internal */ // Array of 2 or 3 numbers\nexport type RingCoords = Coord[];\n\n/** @internal */\nexport type MultiRingCoords = RingCoords[];\n\n/** @internal */\nexport interface MultiPath {\n lengths: number[];\n coords: number[];\n}\n\n/** @internal */\nexport class GeoJSONGeometryUtils {\n public static isRingOrPath(geom: GeoJson.Geometry) {return geom.type === \"LineString\" || geom.type === \"MultiLineString\" || geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\n public static isFilled(geom: GeoJson.Geometry) {return geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\n public static isPoint(geom: GeoJson.Geometry) {return geom.type === \"Point\" || geom.type === \"MultiPoint\";}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { FeatureGeometryRenderer } from "@itwin/core-frontend";
2
- import * as GeoJson from "geojson";
2
+ import GeoJson from "geojson";
3
3
  /** @internal */
4
4
  export declare class GeoJSONGeometryReader {
5
5
  private _renderer;
@@ -1 +1 @@
1
- {"version":3,"file":"GeoJSONGeometryReader.d.ts","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometryReader.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAInC,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,SAAS,CAA0B;gBAExB,QAAQ,EAAE,uBAAuB;IAIvC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAWtC,iBAAiB;YAwCjB,UAAU;CAkBzB"}
1
+ {"version":3,"file":"GeoJSONGeometryReader.d.ts","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometryReader.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,OAAO,MAAM,SAAS,CAAC;AAK9B,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,SAAS,CAA0B;gBAExB,QAAQ,EAAE,uBAAuB;IAIvC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAWtC,iBAAiB;YAwCjB,UAAU;CAkBzB"}
@@ -7,18 +7,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.GeoJSONGeometryReader = void 0;
8
8
  const core_bentley_1 = require("@itwin/core-bentley");
9
9
  const core_frontend_1 = require("@itwin/core-frontend");
10
- const GeoJSONGeometry_1 = require("./GeoJSONGeometry");
10
+ const GeoJSONGeometry_js_1 = require("./GeoJSONGeometry.js");
11
11
  const loggerCategory = "MapLayersFormats.GeoJSONGeometryReader";
12
12
  /** @internal */
13
13
  class GeoJSONGeometryReader {
14
+ _renderer;
14
15
  constructor(renderer) {
15
16
  this._renderer = renderer;
16
17
  }
17
18
  async readGeometry(geometry) {
18
- if (GeoJSONGeometry_1.GeoJSONGeometryUtils.isRingOrPath(geometry)) {
19
- await this.readRingsAndPaths(geometry, this._renderer, GeoJSONGeometry_1.GeoJSONGeometryUtils.isFilled(geometry), false /* relativeCoords*/);
19
+ if (GeoJSONGeometry_js_1.GeoJSONGeometryUtils.isRingOrPath(geometry)) {
20
+ await this.readRingsAndPaths(geometry, this._renderer, GeoJSONGeometry_js_1.GeoJSONGeometryUtils.isFilled(geometry), false /* relativeCoords*/);
20
21
  }
21
- else if (GeoJSONGeometry_1.GeoJSONGeometryUtils.isPoint(geometry)) {
22
+ else if (GeoJSONGeometry_js_1.GeoJSONGeometryUtils.isPoint(geometry)) {
22
23
  await this.readPoints(geometry, this._renderer, false /* relativeCoords*/);
23
24
  }
24
25
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"GeoJSONGeometryReader.js","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometryReader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAA6C;AAC7C,wDAAmF;AACnF,uDAAwG;AAGxG,MAAM,cAAc,GAAG,wCAAwC,CAAC;AAEhE,gBAAgB;AAChB,MAAa,qBAAqB;IAGhC,YAAmB,QAAiC;QAClD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,QAA0B;QAElD,IAAI,sCAAoB,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,sCAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC7H,CAAC;aAAM,IAAI,sCAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClD,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,CAAA,mBAAmB,CAAC,CAAC;QAC5E,CAAC;aAAM,CAAC;YACN,qBAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,+DAA+D,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC;QACnH,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAAC,QAA0B,EAAE,QAAiC,EAAE,IAAa,EAAE,cAAuB;QACnI,MAAM,SAAS,GAAc,EAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC;QACvD,IAAI,KAA8B,CAAC;QAEnC,MAAM,QAAQ,GAAG,CAAC,IAAgB,EAAE,MAAc,EA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EAAE,CAAC;gBACzB,MAAM,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;QAC1F,CAAC;IAEH,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,IAAsB,EAAE,QAAiC,EAAE,cAAuB;QAEzG,MAAM,OAAO,GAAU,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAU,EAAE,CAAC;QACzB,MAAM,SAAS,GAAG,CAAC,KAAY,EAAE,EAAE;YACjC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACjC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;QAED,MAAM,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;IACjE,CAAC;CACF;AA5ED,sDA4EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { deflateCoordinates, FeatureGeometryRenderer } from \"@itwin/core-frontend\";\r\nimport { Coord, GeoJSONGeometryUtils, MultiPath, MultiRingCoords, RingCoords } from \"./GeoJSONGeometry\";\r\nimport * as GeoJson from \"geojson\";\r\n\r\nconst loggerCategory = \"MapLayersFormats.GeoJSONGeometryReader\";\r\n\r\n/** @internal */\r\nexport class GeoJSONGeometryReader {\r\n private _renderer: FeatureGeometryRenderer;\r\n\r\n public constructor(renderer: FeatureGeometryRenderer) {\r\n this._renderer = renderer;\r\n }\r\n\r\n public async readGeometry(geometry: GeoJson.Geometry) {\r\n\r\n if (GeoJSONGeometryUtils.isRingOrPath(geometry)) {\r\n await this.readRingsAndPaths(geometry, this._renderer, GeoJSONGeometryUtils.isFilled(geometry), false /* relativeCoords*/);\r\n } else if (GeoJSONGeometryUtils.isPoint(geometry)) {\r\n await this.readPoints(geometry, this._renderer, false/* relativeCoords*/);\r\n } else {\r\n Logger.logError(loggerCategory, `GeoJSONGeometryReader:readGeometry - Unknown geometry type '${geometry.type}'`);\r\n }\r\n }\r\n\r\n private async readRingsAndPaths(geometry: GeoJson.Geometry, renderer: FeatureGeometryRenderer, fill: boolean, relativeCoords: boolean) {\r\n const multiPath: MultiPath = {coords: [], lengths: []};\r\n let polys: MultiPath[] | undefined;\r\n\r\n const readPath = (ring: RingCoords, offset: number, result: MultiPath) => {\r\n const newOffset = deflateCoordinates(ring, result.coords, 2, offset);\r\n result.lengths.push(ring.length);\r\n return newOffset;\r\n };\r\n\r\n const readMultiPath = (multiRings: MultiRingCoords, result: MultiPath) => {\r\n let offset = 0;\r\n for (const ring of multiRings) {\r\n offset = readPath(ring, offset, result);\r\n }\r\n };\r\n\r\n if (geometry.type === \"LineString\") {\r\n readPath(geometry.coordinates, 0, multiPath);\r\n } else if (geometry.type === \"MultiLineString\" || geometry.type === \"Polygon\") {\r\n readMultiPath(geometry.coordinates, multiPath);\r\n } else if (geometry.type === \"MultiPolygon\") {\r\n polys = [];\r\n for (const poly of geometry.coordinates) {\r\n const tmpMultiPath: MultiPath = {coords: [], lengths: [] };\r\n readMultiPath(poly, tmpMultiPath);\r\n polys.push(tmpMultiPath);\r\n }\r\n }\r\n\r\n if (polys) {\r\n for (const poly of polys) {\r\n await renderer.renderPath(poly.lengths, poly.coords, fill, 2, relativeCoords);\r\n }\r\n } else {\r\n await renderer.renderPath(multiPath.lengths, multiPath.coords, fill, 2, relativeCoords);\r\n }\r\n\r\n }\r\n\r\n private async readPoints(geom: GeoJson.Geometry, renderer: FeatureGeometryRenderer, relativeCoords: boolean) {\r\n\r\n const lengths: Coord = [];\r\n const coords: Coord = [];\r\n const readPoint = (coord: Coord) => {\r\n lengths.push(1);\r\n coords.push(coord[0]);\r\n coords.push(coord[1]);\r\n };\r\n\r\n if (geom.type === \"MultiPoint\") {\r\n geom.coordinates.forEach(readPoint);\r\n } else if (geom.type === \"Point\") {\r\n readPoint(geom.coordinates);\r\n }\r\n\r\n await renderer.renderPoint(lengths, coords, 2, relativeCoords);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"GeoJSONGeometryReader.js","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometryReader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAA6C;AAC7C,wDAAmF;AAEnF,6DAA2G;AAE3G,MAAM,cAAc,GAAG,wCAAwC,CAAC;AAEhE,gBAAgB;AAChB,MAAa,qBAAqB;IACxB,SAAS,CAA0B;IAE3C,YAAmB,QAAiC;QAClD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,QAA0B;QAElD,IAAI,yCAAoB,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,yCAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAA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AAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACjC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;QAED,MAAM,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;IACjE,CAAC;CACF;AA5ED,sDA4EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport { deflateCoordinates, FeatureGeometryRenderer } from \"@itwin/core-frontend\";\nimport GeoJson from \"geojson\";\nimport { Coord, GeoJSONGeometryUtils, MultiPath, MultiRingCoords, RingCoords } from \"./GeoJSONGeometry.js\";\n\nconst loggerCategory = \"MapLayersFormats.GeoJSONGeometryReader\";\n\n/** @internal */\nexport class GeoJSONGeometryReader {\n private _renderer: FeatureGeometryRenderer;\n\n public constructor(renderer: FeatureGeometryRenderer) {\n this._renderer = renderer;\n }\n\n public async readGeometry(geometry: GeoJson.Geometry) {\n\n if (GeoJSONGeometryUtils.isRingOrPath(geometry)) {\n await this.readRingsAndPaths(geometry, this._renderer, GeoJSONGeometryUtils.isFilled(geometry), false /* relativeCoords*/);\n } else if (GeoJSONGeometryUtils.isPoint(geometry)) {\n await this.readPoints(geometry, this._renderer, false/* relativeCoords*/);\n } else {\n Logger.logError(loggerCategory, `GeoJSONGeometryReader:readGeometry - Unknown geometry type '${geometry.type}'`);\n }\n }\n\n private async readRingsAndPaths(geometry: GeoJson.Geometry, renderer: FeatureGeometryRenderer, fill: boolean, relativeCoords: boolean) {\n const multiPath: MultiPath = {coords: [], lengths: []};\n let polys: MultiPath[] | undefined;\n\n const readPath = (ring: RingCoords, offset: number, result: MultiPath) => {\n const newOffset = deflateCoordinates(ring, result.coords, 2, offset);\n result.lengths.push(ring.length);\n return newOffset;\n };\n\n const readMultiPath = (multiRings: MultiRingCoords, result: MultiPath) => {\n let offset = 0;\n for (const ring of multiRings) {\n offset = readPath(ring, offset, result);\n }\n };\n\n if (geometry.type === \"LineString\") {\n readPath(geometry.coordinates, 0, multiPath);\n } else if (geometry.type === \"MultiLineString\" || geometry.type === \"Polygon\") {\n readMultiPath(geometry.coordinates, multiPath);\n } else if (geometry.type === \"MultiPolygon\") {\n polys = [];\n for (const poly of geometry.coordinates) {\n const tmpMultiPath: MultiPath = {coords: [], lengths: [] };\n readMultiPath(poly, tmpMultiPath);\n polys.push(tmpMultiPath);\n }\n }\n\n if (polys) {\n for (const poly of polys) {\n await renderer.renderPath(poly.lengths, poly.coords, fill, 2, relativeCoords);\n }\n } else {\n await renderer.renderPath(multiPath.lengths, multiPath.coords, fill, 2, relativeCoords);\n }\n\n }\n\n private async readPoints(geom: GeoJson.Geometry, renderer: FeatureGeometryRenderer, relativeCoords: boolean) {\n\n const lengths: Coord = [];\n const coords: Coord = [];\n const readPoint = (coord: Coord) => {\n lengths.push(1);\n coords.push(coord[0]);\n coords.push(coord[1]);\n };\n\n if (geom.type === \"MultiPoint\") {\n geom.coordinates.forEach(readPoint);\n } else if (geom.type === \"Point\") {\n readPoint(geom.coordinates);\n }\n\n await renderer.renderPoint(lengths, coords, 2, relativeCoords);\n }\n}\n"]}
@@ -0,0 +1,36 @@
1
+ import { CanvasDecoration, DecorateContext, Decorator, Sprite } from "@itwin/core-frontend";
2
+ import { Point3d } from "@itwin/core-geometry";
3
+ import { GoogleMapsMapTypes } from "./GoogleMaps.js";
4
+ /** A simple decorator that show logo at the a given screen position.
5
+ * @internal
6
+ */
7
+ export declare class LogoDecoration implements CanvasDecoration {
8
+ private _sprite?;
9
+ /** The current position of the logo in view coordinates. */
10
+ readonly position: Point3d;
11
+ private _offset;
12
+ set offset(offset: Point3d | undefined);
13
+ /** The logo offset in view coordinates.*/
14
+ get offset(): Point3d | undefined;
15
+ /** Move the logo to the lower left corner of the screen. */
16
+ moveToLowerLeftCorner(context: DecorateContext): boolean;
17
+ /** Indicate if the logo is loaded and ready to be drawn. */
18
+ get isLoaded(): boolean;
19
+ activate(sprite: Sprite): Promise<boolean>;
20
+ /** Draw this sprite onto the supplied canvas.
21
+ * @see [[CanvasDecoration.drawDecoration]]
22
+ */
23
+ drawDecoration(ctx: CanvasRenderingContext2D): void;
24
+ decorate(context: DecorateContext): void;
25
+ }
26
+ /** A decorator that adds the Google Maps logo to the lower left corner of the screen.
27
+ * @internal
28
+ */
29
+ export declare class GoogleMapsDecorator implements Decorator {
30
+ readonly logo: LogoDecoration;
31
+ /** Activate the logo based on the given map type. */
32
+ activate(mapType: GoogleMapsMapTypes): Promise<boolean>;
33
+ /** Decorate implementation */
34
+ decorate: (context: DecorateContext) => void;
35
+ }
36
+ //# sourceMappingURL=GoogleMapDecorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoogleMapDecorator.d.ts","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMapDecorator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS,EAA0B,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrD;;GAEG;AACH,qBAAa,cAAe,YAAW,gBAAgB;IACrD,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,4DAA4D;IAC5D,SAAgB,QAAQ,UAAiB;IAEzC,OAAO,CAAC,OAAO,CAAoB;IAEnC,IAAW,MAAM,CAAC,MAAM,EAAE,OAAO,GAAC,SAAS,EAExC;IAEH,0CAA0C;IAC1C,IAAW,MAAM,IALS,OAAO,GAAC,SAAS,CAO1C;IAED,4DAA4D;IACrD,qBAAqB,CAAC,OAAO,EAAE,eAAe,GAAI,OAAO;IAahE,4DAA4D;IAC5D,IAAW,QAAQ,YAA8C;IAEpD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWvD;;OAEG;IACI,cAAc,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI;IAOnD,QAAQ,CAAC,OAAO,EAAE,eAAe;CAGzC;AAED;;EAEE;AACF,qBAAa,mBAAoB,YAAW,SAAS;IACnD,SAAgB,IAAI,iBAAwB;IAE5C,qDAAqD;IACxC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpE,8BAA8B;IACvB,QAAQ,YAAa,eAAe,UAKzC;CACH"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GoogleMapsDecorator = exports.LogoDecoration = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ const core_frontend_1 = require("@itwin/core-frontend");
9
+ const core_geometry_1 = require("@itwin/core-geometry");
10
+ /** A simple decorator that show logo at the a given screen position.
11
+ * @internal
12
+ */
13
+ class LogoDecoration {
14
+ _sprite;
15
+ /** The current position of the logo in view coordinates. */
16
+ position = new core_geometry_1.Point3d();
17
+ _offset;
18
+ set offset(offset) {
19
+ this._offset = offset;
20
+ }
21
+ /** The logo offset in view coordinates.*/
22
+ get offset() {
23
+ return this._offset;
24
+ }
25
+ /** Move the logo to the lower left corner of the screen. */
26
+ moveToLowerLeftCorner(context) {
27
+ if (!this._sprite || !this._sprite.isLoaded)
28
+ return false;
29
+ this.position.x = this._offset?.x ?? 0;
30
+ this.position.y = context.viewport.parentDiv.clientHeight - this._sprite.size.y;
31
+ if (this._offset?.y)
32
+ this.position.y -= this._offset.y;
33
+ return true;
34
+ }
35
+ /* TODO: Add other move methods as needed */
36
+ /** Indicate if the logo is loaded and ready to be drawn. */
37
+ get isLoaded() { return this._sprite?.isLoaded ?? false; }
38
+ async activate(sprite) {
39
+ this._sprite = sprite;
40
+ return new Promise((resolve, _reject) => {
41
+ sprite.loadPromise.then(() => {
42
+ resolve(true);
43
+ }).catch(() => {
44
+ resolve(false);
45
+ });
46
+ });
47
+ }
48
+ /** Draw this sprite onto the supplied canvas.
49
+ * @see [[CanvasDecoration.drawDecoration]]
50
+ */
51
+ drawDecoration(ctx) {
52
+ if (this.isLoaded) {
53
+ // Draw image with an origin at the top left corner
54
+ ctx.drawImage(this._sprite.image, 0, 0);
55
+ }
56
+ }
57
+ decorate(context) {
58
+ context.addCanvasDecoration(this);
59
+ }
60
+ }
61
+ exports.LogoDecoration = LogoDecoration;
62
+ /** A decorator that adds the Google Maps logo to the lower left corner of the screen.
63
+ * @internal
64
+ */
65
+ class GoogleMapsDecorator {
66
+ logo = new LogoDecoration();
67
+ /** Activate the logo based on the given map type. */
68
+ async activate(mapType) {
69
+ // Pick the logo that is the most visible on the background map
70
+ const imageName = mapType === "roadmap" ?
71
+ "google_on_white" :
72
+ "google_on_non_white";
73
+ // We need to move the logo right after the 'i.js' button
74
+ this.logo.offset = new core_geometry_1.Point3d(45, 10);
75
+ return this.logo.activate(core_frontend_1.IconSprites.getSpriteFromUrl(`${core_frontend_1.IModelApp.publicPath}images/${imageName}.png`));
76
+ }
77
+ ;
78
+ /** Decorate implementation */
79
+ decorate = (context) => {
80
+ if (!this.logo.isLoaded)
81
+ return;
82
+ this.logo.moveToLowerLeftCorner(context);
83
+ this.logo.decorate(context);
84
+ };
85
+ }
86
+ exports.GoogleMapsDecorator = GoogleMapsDecorator;
87
+ //# sourceMappingURL=GoogleMapDec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,OAAO;QACT,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC,CAAC;CACH;AAvBD,kDAuBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { CanvasDecoration, DecorateContext, Decorator, IconSprites, IModelApp, Sprite } from \"@itwin/core-frontend\";\nimport { Point3d } from \"@itwin/core-geometry\";\nimport { GoogleMapsMapTypes } from \"./GoogleMaps.js\";\n\n\n/** A simple decorator that show logo at the a given screen position.\n * @internal\n */\nexport class LogoDecoration implements CanvasDecoration {\n private _sprite?: Sprite;\n\n /** The current position of the logo in view coordinates. */\n public readonly position = new Point3d();\n\n private _offset: Point3d|undefined;\n\n public set offset(offset: Point3d|undefined) {\n this._offset = offset;\n }\n\n /** The logo offset in view coordinates.*/\n public get offset() {\n return this._offset;\n }\n\n /** Move the logo to the lower left corner of the screen. */\n public moveToLowerLeftCorner(context: DecorateContext) : boolean{\n if (!this._sprite || !this._sprite.isLoaded)\n return false;\n\n this.position.x = this._offset?.x ?? 0;\n this.position.y = context.viewport.parentDiv.clientHeight - this._sprite.size.y;\n if (this._offset?.y)\n this.position.y -= this._offset.y;\n return true;\n }\n\n /* TODO: Add other move methods as needed */\n\n /** Indicate if the logo is loaded and ready to be drawn. */\n public get isLoaded() { return this._sprite?.isLoaded ?? false; }\n\n public async activate(sprite: Sprite): Promise<boolean> {\n this._sprite = sprite;\n return new Promise<boolean>((resolve, _reject) => {\n sprite.loadPromise.then(() => {\n resolve(true);\n }).catch(() => {\n resolve (false);\n });\n });\n }\n\n /** Draw this sprite onto the supplied canvas.\n * @see [[CanvasDecoration.drawDecoration]]\n */\n public drawDecoration(ctx: CanvasRenderingContext2D): void {\n if (this.isLoaded) {\n // Draw image with an origin at the top left corner\n ctx.drawImage(this._sprite!.image!, 0, 0);\n }\n }\n\n public decorate(context: DecorateContext) {\n context.addCanvasDecoration(this);\n }\n}\n\n/** A decorator that adds the Google Maps logo to the lower left corner of the screen.\n * @internal\n*/\nexport class GoogleMapsDecorator implements Decorator {\n public readonly logo = new LogoDecoration();\n\n /** Activate the logo based on the given map type. */\n public async activate(mapType: GoogleMapsMapTypes): Promise<boolean> {\n // Pick the logo that is the most visible on the background map\n const imageName = mapType === \"roadmap\" ?\n \"google_on_white\" :\n \"google_on_non_white\";\n\n // We need to move the logo right after the 'i.js' button\n this.logo.offset = new Point3d(45, 10);\n\n return this.logo.activate(IconSprites.getSpriteFromUrl(`${IModelApp.publicPath}images/${imageName}.png`));\n };\n\n /** Decorate implementation */\n public decorate = (context: DecorateContext) => {\n if (!this.logo.isLoaded)\n return;\n this.logo.moveToLowerLeftCorner(context);\n this.logo.decorate(context);\n };\n}\n"]}