jmapserver-ng-core-types 2.0.7 → 2.0.8

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.
package/all-enums.ts CHANGED
@@ -279,5 +279,6 @@ export const ALL_MAP_RASTER_SCHEME_TYPES: JMAP_RASTER_SCHEME_TYPES[] = [
279
279
  ]
280
280
 
281
281
  export const ALL_JORGANIZATION_EXTERNAL_API_KEY_TYPES: JORGANIZATION_EXTERNAL_API_KEY_TYPES[] = [
282
- JORGANIZATION_EXTERNAL_API_KEY_TYPES.MAPBOX_ACCESS_TOKEN
282
+ JORGANIZATION_EXTERNAL_API_KEY_TYPES.MAPBOX_ACCESS_TOKEN,
283
+ JORGANIZATION_EXTERNAL_API_KEY_TYPES.GOOGLE_MAPS_API_KEY
283
284
  ]
package/index.ts CHANGED
@@ -734,6 +734,7 @@ export interface JMapBasemapService {
734
734
  isDisabled(): boolean
735
735
  isActive(): boolean
736
736
  isMapboxId(basemapId: string): boolean
737
+ isGoogleMapsId(basemapId: string): boolean
737
738
  isOSMId(basemapId: string): boolean
738
739
  getActiveId(): string | undefined
739
740
  existsById(basemapId: string): boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapserver-ng-core-types",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "JMap Server specific version of JMap Server NG Core types and interfaces",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/core.d.ts CHANGED
@@ -5057,6 +5057,22 @@ declare namespace JMap {
5057
5057
  */
5058
5058
  function isOSMId(basemapId: string): boolean
5059
5059
 
5060
+ /**
5061
+ * ***JMap.Map.Basemap.isGoogleMapsId***
5062
+ *
5063
+ * Returns true if the basemap id is a Google Maps basemap.
5064
+ *
5065
+ * @example ```ts
5066
+ *
5067
+ * // returns true
5068
+ * JMap.Map.Basemap.isGoogleMapsId("google-roadmap")
5069
+ *
5070
+ * // returns false
5071
+ * JMap.Map.Basemap.isGoogleMapsId("mapbox-streets")
5072
+ * ```
5073
+ */
5074
+ function isGoogleMapsId(basemapId: string): boolean
5075
+
5060
5076
  /**
5061
5077
  * ***JMap.Map.Basemap.getActiveId***
5062
5078
  *
@@ -321,6 +321,36 @@ declare interface JCoreMapOptions {
321
321
  */
322
322
  mapboxToken?: string
323
323
 
324
+ /**
325
+ * If a Google Maps API key is set through the JMap Admin interface,
326
+ * the JMap Server NG Core library will use it automatically, nothing else to do for you.
327
+ *
328
+ * The Google Maps API key is used by JMap Server NG in order to display Google basemaps and to use other Google related functionalities.
329
+ *
330
+ * In order to use Google basemaps, you need to enable the Map Tiles API in your Google account. See the {@link https://developers.google.com/maps/documentation/tile/cloud-setup?_gl=1*hgipm1*_up*MQ..*_ga*MTE3OTc5MTI1Ni4xNzEyMzI0Njc4*_ga_NRWSTWS78N*MTcxMjMyNDY3Ny4xLjAuMTcxMjMyNDY3Ny4wLjAuMA.. |documentation} for more details about this
331
+ *
332
+ * If no Google Maps API key is set in JMap Admin, or if you want to use
333
+ * the Google Maps API key of your choice, you have to set the "***googleMapsApiKey***" parameter :
334
+ *
335
+ * ```html
336
+ * <html>
337
+ * ...
338
+ * <body>
339
+ * <script type="text/javascript">
340
+ * window.JMAP_OPTIONS = {
341
+ * ...
342
+ * map: {
343
+ * googleMapsApiKey: "google-maps-api-key"
344
+ * }
345
+ * }
346
+ * </script>
347
+ * ...
348
+ * </body>
349
+ * </html>
350
+ * ```
351
+ */
352
+ googleMapsApiKey?: string
353
+
324
354
  /**
325
355
  * By default the Map Rotation control is not visible.
326
356
  *
@@ -81,5 +81,6 @@ declare interface JJMapPasswordPolicyCompliance {
81
81
 
82
82
  // ALL_JORGANIZATION_EXTERNAL_API_KEY_TYPES in all-enum.ts
83
83
  declare const enum JORGANIZATION_EXTERNAL_API_KEY_TYPES {
84
- MAPBOX_ACCESS_TOKEN = "MAPBOX_ACCESS_TOKEN"
84
+ MAPBOX_ACCESS_TOKEN = "MAPBOX_ACCESS_TOKEN",
85
+ GOOGLE_MAPS_API_KEY = "GOOGLE_MAPS_API_KEY"
85
86
  }