maplibre-gl-js-amplify 1.2.2 → 1.2.4
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/CHANGELOG.md +17 -0
- package/dist/maplibre-gl-js-amplify.umd.js +38 -10
- package/dist/maplibre-gl-js-amplify.umd.js.map +1 -1
- package/dist/maplibre-gl-js-amplify.umd.min.js +1 -1
- package/dist/maplibre-gl-js-amplify.umd.min.js.gz +0 -0
- package/dist/maplibre-gl-js-amplify.umd.min.js.map +1 -1
- package/dist/public/amplify-map.css +15 -0
- package/lib/cjs/AmplifyMapLibreGeocoder.d.ts +3 -0
- package/lib/cjs/AmplifyMapLibreGeocoder.js +18 -2
- package/lib/cjs/AmplifyMapLibreGeocoder.js.map +1 -1
- package/lib/cjs/AmplifyMapLibreRequest.js +12 -7
- package/lib/cjs/AmplifyMapLibreRequest.js.map +1 -1
- package/lib/cjs/drawPoints.d.ts +3 -1
- package/lib/cjs/drawPoints.js +8 -1
- package/lib/cjs/drawPoints.js.map +1 -1
- package/lib/esm/AmplifyMapLibreGeocoder.d.ts +3 -0
- package/lib/esm/AmplifyMapLibreGeocoder.js +18 -2
- package/lib/esm/AmplifyMapLibreGeocoder.js.map +1 -1
- package/lib/esm/AmplifyMapLibreRequest.js +12 -7
- package/lib/esm/AmplifyMapLibreRequest.js.map +1 -1
- package/lib/esm/drawPoints.d.ts +3 -1
- package/lib/esm/drawPoints.js +8 -1
- package/lib/esm/drawPoints.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
## master
|
|
2
2
|
|
|
3
|
+
## 1.2.4
|
|
4
|
+
|
|
5
|
+
### Features / Improvements 🚀
|
|
6
|
+
|
|
7
|
+
- Added `getSuggestions` API to `AmplifyGeocoderAPI` [#106](https://github.com/aws-amplify/maplibre-gl-js-amplify/pull/106)
|
|
8
|
+
|
|
9
|
+
### Bug fixes 🐛
|
|
10
|
+
|
|
11
|
+
## 1.2.3
|
|
12
|
+
|
|
13
|
+
### Features / Improvements 🚀
|
|
14
|
+
|
|
15
|
+
- Added `amplify-map-.css` for static map styles [#98](https://github.com/aws-amplify/maplibre-gl-js-amplify/pull/98)
|
|
16
|
+
- Updated `drawPoints` to have an `autoFit` option to fit the map to points drawn [#94](https://github.com/aws-amplify/maplibre-gl-js-amplify/pull/94)
|
|
17
|
+
|
|
18
|
+
### Bug fixes 🐛
|
|
19
|
+
|
|
3
20
|
## 1.2.1
|
|
4
21
|
|
|
5
22
|
- Re-release of 1.1.3 to revert broken 1.2.0 version
|
|
@@ -104,13 +104,18 @@
|
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
this.refreshCredentialsWithRetry = () => __awaiter$1(this, void 0, void 0, function* () {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
try {
|
|
108
|
+
const MAX_DELAY_MS = 5 * 60 * 1000; // 5 minutes
|
|
109
|
+
yield core.jitteredExponentialRetry(this.refreshCredentials, [], MAX_DELAY_MS);
|
|
110
|
+
// Refresh credentials on a timer because HubEvents do not trigger on credential refresh currently
|
|
111
|
+
this.activeTimeout && clearTimeout(this.activeTimeout);
|
|
112
|
+
const expiration = new Date(this.credentials.expiration);
|
|
113
|
+
const timeout = expiration.getTime() - new Date().getTime() - 10000; // Adds a 10 second buffer time before the next refresh
|
|
114
|
+
this.activeTimeout = window.setTimeout(this.refreshCredentialsWithRetry, timeout);
|
|
115
|
+
}
|
|
116
|
+
catch (e) {
|
|
117
|
+
console.error(`Failed to refresh credentials: ${e}`);
|
|
118
|
+
}
|
|
114
119
|
});
|
|
115
120
|
/**
|
|
116
121
|
* A callback function that can be passed to a maplibre map object that is run before the map makes a request for an external URL. This transform request is used to sign the request with AWS Sigv4 Auth. [https://maplibre.org/maplibre-gl-js-docs/api/map/](https://maplibre.org/maplibre-gl-js-docs/api/map/)
|
|
@@ -466,7 +471,7 @@
|
|
|
466
471
|
* @property {String} clusterSymbolLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#symbol) used for creating styling the number that shows the count of points in a cluster
|
|
467
472
|
* @property {String} unclusteredLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers) used for creating and styling the individual points on the map and the popup when clicking on a point
|
|
468
473
|
*/
|
|
469
|
-
function drawPoints(sourceName, data, map, { showCluster = true, clusterOptions = {}, unclusteredOptions: unclusteredMarkerOptions = {}, } = {}, mapStyle) {
|
|
474
|
+
function drawPoints(sourceName, data, map, { showCluster = true, clusterOptions = {}, unclusteredOptions: unclusteredMarkerOptions = {}, autoFit = true, } = {}, mapStyle) {
|
|
470
475
|
var _a, _b;
|
|
471
476
|
if (!map ||
|
|
472
477
|
typeof map.addSource !== "function" ||
|
|
@@ -500,6 +505,13 @@
|
|
|
500
505
|
({ clusterLayerId, clusterSymbolLayerId } = drawClusterLayer(sourceId, map, clusterOptions, mapStyle));
|
|
501
506
|
}
|
|
502
507
|
const { unclusteredLayerId } = drawUnclusteredLayer(sourceId, map, unclusteredMarkerOptions || {});
|
|
508
|
+
if (autoFit) {
|
|
509
|
+
const mapBounds = map.getBounds();
|
|
510
|
+
features.forEach(function (feature) {
|
|
511
|
+
mapBounds.extend(feature.geometry.coordinates);
|
|
512
|
+
});
|
|
513
|
+
map.fitBounds(mapBounds);
|
|
514
|
+
}
|
|
503
515
|
// utility function for setting layer visibility to none
|
|
504
516
|
const hide = () => {
|
|
505
517
|
map.setLayoutProperty(unclusteredLayerId, "visibility", "none");
|
|
@@ -580,7 +592,7 @@
|
|
|
580
592
|
const data = yield geo.Geo.searchByText(config.query, {
|
|
581
593
|
biasPosition: config.proximity,
|
|
582
594
|
searchAreaConstraints: config.bbox,
|
|
583
|
-
countries: config.
|
|
595
|
+
countries: config.countries,
|
|
584
596
|
maxResults: config.limit,
|
|
585
597
|
});
|
|
586
598
|
if (data) {
|
|
@@ -625,10 +637,26 @@
|
|
|
625
637
|
}
|
|
626
638
|
return { features };
|
|
627
639
|
}),
|
|
640
|
+
getSuggestions: (config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
641
|
+
const suggestions = [];
|
|
642
|
+
try {
|
|
643
|
+
const response = yield geo.Geo.searchForSuggestions(config.query, {
|
|
644
|
+
biasPosition: config.proximity,
|
|
645
|
+
searchAreaConstraints: config.bbox,
|
|
646
|
+
countries: config.countries,
|
|
647
|
+
maxResults: config.limit,
|
|
648
|
+
});
|
|
649
|
+
suggestions.push(...response);
|
|
650
|
+
}
|
|
651
|
+
catch (e) {
|
|
652
|
+
console.error(`Failed to get suggestions with error: ${e}`);
|
|
653
|
+
}
|
|
654
|
+
return { suggestions };
|
|
655
|
+
}),
|
|
628
656
|
};
|
|
629
657
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
630
658
|
function createAmplifyGeocoder(options) {
|
|
631
|
-
return new MaplibreGeocoder__default["default"](AmplifyGeocoderAPI, Object.assign({ maplibregl: maplibregl__default["default"], showResultMarkers: { element: createDefaultIcon() }, marker: { element: createDefaultIcon() } }, options));
|
|
659
|
+
return new MaplibreGeocoder__default["default"](AmplifyGeocoderAPI, Object.assign({ maplibregl: maplibregl__default["default"], showResultMarkers: { element: createDefaultIcon() }, marker: { element: createDefaultIcon() }, showResultsWhileTyping: (options === null || options === void 0 ? void 0 : options.autocomplete) === false ? false : true }, options));
|
|
632
660
|
}
|
|
633
661
|
|
|
634
662
|
const FILL_OPACITY = 0.3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maplibre-gl-js-amplify.umd.js","sources":["../lib/esm/utils.js","../lib/esm/AmplifyMapLibreRequest.js","../lib/esm/constants.js","../lib/esm/drawClusterLayer.js","../lib/esm/createMarker.js","../lib/esm/popupRender.js","../lib/esm/drawUnclusteredLayer.js","../lib/esm/drawPoints.js","../lib/esm/createDefaultIcon.js","../lib/esm/AmplifyMapLibreGeocoder.js","../lib/esm/drawGeofences.js"],"sourcesContent":["export function isCoordinates(array) {\n return (Array.isArray(array) &&\n typeof array[0] === \"number\" &&\n typeof array[1] === \"number\");\n}\nexport function isCoordinatesArray(array) {\n return isCoordinates(array[0]);\n}\nexport function isNamedLocation(object) {\n return (object &&\n Array.isArray(object.coordinates) &&\n typeof object.coordinates[0] === \"number\" &&\n typeof object.coordinates[1] === \"number\");\n}\nexport function isNamedLocationArray(array) {\n return isNamedLocation(array[0]);\n}\nexport function isGeofence(object) {\n return (object &&\n typeof object.id === \"string\" &&\n typeof object.geometry === \"object\");\n}\nexport function isGeofenceArray(array) {\n return Array.isArray(array) && isGeofence(array[0]);\n}\nexport function isGeoJsonSource(source) {\n return source.type === \"geojson\";\n}\nexport const strHasLength = (str) => typeof str === \"string\" && str.length > 0;\nexport const getFeaturesFromData = (data) => {\n let features;\n if (isCoordinatesArray(data)) {\n features = data.map((point) => {\n return {\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: point },\n properties: { place_name: `Coordinates,${point}` },\n };\n });\n }\n else if (isNamedLocationArray(data)) {\n features = data.map((location) => {\n return {\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: location.coordinates },\n properties: { title: location.title, address: location.address },\n };\n });\n }\n else {\n features = data;\n }\n return features;\n};\nexport const urlEncodePeriods = (str) => {\n return str.replace(/\\./g, \"%2E\");\n};\n//# sourceMappingURL=utils.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar _a;\nimport { Amplify, Hub, Signer, jitteredExponentialRetry, getAmplifyUserAgent, } from \"@aws-amplify/core\";\nimport { Geo } from \"@aws-amplify/geo\";\nimport { Map as MaplibreMap, } from \"maplibre-gl\";\nimport { urlEncodePeriods } from \"./utils\";\n/**\n * An object for encapsulating an Amplify Geo transform request and Amplify credentials\n * @class AmplifyMapLibreRequest\n * @param {ICredentials} currentCredentials Amplify credentials used for signing transformRequests\n * @param {String} region AWS region\n * @return {AmplifyMapLibreRequest} `this`\n *\n */\nexport default class AmplifyMapLibreRequest {\n constructor(currentCredentials, region) {\n this.refreshCredentials = () => __awaiter(this, void 0, void 0, function* () {\n try {\n this.credentials = yield Amplify.Auth.currentCredentials();\n }\n catch (e) {\n console.error(`Failed to refresh credentials: ${e}`);\n throw e;\n }\n });\n this.refreshCredentialsWithRetry = () => __awaiter(this, void 0, void 0, function* () {\n const MAX_DELAY_MS = 5 * 60 * 1000; // 5 minutes\n yield jitteredExponentialRetry(this.refreshCredentials, [], MAX_DELAY_MS);\n // Refresh credentials on a timer because HubEvents do not trigger on credential refresh currently\n this.activeTimeout && clearTimeout(this.activeTimeout);\n const expiration = new Date(this.credentials.expiration);\n const timeout = expiration.getTime() - new Date().getTime() - 10000; // Adds a 10 second buffer time before the next refresh\n this.activeTimeout = window.setTimeout(this.refreshCredentialsWithRetry, timeout);\n });\n /**\n * A callback function that can be passed to a maplibre map object that is run before the map makes a request for an external URL. This transform request is used to sign the request with AWS Sigv4 Auth. [https://maplibre.org/maplibre-gl-js-docs/api/map/](https://maplibre.org/maplibre-gl-js-docs/api/map/)\n * @param {string} url The function to use as a render function. This function accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and returns a string.\n * @param {string} resourceType The function to use as a render function. This function accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and returns a string.\n * @returns {RequestParameters} [https://maplibre.org/maplibre-gl-js-docs/api/properties/#requestparameters](https://maplibre.org/maplibre-gl-js-docs/api/properties/#requestparameters)\n */\n this.transformRequest = (url, resourceType) => {\n if (resourceType === \"Style\" && !url.includes(\"://\")) {\n if (this.region == undefined) {\n throw new Error(\"AWS region for map is undefined. Please verify that the region is set in aws-exports.js or that you are providing an AWS region parameter to createMap\");\n }\n url = `https://maps.geo.${this.region}.amazonaws.com/maps/v0/maps/${url}/style-descriptor`;\n }\n if (url.includes(\"amazonaws.com\")) {\n // only sign AWS requests (with the signature as part of the query string)\n const urlWithUserAgent = url +\n `?x-amz-user-agent=${encodeURIComponent(urlEncodePeriods(getAmplifyUserAgent()))}`;\n return {\n url: Signer.signUrl(urlWithUserAgent, {\n access_key: this.credentials.accessKeyId,\n secret_key: this.credentials.secretAccessKey,\n session_token: this.credentials.sessionToken,\n }),\n };\n }\n };\n this.credentials = currentCredentials;\n this.region = region;\n this.activeTimeout = null;\n this.refreshCredentialsWithRetry();\n Hub.listen(\"auth\", (data) => {\n switch (data.payload.event) {\n case \"signIn\":\n case \"signOut\":\n case \"tokenRefresh\":\n this.refreshCredentialsWithRetry();\n break;\n }\n });\n }\n}\n_a = AmplifyMapLibreRequest;\nAmplifyMapLibreRequest.createMapLibreMap = (options) => __awaiter(void 0, void 0, void 0, function* () {\n const { region, mapConstructor = MaplibreMap } = options, maplibreOption = __rest(options, [\"region\", \"mapConstructor\"]);\n const defaultMap = Geo.getDefaultMap();\n const amplifyRequest = new AmplifyMapLibreRequest(yield Amplify.Auth.currentCredentials(), region || defaultMap.region);\n const transformRequest = amplifyRequest.transformRequest;\n const map = new mapConstructor(Object.assign(Object.assign({}, maplibreOption), { style: options.style || defaultMap.mapName, // Amplify uses the name of the map in the maplibre style field,\n transformRequest }));\n return map;\n});\nexport const createMap = (options) => __awaiter(void 0, void 0, void 0, function* () {\n return AmplifyMapLibreRequest.createMapLibreMap(options);\n});\n//# sourceMappingURL=AmplifyMapLibreRequest.js.map","export const COLOR_WHITE = \"#fff\";\nexport const COLOR_BLACK = \"#000\";\nexport const MARKER_COLOR = \"#5d8aff\";\nexport const ACTIVE_MARKER_COLOR = \"#ff9900\";\nexport const POPUP_BORDER_COLOR = \"#0000001f\";\nexport const LOCATION_MARKER = \"M24.8133 38.533C18.76 31.493 13 28.8264 13 20.8264C13.4827 14.9864 16.552 9.67169 21.368 6.33302C33.768 -2.26165 50.824 5.78902 52.0667 20.8264C52.0667 28.613 46.5733 31.6797 40.6533 38.373C32.4933 47.5464 35.4 63.093 32.4933 63.093C29.72 63.093 32.4933 47.5464 24.8133 38.533ZM32.4933 8.23969C26.5573 8.23969 21.7467 13.0504 21.7467 18.9864C21.7467 24.9224 26.5573 29.733 32.4933 29.733C38.4293 29.733 43.24 24.9224 43.24 18.9864C43.24 13.0504 38.4293 8.23969 32.4933 8.23969Z\";\nexport const OLD_MARKER = \"M30 16C30 18.5747 29.1348 21.3832 27.7111 24.2306C26.2947 27.0635 24.3846 29.8177 22.4383 32.2506C20.4964 34.678 18.5493 36.7473 17.0858 38.2108C16.6828 38.6138 16.3174 38.9699 16 39.2739C15.6826 38.9699 15.3172 38.6138 14.9142 38.2108C13.4507 36.7473 11.5036 34.678 9.56174 32.2506C7.61543 29.8177 5.70531 27.0635 4.28885 24.2306C2.86518 21.3832 2 18.5747 2 16C2 8.26801 8.26801 2 16 2C23.732 2 30 8.26801 30 16Z\";\n// Map styles exist due to an issue with Amazon Location Service not supporting the default set of maplibre fonts\nexport var MAP_STYLES;\n(function (MAP_STYLES) {\n MAP_STYLES[\"ESRI_TOPOGRAPHIC\"] = \"VectorEsriTopographic\";\n MAP_STYLES[\"ESRI_STREETS\"] = \"VectorEsriStreets\";\n MAP_STYLES[\"ESRI_LIGHT_GRAY\"] = \"VectorEsriLightGrayCanvas\";\n MAP_STYLES[\"ESRI_DARK_GRAY\"] = \"VectorEsriDarkGrayCanvas\";\n MAP_STYLES[\"ESRI_NAVIGATION\"] = \"VectorEsriNavigation\";\n MAP_STYLES[\"HERE_BERLIN\"] = \"VectorHereBerlin\";\n})(MAP_STYLES || (MAP_STYLES = {}));\nexport const FONT_DEFAULT_BY_STYLE = {\n [MAP_STYLES.ESRI_TOPOGRAPHIC]: \"Noto Sans Regular\",\n [MAP_STYLES.ESRI_STREETS]: \"Arial Regular\",\n [MAP_STYLES.ESRI_LIGHT_GRAY]: \"Ubuntu Regular\",\n [MAP_STYLES.ESRI_DARK_GRAY]: \"Ubuntu Regular\",\n [MAP_STYLES.ESRI_NAVIGATION]: \"Arial Regular\",\n [MAP_STYLES.HERE_BERLIN]: \"Fira GO Regular\",\n};\n//# sourceMappingURL=constants.js.map","import { Geo } from \"@aws-amplify/geo\";\nimport { COLOR_WHITE, MARKER_COLOR } from \"./constants\";\nimport { isGeoJsonSource } from \"./utils\";\nimport { FONT_DEFAULT_BY_STYLE } from \"./constants\";\nexport function drawClusterLayer(sourceName, map, { fillColor: markerColor = MARKER_COLOR, smCircleSize: smallSize = 60, smThreshold: smallThreshold = 50, mdCircleSize: mediumSize = 100, mdThreshold: mediumThreshold = 100, lgCircleSize: largeSize = 140, lgThreshold: largeThreshold = 500, xlCircleSize: extraLargeSize = 180, borderWidth = 4, borderColor = COLOR_WHITE, clusterPaint, onClick, showCount, clusterCountLayout, fontColor = COLOR_WHITE, }, mapStyle) {\n const clusterLayerId = `${sourceName}-layer-clusters`;\n const clusterSymbolLayerId = `${sourceName}-layer-cluster-count`;\n // Use step expressions for clusters (https://docs.mapbox.com/mapbox-gl-js/style-spec/#expressions-step)\n const paintOptions = Object.assign({ \"circle-color\": [\n \"step\",\n [\"get\", \"point_count\"],\n markerColor,\n smallThreshold,\n markerColor,\n mediumThreshold,\n markerColor,\n largeThreshold,\n markerColor,\n ], \"circle-radius\": [\n \"step\",\n [\"get\", \"point_count\"],\n smallSize,\n smallThreshold,\n mediumSize,\n mediumThreshold,\n largeSize,\n largeThreshold,\n extraLargeSize,\n ], \"circle-stroke-width\": borderWidth, \"circle-stroke-color\": borderColor }, clusterPaint);\n const defaultClusterLayer = {\n id: clusterLayerId,\n type: \"circle\",\n source: sourceName,\n filter: [\"has\", \"point_count\"],\n paint: paintOptions,\n };\n map.addLayer(Object.assign({}, defaultClusterLayer));\n /*\n * Inspect cluster on click\n */\n map.on(\"click\", clusterLayerId, function (e) {\n if (typeof onClick === \"function\")\n onClick(e);\n const features = map.queryRenderedFeatures(e.point, {\n layers: [clusterLayerId],\n });\n const clusterId = features[0].properties.cluster_id;\n const source = map.getSource(sourceName);\n if (isGeoJsonSource(source)) {\n source.getClusterExpansionZoom(clusterId, function (err, zoom) {\n if (err)\n return;\n map.easeTo({\n center: features[0].geometry.coordinates,\n zoom: zoom,\n });\n });\n }\n });\n /*\n * Symbol Layer for cluster point count\n */\n if (showCount) {\n const defaultLayoutOptions = {\n \"text-field\": \"{point_count_abbreviated}\",\n \"text-size\": 24,\n };\n const locationServiceStyle = mapStyle || Geo.getDefaultMap().style;\n if (locationServiceStyle) {\n defaultLayoutOptions[\"text-font\"] = [\n FONT_DEFAULT_BY_STYLE[locationServiceStyle],\n ];\n }\n const layoutOptions = Object.assign(Object.assign({}, defaultLayoutOptions), clusterCountLayout);\n const paintOptions = {\n \"text-color\": fontColor,\n };\n const defaultClusterCount = {\n id: clusterSymbolLayerId,\n type: \"symbol\",\n source: sourceName,\n filter: [\"has\", \"point_count\"],\n layout: layoutOptions,\n paint: paintOptions,\n };\n map.addLayer(Object.assign({}, defaultClusterCount));\n }\n return { clusterLayerId, clusterSymbolLayerId };\n}\n//# sourceMappingURL=drawClusterLayer.js.map","import { COLOR_WHITE, MARKER_COLOR, LOCATION_MARKER } from \"./constants\";\nexport function createMarker(options) {\n const fillColor = (options === null || options === void 0 ? void 0 : options.fillColor) ? options.fillColor : MARKER_COLOR;\n const strokeColor = (options === null || options === void 0 ? void 0 : options.strokeColor) ? options.strokeColor : COLOR_WHITE;\n const lineWidth = (options === null || options === void 0 ? void 0 : options.lineWidth) ? options.lineWidth : 4;\n return {\n width: 64,\n height: 64,\n data: new Uint8Array(64 * 64 * 4),\n onAdd: function () {\n const canvas = document.createElement(\"canvas\");\n canvas.width = this.width;\n canvas.height = this.height;\n this.context = canvas.getContext(\"2d\");\n },\n render: function () {\n const context = this.context;\n const markerShape = new Path2D(LOCATION_MARKER);\n context.stroke(markerShape);\n context.fillStyle = fillColor;\n context.strokeStyle = strokeColor;\n context.lineWidth = lineWidth;\n context.fill(markerShape);\n this.data = context.getImageData(0, 0, this.width, this.height).data;\n return true;\n },\n };\n}\n//# sourceMappingURL=createMarker.js.map","import { strHasLength } from \"./utils\";\nimport { COLOR_BLACK, COLOR_WHITE, POPUP_BORDER_COLOR } from \"./constants\";\nexport function getPopupRenderFunction(unclusteredLayerId, { popupBackgroundColor: background = COLOR_WHITE, popupBorderColor: borderColor = POPUP_BORDER_COLOR, popupBorderWidth: borderWidth = 2, popupFontColor: fontColor = COLOR_BLACK, popupPadding: padding = 20, popupBorderRadius: radius = 4, popupTitleFontWeight: fontWeight = \"bold\", }) {\n return (selectedFeature) => {\n let title, address;\n // Try to get Title and address from existing feature properties\n if (strHasLength(selectedFeature.properties.place_name)) {\n const placeName = selectedFeature.properties.place_name.split(\",\");\n title = placeName[0];\n address = placeName.splice(1, placeName.length).join(\",\");\n }\n else if (strHasLength(selectedFeature.properties.title) ||\n strHasLength(selectedFeature.properties.address)) {\n title = selectedFeature.properties.title;\n address = selectedFeature.properties.address;\n }\n else {\n title = \"Coordinates\";\n address = selectedFeature.geometry.coordinates;\n }\n const titleHtml = `<div class=\"${unclusteredLayerId}-popup-title\" style=\"font-weight: ${fontWeight};\">${title}</div>`;\n const addressHtml = `<div class=\"${unclusteredLayerId}-popup-address\">${address}</div>`;\n const popupHtmlStyle = `background: ${background}; border: ${borderWidth}px solid ${borderColor}; color: ${fontColor}; border-radius: ${radius}px; padding: ${padding}px; word-wrap: break-word; margin: -10px -10px -15px;`;\n let popupHtml = `<div class=\"${unclusteredLayerId}-popup\" style=\"${popupHtmlStyle}\">`;\n if (title)\n popupHtml += titleHtml;\n if (address)\n popupHtml += addressHtml;\n popupHtml += \"</div>\";\n return popupHtml;\n };\n}\n//# sourceMappingURL=popupRender.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { Popup } from \"maplibre-gl\";\nimport { ACTIVE_MARKER_COLOR, COLOR_WHITE, MARKER_COLOR } from \"./constants\";\nimport { createMarker } from \"./createMarker\";\nimport { getPopupRenderFunction } from \"./popupRender\";\nimport { isCoordinates } from \"./utils\";\nconst HIDE_TIP = \"amplify-tip\";\nexport function drawUnclusteredLayer(sourceName, map, _a) {\n var { showMarkerPopup = false } = _a, options = __rest(_a, [\"showMarkerPopup\"]);\n const unclusteredLayerId = `${sourceName}-layer-unclustered-point`;\n let selectedId = null;\n function deselectPoint() {\n if (selectedId !== null) {\n map.setLayoutProperty(unclusteredLayerId, \"icon-image\", \"inactive-marker\");\n selectedId = null;\n }\n }\n const popupRender = options.popupRender\n ? options.popupRender\n : getPopupRenderFunction(unclusteredLayerId, options);\n addUnclusteredMarkerImages(map, options);\n const defaultUnclusteredPoint = {\n id: unclusteredLayerId,\n type: \"symbol\",\n source: sourceName,\n filter: [\"!\", [\"has\", \"point_count\"]],\n layout: {\n \"icon-image\": \"inactive-marker\",\n },\n };\n map.addLayer(Object.assign({}, defaultUnclusteredPoint));\n /*\n * Add css to header to hide default popup tip\n */\n if (showMarkerPopup) {\n const element = document.getElementById(HIDE_TIP);\n if (!element) {\n const style = document.createElement(\"style\");\n style.setAttribute(\"id\", HIDE_TIP);\n document.head.append(style);\n style.textContent = \".mapboxgl-popup-tip { display: none; }\";\n }\n }\n map.on(\"click\", function () {\n deselectPoint();\n });\n /*\n * Set active state on markers when clicked\n */\n map.on(\"click\", unclusteredLayerId, function (e) {\n if (typeof options.onClick === \"function\")\n options.onClick(e);\n selectedId = e.features[0].id;\n map.setLayoutProperty(unclusteredLayerId, \"icon-image\", [\n \"match\",\n [\"id\"],\n selectedId,\n \"active-marker\",\n \"inactive-marker\", // default\n ]);\n // If popup option is set show a popup on click\n if (showMarkerPopup) {\n const selectedFeature = e.features[0];\n const coordinates = selectedFeature.geometry.coordinates;\n if (isCoordinates(coordinates)) {\n const popup = new Popup()\n .setLngLat(coordinates)\n .setHTML(popupRender(selectedFeature))\n .setOffset(15)\n .addTo(map);\n popup.on(\"close\", function () {\n if (selectedId === selectedFeature.id)\n deselectPoint();\n });\n }\n }\n });\n /*\n * Set cursor style to pointer when mousing over point layer\n */\n map.on(\"mouseover\", unclusteredLayerId, function () {\n map.getCanvas().style.cursor = \"pointer\";\n });\n /*\n * Reset cursor style when the point layer\n */\n map.on(\"mouseleave\", unclusteredLayerId, () => {\n map.getCanvas().style.cursor = \"\";\n });\n return { unclusteredLayerId };\n}\n/*\n * Adds marker images to the maplibre canvas to be used for rendering unclustered points\n */\nfunction addUnclusteredMarkerImages(map, { selectedColor = ACTIVE_MARKER_COLOR, selectedBorderColor = COLOR_WHITE, selectedBorderWidth = 4, defaultBorderColor = COLOR_WHITE, defaultBorderWidth = 4, defaultColor: fillColor = MARKER_COLOR, }) {\n const inactiveMarker = createMarker({\n fillColor: fillColor,\n strokeColor: defaultBorderColor,\n lineWidth: defaultBorderWidth,\n });\n const activeMarker = createMarker({\n fillColor: selectedColor,\n strokeColor: selectedBorderColor,\n lineWidth: selectedBorderWidth,\n });\n map.addImage(\"inactive-marker\", inactiveMarker, { pixelRatio: 2 });\n map.addImage(\"active-marker\", activeMarker, { pixelRatio: 2 });\n}\n//# sourceMappingURL=drawUnclusteredLayer.js.map","import { getFeaturesFromData } from \"./utils\";\nimport { drawClusterLayer } from \"./drawClusterLayer\";\nimport { drawUnclusteredLayer } from \"./drawUnclusteredLayer\";\n/**\n * DrawPoints utility function for adding points to a map based on coordinate data or a FeatureCollection. Will add clustered points and styled markers by default with options for popups and other styles\n * @param {String} sourceName A user defined name used for determining the maplibre data source and the maplibre layers\n * @param {Coordinate[] | Feature[]} data An array of coordinate data or GeoJSON Features used as the data source for maplibre\n * @param {maplibre-gl-js-Map} map A maplibre-gl-js [map](https://maplibre.org/maplibre-gl-js-docs/api/map/) on which the points will be drawn\n * @param {Object} options An object containing options for changing the styles and features of the points rendered to the map, see the options for more details on available settings\n * @param {String} options.showCluster Determines whether or not points close together should be clustered into a single point\n * @param {String} options.clusterOptions Object for determining cluster options, see [ClusterOptions](https://github.com/aws-amplify/maplibre-gl-js-amplify/blob/main/src/types.ts#L43) for more details\n * @param {String} options.unclusteredOptions Object for determining unclustered point options, see [UnclusteredOptions](https://github.com/aws-amplify/maplibre-gl-js-amplify/blob/main/src/types.ts#L8) for more details\n * @param {MAP_STYLE} mapStyle A required parameter that indicates the map style returned from Amazon Location Service. This is used to determine the default fonts to be used with maplibre-gl-js. View existing styles [here](https://github.com/aws-amplify/maplibre-gl-js-amplify/blob/main/src/constants.ts#L8)\n * @returns {DrawPointsOutput} output An object containing the string id's of the sources and layers used to draw the points to the map. This includes the sourceId, clusterLayerId, clusterSymbolLayerId, unclusteredLayerId.\n * @property {String} sourceId The [source](https://maplibre.org/maplibre-gl-js-docs/api/sources/) used to contain all of the coordinate/feature data\n * @property {String} clusterLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) used for creating and styling the points that are clustered together\n * @property {String} clusterSymbolLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#symbol) used for creating styling the number that shows the count of points in a cluster\n * @property {String} unclusteredLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers) used for creating and styling the individual points on the map and the popup when clicking on a point\n */\nexport function drawPoints(sourceName, data, map, { showCluster = true, clusterOptions = {}, unclusteredOptions: unclusteredMarkerOptions = {}, } = {}, mapStyle) {\n var _a, _b;\n if (!map ||\n typeof map.addSource !== \"function\" ||\n typeof map.addLayer !== \"function\") {\n throw new Error(\"Please use a maplibre map\");\n }\n /*\n * Convert data passed in as coordinates into features\n */\n const features = getFeaturesFromData(data);\n /*\n * Data source for features\n */\n const sourceId = `${sourceName}-source-points`;\n map.addSource(sourceId, {\n type: \"geojson\",\n data: {\n type: \"FeatureCollection\",\n features,\n },\n cluster: showCluster,\n clusterMaxZoom: (_a = clusterOptions.clusterMaxZoom) !== null && _a !== void 0 ? _a : 14,\n clusterRadius: (_b = clusterOptions.smCircleSize) !== null && _b !== void 0 ? _b : 60,\n generateId: true,\n });\n /*\n * Draw ui layers for source data\n */\n let clusterLayerId, clusterSymbolLayerId;\n if (showCluster) {\n ({ clusterLayerId, clusterSymbolLayerId } = drawClusterLayer(sourceId, map, clusterOptions, mapStyle));\n }\n const { unclusteredLayerId } = drawUnclusteredLayer(sourceId, map, unclusteredMarkerOptions || {});\n // utility function for setting layer visibility to none\n const hide = () => {\n map.setLayoutProperty(unclusteredLayerId, \"visibility\", \"none\");\n if (clusterLayerId)\n map.setLayoutProperty(clusterLayerId, \"visibility\", \"none\");\n if (clusterSymbolLayerId)\n map.setLayoutProperty(clusterSymbolLayerId, \"visibility\", \"none\");\n };\n // utility function for setting layer visibility to visible\n const show = () => {\n map.setLayoutProperty(unclusteredLayerId, \"visibility\", \"visible\");\n if (clusterLayerId)\n map.setLayoutProperty(clusterLayerId, \"visibility\", \"visible\");\n if (clusterSymbolLayerId)\n map.setLayoutProperty(clusterSymbolLayerId, \"visibility\", \"visible\");\n };\n // utility function updating the data source\n const setData = (data) => {\n const features = getFeaturesFromData(data);\n map.getSource(sourceId).setData({\n type: \"FeatureCollection\",\n features,\n });\n };\n return {\n sourceId,\n unclusteredLayerId,\n clusterLayerId,\n clusterSymbolLayerId,\n setData,\n show,\n hide,\n };\n}\n//# sourceMappingURL=drawPoints.js.map","import { LOCATION_MARKER } from \"./constants\";\nexport function createDefaultIcon() {\n const customIcon = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n const iconPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n const iconCircle = document.createElement(\"circle\");\n customIcon.setAttribute(\"viewBox\", \"0 0 64 64\");\n customIcon.setAttribute(\"width\", \"32\");\n customIcon.setAttribute(\"height\", \"32\");\n iconPath.setAttribute(\"d\", LOCATION_MARKER);\n iconPath.setAttribute(\"fill\", \"#5d8aff\");\n iconCircle.setAttribute(\"fill\", \"white\");\n iconCircle.setAttribute(\"cx\", \"50%\");\n iconCircle.setAttribute(\"cy\", \"50%\");\n iconCircle.setAttribute(\"r\", \"5\");\n customIcon.appendChild(iconCircle);\n customIcon.appendChild(iconPath);\n return customIcon;\n}\n//# sourceMappingURL=createDefaultIcon.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { Geo } from \"@aws-amplify/geo\";\nimport MaplibreGeocoder from \"@maplibre/maplibre-gl-geocoder\";\nimport maplibregl from \"maplibre-gl\";\nimport { createDefaultIcon } from \"./createDefaultIcon\";\nexport const AmplifyGeocoderAPI = {\n forwardGeocode: (config) => __awaiter(void 0, void 0, void 0, function* () {\n const features = [];\n try {\n const data = yield Geo.searchByText(config.query, {\n biasPosition: config.proximity,\n searchAreaConstraints: config.bbox,\n countries: config.countires,\n maxResults: config.limit,\n });\n if (data) {\n data.forEach((result) => {\n const { geometry } = result, otherResults = __rest(result, [\"geometry\"]);\n features.push({\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: geometry.point },\n properties: Object.assign({}, otherResults),\n place_name: otherResults.label,\n text: otherResults.label,\n center: geometry.point,\n });\n });\n }\n }\n catch (e) {\n console.error(`Failed to forwardGeocode with error: ${e}`);\n }\n return { features };\n }),\n reverseGeocode: (config) => __awaiter(void 0, void 0, void 0, function* () {\n const features = [];\n try {\n const data = yield Geo.searchByCoordinates(config.query, {\n maxResults: config.limit,\n });\n if (data && data.geometry) {\n const { geometry } = data, otherResults = __rest(data, [\"geometry\"]);\n features.push({\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: geometry.point },\n properties: Object.assign({}, otherResults),\n place_name: otherResults.label,\n text: otherResults.label,\n center: geometry.point,\n });\n }\n }\n catch (e) {\n console.error(`Failed to reverseGeocode with error: ${e}`);\n }\n return { features };\n }),\n};\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createAmplifyGeocoder(options) {\n return new MaplibreGeocoder(AmplifyGeocoderAPI, Object.assign({ maplibregl: maplibregl, showResultMarkers: { element: createDefaultIcon() }, marker: { element: createDefaultIcon() } }, options));\n}\n//# sourceMappingURL=AmplifyMapLibreGeocoder.js.map","import { isGeofence } from \"./utils\";\nimport { COLOR_BLACK } from \"./constants\";\nconst FILL_OPACITY = 0.3;\nconst BORDER_OPACITY = 0.5;\nconst BORDER_WIDTH = 4;\n/**\n * DrawPoints utility function for adding points to a map based on coordinate data or a FeatureCollection. Will add clustered points and styled markers by default with options for popups and other styles\n */\nexport function drawGeofences(sourceName, data, map, options = {}) {\n var _a, _b, _c, _d, _e;\n if (!map ||\n typeof map.addSource !== \"function\" ||\n typeof map.addLayer !== \"function\") {\n throw new Error(\"Please use a maplibre map\");\n }\n /*\n * Convert data passed in as coordinates into features\n */\n const features = getGeofenceFeaturesFromData(data);\n /*\n * Data source for features\n */\n const sourceId = `${sourceName}-source`;\n map.addSource(sourceId, {\n type: \"geojson\",\n data: {\n type: \"FeatureCollection\",\n features,\n },\n generateId: true,\n });\n /*\n * Draw ui layers for source data\n */\n // Add a new layer to visualize the polygon.\n const fillLayerId = `${sourceName}-fill-layer`;\n map.addLayer({\n id: fillLayerId,\n type: \"fill\",\n source: sourceId,\n layout: {\n visibility: \"visible\",\n },\n paint: {\n \"fill-color\": (_a = options.fillColor) !== null && _a !== void 0 ? _a : COLOR_BLACK,\n \"fill-opacity\": (_b = options.fillOpacity) !== null && _b !== void 0 ? _b : FILL_OPACITY,\n },\n });\n // Add a black outline around the polygon.\n const outlineLayerId = `${sourceName}-outline-layer`;\n map.addLayer({\n id: outlineLayerId,\n type: \"line\",\n source: sourceId,\n layout: {\n visibility: \"visible\",\n },\n paint: {\n \"line-color\": (_c = options.borderColor) !== null && _c !== void 0 ? _c : COLOR_BLACK,\n \"line-opacity\": (_d = options.borderOpacity) !== null && _d !== void 0 ? _d : BORDER_OPACITY,\n \"line-width\": (_e = options.borderWidth) !== null && _e !== void 0 ? _e : BORDER_WIDTH,\n },\n });\n // utility function for setting layer visibility to none\n const hide = () => {\n map.setLayoutProperty(fillLayerId, \"visibility\", \"none\");\n map.setLayoutProperty(outlineLayerId, \"visibility\", \"none\");\n };\n // utility function for setting layer visibility to visible\n const show = () => {\n map.setLayoutProperty(fillLayerId, \"visibility\", \"visible\");\n map.setLayoutProperty(outlineLayerId, \"visibility\", \"visible\");\n };\n return { sourceId, outlineLayerId, fillLayerId, show, hide };\n}\nconst getGeofenceFeaturesFromData = (data) => {\n const features = data.map((item) => {\n const coordinates = isGeofence(item) ? item.geometry.polygon : item;\n return {\n type: \"Feature\",\n geometry: {\n type: \"Polygon\",\n coordinates,\n },\n properties: {},\n };\n });\n return features;\n};\n//# sourceMappingURL=drawGeofences.js.map"],"names":["__awaiter","this","__rest","Amplify","jitteredExponentialRetry","getAmplifyUserAgent","Signer","Hub","MaplibreMap","Geo","Popup","MaplibreGeocoder","maplibregl"],"mappings":";;;;;;;;;;;IAAO,SAAS,aAAa,CAAC,KAAK,EAAE;IACrC,IAAI,QAAQ,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IAChC,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ;IACpC,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;IACtC,CAAC;IACM,SAAS,kBAAkB,CAAC,KAAK,EAAE;IAC1C,IAAI,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IACM,SAAS,eAAe,CAAC,MAAM,EAAE;IACxC,IAAI,QAAQ,MAAM;IAClB,QAAQ,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;IACzC,QAAQ,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,QAAQ;IACjD,QAAQ,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;IACnD,CAAC;IACM,SAAS,oBAAoB,CAAC,KAAK,EAAE;IAC5C,IAAI,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IACM,SAAS,UAAU,CAAC,MAAM,EAAE;IACnC,IAA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CAAC;IACvE,KAAK,CAAC;IACN,IAAI,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACjE,CAAC;IACD,MAAM,2BAA2B,GAAG,CAAC,IAAI,KAAK;IAC9C,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK;IACxC,QAAQ,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5E,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,SAAS;IAC3B,YAAY,QAAQ,EAAE;IACtB,gBAAgB,IAAI,EAAE,SAAS;IAC/B,gBAAgB,WAAW;IAC3B,aAAa;IACb,YAAY,UAAU,EAAE,EAAE;IAC1B,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,IAAI,OAAO,QAAQ,CAAC;IACpB,CAAC;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"maplibre-gl-js-amplify.umd.js","sources":["../lib/esm/utils.js","../lib/esm/AmplifyMapLibreRequest.js","../lib/esm/constants.js","../lib/esm/drawClusterLayer.js","../lib/esm/createMarker.js","../lib/esm/popupRender.js","../lib/esm/drawUnclusteredLayer.js","../lib/esm/drawPoints.js","../lib/esm/createDefaultIcon.js","../lib/esm/AmplifyMapLibreGeocoder.js","../lib/esm/drawGeofences.js"],"sourcesContent":["export function isCoordinates(array) {\n return (Array.isArray(array) &&\n typeof array[0] === \"number\" &&\n typeof array[1] === \"number\");\n}\nexport function isCoordinatesArray(array) {\n return isCoordinates(array[0]);\n}\nexport function isNamedLocation(object) {\n return (object &&\n Array.isArray(object.coordinates) &&\n typeof object.coordinates[0] === \"number\" &&\n typeof object.coordinates[1] === \"number\");\n}\nexport function isNamedLocationArray(array) {\n return isNamedLocation(array[0]);\n}\nexport function isGeofence(object) {\n return (object &&\n typeof object.id === \"string\" &&\n typeof object.geometry === \"object\");\n}\nexport function isGeofenceArray(array) {\n return Array.isArray(array) && isGeofence(array[0]);\n}\nexport function isGeoJsonSource(source) {\n return source.type === \"geojson\";\n}\nexport const strHasLength = (str) => typeof str === \"string\" && str.length > 0;\nexport const getFeaturesFromData = (data) => {\n let features;\n if (isCoordinatesArray(data)) {\n features = data.map((point) => {\n return {\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: point },\n properties: { place_name: `Coordinates,${point}` },\n };\n });\n }\n else if (isNamedLocationArray(data)) {\n features = data.map((location) => {\n return {\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: location.coordinates },\n properties: { title: location.title, address: location.address },\n };\n });\n }\n else {\n features = data;\n }\n return features;\n};\nexport const urlEncodePeriods = (str) => {\n return str.replace(/\\./g, \"%2E\");\n};\n//# sourceMappingURL=utils.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar _a;\nimport { Amplify, Hub, Signer, jitteredExponentialRetry, getAmplifyUserAgent, } from \"@aws-amplify/core\";\nimport { Geo } from \"@aws-amplify/geo\";\nimport { Map as MaplibreMap, } from \"maplibre-gl\";\nimport { urlEncodePeriods } from \"./utils\";\n/**\n * An object for encapsulating an Amplify Geo transform request and Amplify credentials\n * @class AmplifyMapLibreRequest\n * @param {ICredentials} currentCredentials Amplify credentials used for signing transformRequests\n * @param {String} region AWS region\n * @return {AmplifyMapLibreRequest} `this`\n *\n */\nexport default class AmplifyMapLibreRequest {\n constructor(currentCredentials, region) {\n this.refreshCredentials = () => __awaiter(this, void 0, void 0, function* () {\n try {\n this.credentials = yield Amplify.Auth.currentCredentials();\n }\n catch (e) {\n console.error(`Failed to refresh credentials: ${e}`);\n throw e;\n }\n });\n this.refreshCredentialsWithRetry = () => __awaiter(this, void 0, void 0, function* () {\n try {\n const MAX_DELAY_MS = 5 * 60 * 1000; // 5 minutes\n yield jitteredExponentialRetry(this.refreshCredentials, [], MAX_DELAY_MS);\n // Refresh credentials on a timer because HubEvents do not trigger on credential refresh currently\n this.activeTimeout && clearTimeout(this.activeTimeout);\n const expiration = new Date(this.credentials.expiration);\n const timeout = expiration.getTime() - new Date().getTime() - 10000; // Adds a 10 second buffer time before the next refresh\n this.activeTimeout = window.setTimeout(this.refreshCredentialsWithRetry, timeout);\n }\n catch (e) {\n console.error(`Failed to refresh credentials: ${e}`);\n }\n });\n /**\n * A callback function that can be passed to a maplibre map object that is run before the map makes a request for an external URL. This transform request is used to sign the request with AWS Sigv4 Auth. [https://maplibre.org/maplibre-gl-js-docs/api/map/](https://maplibre.org/maplibre-gl-js-docs/api/map/)\n * @param {string} url The function to use as a render function. This function accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and returns a string.\n * @param {string} resourceType The function to use as a render function. This function accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and returns a string.\n * @returns {RequestParameters} [https://maplibre.org/maplibre-gl-js-docs/api/properties/#requestparameters](https://maplibre.org/maplibre-gl-js-docs/api/properties/#requestparameters)\n */\n this.transformRequest = (url, resourceType) => {\n if (resourceType === \"Style\" && !url.includes(\"://\")) {\n if (this.region == undefined) {\n throw new Error(\"AWS region for map is undefined. Please verify that the region is set in aws-exports.js or that you are providing an AWS region parameter to createMap\");\n }\n url = `https://maps.geo.${this.region}.amazonaws.com/maps/v0/maps/${url}/style-descriptor`;\n }\n if (url.includes(\"amazonaws.com\")) {\n // only sign AWS requests (with the signature as part of the query string)\n const urlWithUserAgent = url +\n `?x-amz-user-agent=${encodeURIComponent(urlEncodePeriods(getAmplifyUserAgent()))}`;\n return {\n url: Signer.signUrl(urlWithUserAgent, {\n access_key: this.credentials.accessKeyId,\n secret_key: this.credentials.secretAccessKey,\n session_token: this.credentials.sessionToken,\n }),\n };\n }\n };\n this.credentials = currentCredentials;\n this.region = region;\n this.activeTimeout = null;\n this.refreshCredentialsWithRetry();\n Hub.listen(\"auth\", (data) => {\n switch (data.payload.event) {\n case \"signIn\":\n case \"signOut\":\n case \"tokenRefresh\":\n this.refreshCredentialsWithRetry();\n break;\n }\n });\n }\n}\n_a = AmplifyMapLibreRequest;\nAmplifyMapLibreRequest.createMapLibreMap = (options) => __awaiter(void 0, void 0, void 0, function* () {\n const { region, mapConstructor = MaplibreMap } = options, maplibreOption = __rest(options, [\"region\", \"mapConstructor\"]);\n const defaultMap = Geo.getDefaultMap();\n const amplifyRequest = new AmplifyMapLibreRequest(yield Amplify.Auth.currentCredentials(), region || defaultMap.region);\n const transformRequest = amplifyRequest.transformRequest;\n const map = new mapConstructor(Object.assign(Object.assign({}, maplibreOption), { style: options.style || defaultMap.mapName, // Amplify uses the name of the map in the maplibre style field,\n transformRequest }));\n return map;\n});\nexport const createMap = (options) => __awaiter(void 0, void 0, void 0, function* () {\n return AmplifyMapLibreRequest.createMapLibreMap(options);\n});\n//# sourceMappingURL=AmplifyMapLibreRequest.js.map","export const COLOR_WHITE = \"#fff\";\nexport const COLOR_BLACK = \"#000\";\nexport const MARKER_COLOR = \"#5d8aff\";\nexport const ACTIVE_MARKER_COLOR = \"#ff9900\";\nexport const POPUP_BORDER_COLOR = \"#0000001f\";\nexport const LOCATION_MARKER = \"M24.8133 38.533C18.76 31.493 13 28.8264 13 20.8264C13.4827 14.9864 16.552 9.67169 21.368 6.33302C33.768 -2.26165 50.824 5.78902 52.0667 20.8264C52.0667 28.613 46.5733 31.6797 40.6533 38.373C32.4933 47.5464 35.4 63.093 32.4933 63.093C29.72 63.093 32.4933 47.5464 24.8133 38.533ZM32.4933 8.23969C26.5573 8.23969 21.7467 13.0504 21.7467 18.9864C21.7467 24.9224 26.5573 29.733 32.4933 29.733C38.4293 29.733 43.24 24.9224 43.24 18.9864C43.24 13.0504 38.4293 8.23969 32.4933 8.23969Z\";\nexport const OLD_MARKER = \"M30 16C30 18.5747 29.1348 21.3832 27.7111 24.2306C26.2947 27.0635 24.3846 29.8177 22.4383 32.2506C20.4964 34.678 18.5493 36.7473 17.0858 38.2108C16.6828 38.6138 16.3174 38.9699 16 39.2739C15.6826 38.9699 15.3172 38.6138 14.9142 38.2108C13.4507 36.7473 11.5036 34.678 9.56174 32.2506C7.61543 29.8177 5.70531 27.0635 4.28885 24.2306C2.86518 21.3832 2 18.5747 2 16C2 8.26801 8.26801 2 16 2C23.732 2 30 8.26801 30 16Z\";\n// Map styles exist due to an issue with Amazon Location Service not supporting the default set of maplibre fonts\nexport var MAP_STYLES;\n(function (MAP_STYLES) {\n MAP_STYLES[\"ESRI_TOPOGRAPHIC\"] = \"VectorEsriTopographic\";\n MAP_STYLES[\"ESRI_STREETS\"] = \"VectorEsriStreets\";\n MAP_STYLES[\"ESRI_LIGHT_GRAY\"] = \"VectorEsriLightGrayCanvas\";\n MAP_STYLES[\"ESRI_DARK_GRAY\"] = \"VectorEsriDarkGrayCanvas\";\n MAP_STYLES[\"ESRI_NAVIGATION\"] = \"VectorEsriNavigation\";\n MAP_STYLES[\"HERE_BERLIN\"] = \"VectorHereBerlin\";\n})(MAP_STYLES || (MAP_STYLES = {}));\nexport const FONT_DEFAULT_BY_STYLE = {\n [MAP_STYLES.ESRI_TOPOGRAPHIC]: \"Noto Sans Regular\",\n [MAP_STYLES.ESRI_STREETS]: \"Arial Regular\",\n [MAP_STYLES.ESRI_LIGHT_GRAY]: \"Ubuntu Regular\",\n [MAP_STYLES.ESRI_DARK_GRAY]: \"Ubuntu Regular\",\n [MAP_STYLES.ESRI_NAVIGATION]: \"Arial Regular\",\n [MAP_STYLES.HERE_BERLIN]: \"Fira GO Regular\",\n};\n//# sourceMappingURL=constants.js.map","import { Geo } from \"@aws-amplify/geo\";\nimport { COLOR_WHITE, MARKER_COLOR } from \"./constants\";\nimport { isGeoJsonSource } from \"./utils\";\nimport { FONT_DEFAULT_BY_STYLE } from \"./constants\";\nexport function drawClusterLayer(sourceName, map, { fillColor: markerColor = MARKER_COLOR, smCircleSize: smallSize = 60, smThreshold: smallThreshold = 50, mdCircleSize: mediumSize = 100, mdThreshold: mediumThreshold = 100, lgCircleSize: largeSize = 140, lgThreshold: largeThreshold = 500, xlCircleSize: extraLargeSize = 180, borderWidth = 4, borderColor = COLOR_WHITE, clusterPaint, onClick, showCount, clusterCountLayout, fontColor = COLOR_WHITE, }, mapStyle) {\n const clusterLayerId = `${sourceName}-layer-clusters`;\n const clusterSymbolLayerId = `${sourceName}-layer-cluster-count`;\n // Use step expressions for clusters (https://docs.mapbox.com/mapbox-gl-js/style-spec/#expressions-step)\n const paintOptions = Object.assign({ \"circle-color\": [\n \"step\",\n [\"get\", \"point_count\"],\n markerColor,\n smallThreshold,\n markerColor,\n mediumThreshold,\n markerColor,\n largeThreshold,\n markerColor,\n ], \"circle-radius\": [\n \"step\",\n [\"get\", \"point_count\"],\n smallSize,\n smallThreshold,\n mediumSize,\n mediumThreshold,\n largeSize,\n largeThreshold,\n extraLargeSize,\n ], \"circle-stroke-width\": borderWidth, \"circle-stroke-color\": borderColor }, clusterPaint);\n const defaultClusterLayer = {\n id: clusterLayerId,\n type: \"circle\",\n source: sourceName,\n filter: [\"has\", \"point_count\"],\n paint: paintOptions,\n };\n map.addLayer(Object.assign({}, defaultClusterLayer));\n /*\n * Inspect cluster on click\n */\n map.on(\"click\", clusterLayerId, function (e) {\n if (typeof onClick === \"function\")\n onClick(e);\n const features = map.queryRenderedFeatures(e.point, {\n layers: [clusterLayerId],\n });\n const clusterId = features[0].properties.cluster_id;\n const source = map.getSource(sourceName);\n if (isGeoJsonSource(source)) {\n source.getClusterExpansionZoom(clusterId, function (err, zoom) {\n if (err)\n return;\n map.easeTo({\n center: features[0].geometry.coordinates,\n zoom: zoom,\n });\n });\n }\n });\n /*\n * Symbol Layer for cluster point count\n */\n if (showCount) {\n const defaultLayoutOptions = {\n \"text-field\": \"{point_count_abbreviated}\",\n \"text-size\": 24,\n };\n const locationServiceStyle = mapStyle || Geo.getDefaultMap().style;\n if (locationServiceStyle) {\n defaultLayoutOptions[\"text-font\"] = [\n FONT_DEFAULT_BY_STYLE[locationServiceStyle],\n ];\n }\n const layoutOptions = Object.assign(Object.assign({}, defaultLayoutOptions), clusterCountLayout);\n const paintOptions = {\n \"text-color\": fontColor,\n };\n const defaultClusterCount = {\n id: clusterSymbolLayerId,\n type: \"symbol\",\n source: sourceName,\n filter: [\"has\", \"point_count\"],\n layout: layoutOptions,\n paint: paintOptions,\n };\n map.addLayer(Object.assign({}, defaultClusterCount));\n }\n return { clusterLayerId, clusterSymbolLayerId };\n}\n//# sourceMappingURL=drawClusterLayer.js.map","import { COLOR_WHITE, MARKER_COLOR, LOCATION_MARKER } from \"./constants\";\nexport function createMarker(options) {\n const fillColor = (options === null || options === void 0 ? void 0 : options.fillColor) ? options.fillColor : MARKER_COLOR;\n const strokeColor = (options === null || options === void 0 ? void 0 : options.strokeColor) ? options.strokeColor : COLOR_WHITE;\n const lineWidth = (options === null || options === void 0 ? void 0 : options.lineWidth) ? options.lineWidth : 4;\n return {\n width: 64,\n height: 64,\n data: new Uint8Array(64 * 64 * 4),\n onAdd: function () {\n const canvas = document.createElement(\"canvas\");\n canvas.width = this.width;\n canvas.height = this.height;\n this.context = canvas.getContext(\"2d\");\n },\n render: function () {\n const context = this.context;\n const markerShape = new Path2D(LOCATION_MARKER);\n context.stroke(markerShape);\n context.fillStyle = fillColor;\n context.strokeStyle = strokeColor;\n context.lineWidth = lineWidth;\n context.fill(markerShape);\n this.data = context.getImageData(0, 0, this.width, this.height).data;\n return true;\n },\n };\n}\n//# sourceMappingURL=createMarker.js.map","import { strHasLength } from \"./utils\";\nimport { COLOR_BLACK, COLOR_WHITE, POPUP_BORDER_COLOR } from \"./constants\";\nexport function getPopupRenderFunction(unclusteredLayerId, { popupBackgroundColor: background = COLOR_WHITE, popupBorderColor: borderColor = POPUP_BORDER_COLOR, popupBorderWidth: borderWidth = 2, popupFontColor: fontColor = COLOR_BLACK, popupPadding: padding = 20, popupBorderRadius: radius = 4, popupTitleFontWeight: fontWeight = \"bold\", }) {\n return (selectedFeature) => {\n let title, address;\n // Try to get Title and address from existing feature properties\n if (strHasLength(selectedFeature.properties.place_name)) {\n const placeName = selectedFeature.properties.place_name.split(\",\");\n title = placeName[0];\n address = placeName.splice(1, placeName.length).join(\",\");\n }\n else if (strHasLength(selectedFeature.properties.title) ||\n strHasLength(selectedFeature.properties.address)) {\n title = selectedFeature.properties.title;\n address = selectedFeature.properties.address;\n }\n else {\n title = \"Coordinates\";\n address = selectedFeature.geometry.coordinates;\n }\n const titleHtml = `<div class=\"${unclusteredLayerId}-popup-title\" style=\"font-weight: ${fontWeight};\">${title}</div>`;\n const addressHtml = `<div class=\"${unclusteredLayerId}-popup-address\">${address}</div>`;\n const popupHtmlStyle = `background: ${background}; border: ${borderWidth}px solid ${borderColor}; color: ${fontColor}; border-radius: ${radius}px; padding: ${padding}px; word-wrap: break-word; margin: -10px -10px -15px;`;\n let popupHtml = `<div class=\"${unclusteredLayerId}-popup\" style=\"${popupHtmlStyle}\">`;\n if (title)\n popupHtml += titleHtml;\n if (address)\n popupHtml += addressHtml;\n popupHtml += \"</div>\";\n return popupHtml;\n };\n}\n//# sourceMappingURL=popupRender.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { Popup } from \"maplibre-gl\";\nimport { ACTIVE_MARKER_COLOR, COLOR_WHITE, MARKER_COLOR } from \"./constants\";\nimport { createMarker } from \"./createMarker\";\nimport { getPopupRenderFunction } from \"./popupRender\";\nimport { isCoordinates } from \"./utils\";\nconst HIDE_TIP = \"amplify-tip\";\nexport function drawUnclusteredLayer(sourceName, map, _a) {\n var { showMarkerPopup = false } = _a, options = __rest(_a, [\"showMarkerPopup\"]);\n const unclusteredLayerId = `${sourceName}-layer-unclustered-point`;\n let selectedId = null;\n function deselectPoint() {\n if (selectedId !== null) {\n map.setLayoutProperty(unclusteredLayerId, \"icon-image\", \"inactive-marker\");\n selectedId = null;\n }\n }\n const popupRender = options.popupRender\n ? options.popupRender\n : getPopupRenderFunction(unclusteredLayerId, options);\n addUnclusteredMarkerImages(map, options);\n const defaultUnclusteredPoint = {\n id: unclusteredLayerId,\n type: \"symbol\",\n source: sourceName,\n filter: [\"!\", [\"has\", \"point_count\"]],\n layout: {\n \"icon-image\": \"inactive-marker\",\n },\n };\n map.addLayer(Object.assign({}, defaultUnclusteredPoint));\n /*\n * Add css to header to hide default popup tip\n */\n if (showMarkerPopup) {\n const element = document.getElementById(HIDE_TIP);\n if (!element) {\n const style = document.createElement(\"style\");\n style.setAttribute(\"id\", HIDE_TIP);\n document.head.append(style);\n style.textContent = \".mapboxgl-popup-tip { display: none; }\";\n }\n }\n map.on(\"click\", function () {\n deselectPoint();\n });\n /*\n * Set active state on markers when clicked\n */\n map.on(\"click\", unclusteredLayerId, function (e) {\n if (typeof options.onClick === \"function\")\n options.onClick(e);\n selectedId = e.features[0].id;\n map.setLayoutProperty(unclusteredLayerId, \"icon-image\", [\n \"match\",\n [\"id\"],\n selectedId,\n \"active-marker\",\n \"inactive-marker\", // default\n ]);\n // If popup option is set show a popup on click\n if (showMarkerPopup) {\n const selectedFeature = e.features[0];\n const coordinates = selectedFeature.geometry.coordinates;\n if (isCoordinates(coordinates)) {\n const popup = new Popup()\n .setLngLat(coordinates)\n .setHTML(popupRender(selectedFeature))\n .setOffset(15)\n .addTo(map);\n popup.on(\"close\", function () {\n if (selectedId === selectedFeature.id)\n deselectPoint();\n });\n }\n }\n });\n /*\n * Set cursor style to pointer when mousing over point layer\n */\n map.on(\"mouseover\", unclusteredLayerId, function () {\n map.getCanvas().style.cursor = \"pointer\";\n });\n /*\n * Reset cursor style when the point layer\n */\n map.on(\"mouseleave\", unclusteredLayerId, () => {\n map.getCanvas().style.cursor = \"\";\n });\n return { unclusteredLayerId };\n}\n/*\n * Adds marker images to the maplibre canvas to be used for rendering unclustered points\n */\nfunction addUnclusteredMarkerImages(map, { selectedColor = ACTIVE_MARKER_COLOR, selectedBorderColor = COLOR_WHITE, selectedBorderWidth = 4, defaultBorderColor = COLOR_WHITE, defaultBorderWidth = 4, defaultColor: fillColor = MARKER_COLOR, }) {\n const inactiveMarker = createMarker({\n fillColor: fillColor,\n strokeColor: defaultBorderColor,\n lineWidth: defaultBorderWidth,\n });\n const activeMarker = createMarker({\n fillColor: selectedColor,\n strokeColor: selectedBorderColor,\n lineWidth: selectedBorderWidth,\n });\n map.addImage(\"inactive-marker\", inactiveMarker, { pixelRatio: 2 });\n map.addImage(\"active-marker\", activeMarker, { pixelRatio: 2 });\n}\n//# sourceMappingURL=drawUnclusteredLayer.js.map","import { getFeaturesFromData } from \"./utils\";\nimport { drawClusterLayer } from \"./drawClusterLayer\";\nimport { drawUnclusteredLayer } from \"./drawUnclusteredLayer\";\n/**\n * DrawPoints utility function for adding points to a map based on coordinate data or a FeatureCollection. Will add clustered points and styled markers by default with options for popups and other styles\n * @param {String} sourceName A user defined name used for determining the maplibre data source and the maplibre layers\n * @param {Coordinate[] | Feature[]} data An array of coordinate data or GeoJSON Features used as the data source for maplibre\n * @param {maplibre-gl-js-Map} map A maplibre-gl-js [map](https://maplibre.org/maplibre-gl-js-docs/api/map/) on which the points will be drawn\n * @param {Object} options An object containing options for changing the styles and features of the points rendered to the map, see the options for more details on available settings\n * @param {String} options.showCluster Determines whether or not points close together should be clustered into a single point\n * @param {String} options.clusterOptions Object for determining cluster options, see [ClusterOptions](https://github.com/aws-amplify/maplibre-gl-js-amplify/blob/main/src/types.ts#L43) for more details\n * @param {String} options.unclusteredOptions Object for determining unclustered point options, see [UnclusteredOptions](https://github.com/aws-amplify/maplibre-gl-js-amplify/blob/main/src/types.ts#L8) for more details\n * @param {MAP_STYLE} mapStyle A required parameter that indicates the map style returned from Amazon Location Service. This is used to determine the default fonts to be used with maplibre-gl-js. View existing styles [here](https://github.com/aws-amplify/maplibre-gl-js-amplify/blob/main/src/constants.ts#L8)\n * @returns {DrawPointsOutput} output An object containing the string id's of the sources and layers used to draw the points to the map. This includes the sourceId, clusterLayerId, clusterSymbolLayerId, unclusteredLayerId.\n * @property {String} sourceId The [source](https://maplibre.org/maplibre-gl-js-docs/api/sources/) used to contain all of the coordinate/feature data\n * @property {String} clusterLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) used for creating and styling the points that are clustered together\n * @property {String} clusterSymbolLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#symbol) used for creating styling the number that shows the count of points in a cluster\n * @property {String} unclusteredLayerId The [layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers) used for creating and styling the individual points on the map and the popup when clicking on a point\n */\nexport function drawPoints(sourceName, data, map, { showCluster = true, clusterOptions = {}, unclusteredOptions: unclusteredMarkerOptions = {}, autoFit = true, } = {}, mapStyle) {\n var _a, _b;\n if (!map ||\n typeof map.addSource !== \"function\" ||\n typeof map.addLayer !== \"function\") {\n throw new Error(\"Please use a maplibre map\");\n }\n /*\n * Convert data passed in as coordinates into features\n */\n const features = getFeaturesFromData(data);\n /*\n * Data source for features\n */\n const sourceId = `${sourceName}-source-points`;\n map.addSource(sourceId, {\n type: \"geojson\",\n data: {\n type: \"FeatureCollection\",\n features,\n },\n cluster: showCluster,\n clusterMaxZoom: (_a = clusterOptions.clusterMaxZoom) !== null && _a !== void 0 ? _a : 14,\n clusterRadius: (_b = clusterOptions.smCircleSize) !== null && _b !== void 0 ? _b : 60,\n generateId: true,\n });\n /*\n * Draw ui layers for source data\n */\n let clusterLayerId, clusterSymbolLayerId;\n if (showCluster) {\n ({ clusterLayerId, clusterSymbolLayerId } = drawClusterLayer(sourceId, map, clusterOptions, mapStyle));\n }\n const { unclusteredLayerId } = drawUnclusteredLayer(sourceId, map, unclusteredMarkerOptions || {});\n if (autoFit) {\n const mapBounds = map.getBounds();\n features.forEach(function (feature) {\n mapBounds.extend(feature.geometry.coordinates);\n });\n map.fitBounds(mapBounds);\n }\n // utility function for setting layer visibility to none\n const hide = () => {\n map.setLayoutProperty(unclusteredLayerId, \"visibility\", \"none\");\n if (clusterLayerId)\n map.setLayoutProperty(clusterLayerId, \"visibility\", \"none\");\n if (clusterSymbolLayerId)\n map.setLayoutProperty(clusterSymbolLayerId, \"visibility\", \"none\");\n };\n // utility function for setting layer visibility to visible\n const show = () => {\n map.setLayoutProperty(unclusteredLayerId, \"visibility\", \"visible\");\n if (clusterLayerId)\n map.setLayoutProperty(clusterLayerId, \"visibility\", \"visible\");\n if (clusterSymbolLayerId)\n map.setLayoutProperty(clusterSymbolLayerId, \"visibility\", \"visible\");\n };\n // utility function updating the data source\n const setData = (data) => {\n const features = getFeaturesFromData(data);\n map.getSource(sourceId).setData({\n type: \"FeatureCollection\",\n features,\n });\n };\n return {\n sourceId,\n unclusteredLayerId,\n clusterLayerId,\n clusterSymbolLayerId,\n setData,\n show,\n hide,\n };\n}\n//# sourceMappingURL=drawPoints.js.map","import { LOCATION_MARKER } from \"./constants\";\nexport function createDefaultIcon() {\n const customIcon = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n const iconPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n const iconCircle = document.createElement(\"circle\");\n customIcon.setAttribute(\"viewBox\", \"0 0 64 64\");\n customIcon.setAttribute(\"width\", \"32\");\n customIcon.setAttribute(\"height\", \"32\");\n iconPath.setAttribute(\"d\", LOCATION_MARKER);\n iconPath.setAttribute(\"fill\", \"#5d8aff\");\n iconCircle.setAttribute(\"fill\", \"white\");\n iconCircle.setAttribute(\"cx\", \"50%\");\n iconCircle.setAttribute(\"cy\", \"50%\");\n iconCircle.setAttribute(\"r\", \"5\");\n customIcon.appendChild(iconCircle);\n customIcon.appendChild(iconPath);\n return customIcon;\n}\n//# sourceMappingURL=createDefaultIcon.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { Geo } from \"@aws-amplify/geo\";\nimport MaplibreGeocoder from \"@maplibre/maplibre-gl-geocoder\";\nimport maplibregl from \"maplibre-gl\";\nimport { createDefaultIcon } from \"./createDefaultIcon\";\nexport const AmplifyGeocoderAPI = {\n forwardGeocode: (config) => __awaiter(void 0, void 0, void 0, function* () {\n const features = [];\n try {\n const data = yield Geo.searchByText(config.query, {\n biasPosition: config.proximity,\n searchAreaConstraints: config.bbox,\n countries: config.countries,\n maxResults: config.limit,\n });\n if (data) {\n data.forEach((result) => {\n const { geometry } = result, otherResults = __rest(result, [\"geometry\"]);\n features.push({\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: geometry.point },\n properties: Object.assign({}, otherResults),\n place_name: otherResults.label,\n text: otherResults.label,\n center: geometry.point,\n });\n });\n }\n }\n catch (e) {\n console.error(`Failed to forwardGeocode with error: ${e}`);\n }\n return { features };\n }),\n reverseGeocode: (config) => __awaiter(void 0, void 0, void 0, function* () {\n const features = [];\n try {\n const data = yield Geo.searchByCoordinates(config.query, {\n maxResults: config.limit,\n });\n if (data && data.geometry) {\n const { geometry } = data, otherResults = __rest(data, [\"geometry\"]);\n features.push({\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: geometry.point },\n properties: Object.assign({}, otherResults),\n place_name: otherResults.label,\n text: otherResults.label,\n center: geometry.point,\n });\n }\n }\n catch (e) {\n console.error(`Failed to reverseGeocode with error: ${e}`);\n }\n return { features };\n }),\n getSuggestions: (config) => __awaiter(void 0, void 0, void 0, function* () {\n const suggestions = [];\n try {\n const response = yield Geo.searchForSuggestions(config.query, {\n biasPosition: config.proximity,\n searchAreaConstraints: config.bbox,\n countries: config.countries,\n maxResults: config.limit,\n });\n suggestions.push(...response);\n }\n catch (e) {\n console.error(`Failed to get suggestions with error: ${e}`);\n }\n return { suggestions };\n }),\n};\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createAmplifyGeocoder(options) {\n return new MaplibreGeocoder(AmplifyGeocoderAPI, Object.assign({ maplibregl: maplibregl, showResultMarkers: { element: createDefaultIcon() }, marker: { element: createDefaultIcon() }, showResultsWhileTyping: (options === null || options === void 0 ? void 0 : options.autocomplete) === false ? false : true }, options));\n}\n//# sourceMappingURL=AmplifyMapLibreGeocoder.js.map","import { isGeofence } from \"./utils\";\nimport { COLOR_BLACK } from \"./constants\";\nconst FILL_OPACITY = 0.3;\nconst BORDER_OPACITY = 0.5;\nconst BORDER_WIDTH = 4;\n/**\n * DrawPoints utility function for adding points to a map based on coordinate data or a FeatureCollection. Will add clustered points and styled markers by default with options for popups and other styles\n */\nexport function drawGeofences(sourceName, data, map, options = {}) {\n var _a, _b, _c, _d, _e;\n if (!map ||\n typeof map.addSource !== \"function\" ||\n typeof map.addLayer !== \"function\") {\n throw new Error(\"Please use a maplibre map\");\n }\n /*\n * Convert data passed in as coordinates into features\n */\n const features = getGeofenceFeaturesFromData(data);\n /*\n * Data source for features\n */\n const sourceId = `${sourceName}-source`;\n map.addSource(sourceId, {\n type: \"geojson\",\n data: {\n type: \"FeatureCollection\",\n features,\n },\n generateId: true,\n });\n /*\n * Draw ui layers for source data\n */\n // Add a new layer to visualize the polygon.\n const fillLayerId = `${sourceName}-fill-layer`;\n map.addLayer({\n id: fillLayerId,\n type: \"fill\",\n source: sourceId,\n layout: {\n visibility: \"visible\",\n },\n paint: {\n \"fill-color\": (_a = options.fillColor) !== null && _a !== void 0 ? _a : COLOR_BLACK,\n \"fill-opacity\": (_b = options.fillOpacity) !== null && _b !== void 0 ? _b : FILL_OPACITY,\n },\n });\n // Add a black outline around the polygon.\n const outlineLayerId = `${sourceName}-outline-layer`;\n map.addLayer({\n id: outlineLayerId,\n type: \"line\",\n source: sourceId,\n layout: {\n visibility: \"visible\",\n },\n paint: {\n \"line-color\": (_c = options.borderColor) !== null && _c !== void 0 ? _c : COLOR_BLACK,\n \"line-opacity\": (_d = options.borderOpacity) !== null && _d !== void 0 ? _d : BORDER_OPACITY,\n \"line-width\": (_e = options.borderWidth) !== null && _e !== void 0 ? _e : BORDER_WIDTH,\n },\n });\n // utility function for setting layer visibility to none\n const hide = () => {\n map.setLayoutProperty(fillLayerId, \"visibility\", \"none\");\n map.setLayoutProperty(outlineLayerId, \"visibility\", \"none\");\n };\n // utility function for setting layer visibility to visible\n const show = () => {\n map.setLayoutProperty(fillLayerId, \"visibility\", \"visible\");\n map.setLayoutProperty(outlineLayerId, \"visibility\", \"visible\");\n };\n return { sourceId, outlineLayerId, fillLayerId, show, hide };\n}\nconst getGeofenceFeaturesFromData = (data) => {\n const features = data.map((item) => {\n const coordinates = isGeofence(item) ? item.geometry.polygon : item;\n return {\n type: \"Feature\",\n geometry: {\n type: \"Polygon\",\n coordinates,\n },\n properties: {},\n };\n });\n return features;\n};\n//# sourceMappingURL=drawGeofences.js.map"],"names":["__awaiter","this","__rest","Amplify","jitteredExponentialRetry","getAmplifyUserAgent","Signer","Hub","MaplibreMap","Geo","Popup","MaplibreGeocoder","maplibregl"],"mappings":";;;;;;;;;;;IAAO,SAAS,aAAa,CAAC,KAAK,EAAE;IACrC,IAAI,QAAQ,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IAChC,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ;IACpC,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;IACtC,CAAC;IACM,SAAS,kBAAkB,CAAC,KAAK,EAAE;IAC1C,IAAI,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IACM,SAAS,eAAe,CAAC,MAAM,EAAE;IACxC,IAAI,QAAQ,MAAM;IAClB,QAAQ,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;IACzC,QAAQ,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,QAAQ;IACjD,QAAQ,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;IACnD,CAAC;IACM,SAAS,oBAAoB,CAAC,KAAK,EAAE;IAC5C,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,QAAQ,GAAG,CAAC,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;IACpE,KAAK,CAAC;IACN;IACA,IAAI,MAAM,IAAI,GAAG,MAAM;IACvB,QAAQ,GAAG,CAAC,iBAAiB,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACpE,QAAQ,GAAG,CAAC,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACvE,KAAK,CAAC;IACN,IAAI,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACjE,CAAC;IACD,MAAM,2BAA2B,GAAG,CAAC,IAAI,KAAK;IAC9C,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK;IACxC,QAAQ,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5E,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,SAAS;IAC3B,YAAY,QAAQ,EAAE;IACtB,gBAAgB,IAAI,EAAE,SAAS;IAC/B,gBAAgB,WAAW;IAC3B,aAAa;IACb,YAAY,UAAU,EAAE,EAAE;IAC1B,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,IAAI,OAAO,QAAQ,CAAC;IACpB,CAAC;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@aws-amplify/core"),require("@aws-amplify/geo"),require("maplibre-gl"),require("@maplibre/maplibre-gl-geocoder")):"function"==typeof define&&define.amd?define(["exports","@aws-amplify/core","@aws-amplify/geo","maplibre-gl","@maplibre/maplibre-gl-geocoder"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).AmplifyMapLibre={},e.aws_amplify_core,e.aws_amplify_geo,e.maplibregl,e.MaplibreGeocoder)}(this,(function(e,t,r,o,i){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(o),a=n(i);function l(e){return Array.isArray(e)&&"number"==typeof e[0]&&"number"==typeof e[1]}function c(e){return(t=e[0])&&Array.isArray(t.coordinates)&&"number"==typeof t.coordinates[0]&&"number"==typeof t.coordinates[1];var t}const u=e=>"string"==typeof e&&e.length>0,d=e=>{let t;return t=l(e[0])?e.map((e=>({type:"Feature",geometry:{type:"Point",coordinates:e},properties:{place_name:`Coordinates,${e}`}}))):c(e)?e.map((e=>({type:"Feature",geometry:{type:"Point",coordinates:e.coordinates},properties:{title:e.title,address:e.address}}))):e,t};var p=function(e,t,r,o){return new(r||(r=Promise))((function(i,n){function s(e){try{l(o.next(e))}catch(e){n(e)}}function a(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}))},y=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]])}return r};class f{constructor(e,r){this.refreshCredentials=()=>p(this,void 0,void 0,(function*(){try{this.credentials=yield t.Amplify.Auth.currentCredentials()}catch(e){throw console.error(`Failed to refresh credentials: ${e}`),e}})),this.refreshCredentialsWithRetry=()=>p(this,void 0,void 0,(function*(){yield t.jitteredExponentialRetry(this.refreshCredentials,[],3e5),this.activeTimeout&&clearTimeout(this.activeTimeout);const e=new Date(this.credentials.expiration).getTime()-(new Date).getTime()-1e4;this.activeTimeout=window.setTimeout(this.refreshCredentialsWithRetry,e)})),this.transformRequest=(e,r)=>{if("Style"===r&&!e.includes("://")){if(null==this.region)throw new Error("AWS region for map is undefined. Please verify that the region is set in aws-exports.js or that you are providing an AWS region parameter to createMap");e=`https://maps.geo.${this.region}.amazonaws.com/maps/v0/maps/${e}/style-descriptor`}if(e.includes("amazonaws.com")){const r=e+`?x-amz-user-agent=${encodeURIComponent((o=t.getAmplifyUserAgent(),o.replace(/\./g,"%2E")))}`;return{url:t.Signer.signUrl(r,{access_key:this.credentials.accessKeyId,secret_key:this.credentials.secretAccessKey,session_token:this.credentials.sessionToken})}}var o},this.credentials=e,this.region=r,this.activeTimeout=null,this.refreshCredentialsWithRetry(),t.Hub.listen("auth",(e=>{switch(e.payload.event){case"signIn":case"signOut":case"tokenRefresh":this.refreshCredentialsWithRetry()}}))}}f.createMapLibreMap=e=>p(void 0,void 0,void 0,(function*(){const{region:i,mapConstructor:n=o.Map}=e,s=y(e,["region","mapConstructor"]),a=r.Geo.getDefaultMap(),l=new f(yield t.Amplify.Auth.currentCredentials(),i||a.region).transformRequest;return new n(Object.assign(Object.assign({},s),{style:e.style||a.mapName,transformRequest:l}))}));const m="#fff",h="#000",g="#5d8aff",b="M24.8133 38.533C18.76 31.493 13 28.8264 13 20.8264C13.4827 14.9864 16.552 9.67169 21.368 6.33302C33.768 -2.26165 50.824 5.78902 52.0667 20.8264C52.0667 28.613 46.5733 31.6797 40.6533 38.373C32.4933 47.5464 35.4 63.093 32.4933 63.093C29.72 63.093 32.4933 47.5464 24.8133 38.533ZM32.4933 8.23969C26.5573 8.23969 21.7467 13.0504 21.7467 18.9864C21.7467 24.9224 26.5573 29.733 32.4933 29.733C38.4293 29.733 43.24 24.9224 43.24 18.9864C43.24 13.0504 38.4293 8.23969 32.4933 8.23969Z";var v;!function(e){e.ESRI_TOPOGRAPHIC="VectorEsriTopographic",e.ESRI_STREETS="VectorEsriStreets",e.ESRI_LIGHT_GRAY="VectorEsriLightGrayCanvas",e.ESRI_DARK_GRAY="VectorEsriDarkGrayCanvas",e.ESRI_NAVIGATION="VectorEsriNavigation",e.HERE_BERLIN="VectorHereBerlin"}(v||(v={}));const w={[v.ESRI_TOPOGRAPHIC]:"Noto Sans Regular",[v.ESRI_STREETS]:"Arial Regular",[v.ESRI_LIGHT_GRAY]:"Ubuntu Regular",[v.ESRI_DARK_GRAY]:"Ubuntu Regular",[v.ESRI_NAVIGATION]:"Arial Regular",[v.HERE_BERLIN]:"Fira GO Regular"};function C(e){const t=(null==e?void 0:e.fillColor)?e.fillColor:g,r=(null==e?void 0:e.strokeColor)?e.strokeColor:m,o=(null==e?void 0:e.lineWidth)?e.lineWidth:4;return{width:64,height:64,data:new Uint8Array(16384),onAdd:function(){const e=document.createElement("canvas");e.width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){const e=this.context,i=new Path2D(b);return e.stroke(i),e.fillStyle=t,e.strokeStyle=r,e.lineWidth=o,e.fill(i),this.data=e.getImageData(0,0,this.width,this.height).data,!0}}}var O=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]])}return r};const R="amplify-tip";function x(e,t,r){var{showMarkerPopup:i=!1}=r,n=O(r,["showMarkerPopup"]);const s=`${e}-layer-unclustered-point`;let a=null;function c(){null!==a&&(t.setLayoutProperty(s,"icon-image","inactive-marker"),a=null)}const d=n.popupRender?n.popupRender:function(e,{popupBackgroundColor:t="#fff",popupBorderColor:r="#0000001f",popupBorderWidth:o=2,popupFontColor:i="#000",popupPadding:n=20,popupBorderRadius:s=4,popupTitleFontWeight:a="bold"}){return l=>{let c,d;if(u(l.properties.place_name)){const e=l.properties.place_name.split(",");c=e[0],d=e.splice(1,e.length).join(",")}else u(l.properties.title)||u(l.properties.address)?(c=l.properties.title,d=l.properties.address):(c="Coordinates",d=l.geometry.coordinates);let p=`<div class="${e}-popup" style="background: ${t}; border: ${o}px solid ${r}; color: ${i}; border-radius: ${s}px; padding: ${n}px; word-wrap: break-word; margin: -10px -10px -15px;">`;return c&&(p+=`<div class="${e}-popup-title" style="font-weight: ${a};">${c}</div>`),d&&(p+=`<div class="${e}-popup-address">${d}</div>`),p+="</div>",p}}(s,n);!function(e,{selectedColor:t="#ff9900",selectedBorderColor:r="#fff",selectedBorderWidth:o=4,defaultBorderColor:i="#fff",defaultBorderWidth:n=4,defaultColor:s="#5d8aff"}){const a=C({fillColor:s,strokeColor:i,lineWidth:n}),l=C({fillColor:t,strokeColor:r,lineWidth:o});e.addImage("inactive-marker",a,{pixelRatio:2}),e.addImage("active-marker",l,{pixelRatio:2})}(t,n);const p={id:s,type:"symbol",source:e,filter:["!",["has","point_count"]],layout:{"icon-image":"inactive-marker"}};if(t.addLayer(Object.assign({},p)),i){if(!document.getElementById(R)){const e=document.createElement("style");e.setAttribute("id",R),document.head.append(e),e.textContent=".mapboxgl-popup-tip { display: none; }"}}return t.on("click",(function(){c()})),t.on("click",s,(function(e){if("function"==typeof n.onClick&&n.onClick(e),a=e.features[0].id,t.setLayoutProperty(s,"icon-image",["match",["id"],a,"active-marker","inactive-marker"]),i){const r=e.features[0],i=r.geometry.coordinates;if(l(i)){(new o.Popup).setLngLat(i).setHTML(d(r)).setOffset(15).addTo(t).on("close",(function(){a===r.id&&c()}))}}})),t.on("mouseover",s,(function(){t.getCanvas().style.cursor="pointer"})),t.on("mouseleave",s,(()=>{t.getCanvas().style.cursor=""})),{unclusteredLayerId:s}}function I(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg"),t=document.createElementNS("http://www.w3.org/2000/svg","path"),r=document.createElement("circle");return e.setAttribute("viewBox","0 0 64 64"),e.setAttribute("width","32"),e.setAttribute("height","32"),t.setAttribute("d",b),t.setAttribute("fill","#5d8aff"),r.setAttribute("fill","white"),r.setAttribute("cx","50%"),r.setAttribute("cy","50%"),r.setAttribute("r","5"),e.appendChild(r),e.appendChild(t),e}var A=function(e,t,r,o){return new(r||(r=Promise))((function(i,n){function s(e){try{l(o.next(e))}catch(e){n(e)}}function a(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}))},P=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]])}return r};const S={forwardGeocode:e=>A(void 0,void 0,void 0,(function*(){const t=[];try{const o=yield r.Geo.searchByText(e.query,{biasPosition:e.proximity,searchAreaConstraints:e.bbox,countries:e.countires,maxResults:e.limit});o&&o.forEach((e=>{const{geometry:r}=e,o=P(e,["geometry"]);t.push({type:"Feature",geometry:{type:"Point",coordinates:r.point},properties:Object.assign({},o),place_name:o.label,text:o.label,center:r.point})}))}catch(e){console.error(`Failed to forwardGeocode with error: ${e}`)}return{features:t}})),reverseGeocode:e=>A(void 0,void 0,void 0,(function*(){const t=[];try{const o=yield r.Geo.searchByCoordinates(e.query,{maxResults:e.limit});if(o&&o.geometry){const{geometry:e}=o,r=P(o,["geometry"]);t.push({type:"Feature",geometry:{type:"Point",coordinates:e.point},properties:Object.assign({},r),place_name:r.label,text:r.label,center:e.point})}}catch(e){console.error(`Failed to reverseGeocode with error: ${e}`)}return{features:t}}))};const L=e=>e.map((e=>{var t;return{type:"Feature",geometry:{type:"Polygon",coordinates:(t=e)&&"string"==typeof t.id&&"object"==typeof t.geometry?e.geometry.polygon:e},properties:{}}}));e.AmplifyGeocoderAPI=S,e.AmplifyMapLibreRequest=f,e.createAmplifyGeocoder=function(e){return new a.default(S,Object.assign({maplibregl:s.default,showResultMarkers:{element:I()},marker:{element:I()}},e))},e.createDefaultIcon=I,e.createMap=e=>p(void 0,void 0,void 0,(function*(){return f.createMapLibreMap(e)})),e.drawGeofences=function(e,t,r,o={}){var i,n,s,a,l;if(!r||"function"!=typeof r.addSource||"function"!=typeof r.addLayer)throw new Error("Please use a maplibre map");const c=L(t),u=`${e}-source`;r.addSource(u,{type:"geojson",data:{type:"FeatureCollection",features:c},generateId:!0});const d=`${e}-fill-layer`;r.addLayer({id:d,type:"fill",source:u,layout:{visibility:"visible"},paint:{"fill-color":null!==(i=o.fillColor)&&void 0!==i?i:h,"fill-opacity":null!==(n=o.fillOpacity)&&void 0!==n?n:.3}});const p=`${e}-outline-layer`;return r.addLayer({id:p,type:"line",source:u,layout:{visibility:"visible"},paint:{"line-color":null!==(s=o.borderColor)&&void 0!==s?s:h,"line-opacity":null!==(a=o.borderOpacity)&&void 0!==a?a:.5,"line-width":null!==(l=o.borderWidth)&&void 0!==l?l:4}}),{sourceId:u,outlineLayerId:p,fillLayerId:d,show:()=>{r.setLayoutProperty(d,"visibility","visible"),r.setLayoutProperty(p,"visibility","visible")},hide:()=>{r.setLayoutProperty(d,"visibility","none"),r.setLayoutProperty(p,"visibility","none")}}},e.drawPoints=function(e,t,o,{showCluster:i=!0,clusterOptions:n={},unclusteredOptions:s={}}={},a){var l,c;if(!o||"function"!=typeof o.addSource||"function"!=typeof o.addLayer)throw new Error("Please use a maplibre map");const u=d(t),p=`${e}-source-points`;let y,f;o.addSource(p,{type:"geojson",data:{type:"FeatureCollection",features:u},cluster:i,clusterMaxZoom:null!==(l=n.clusterMaxZoom)&&void 0!==l?l:14,clusterRadius:null!==(c=n.smCircleSize)&&void 0!==c?c:60,generateId:!0}),i&&({clusterLayerId:y,clusterSymbolLayerId:f}=function(e,t,{fillColor:o="#5d8aff",smCircleSize:i=60,smThreshold:n=50,mdCircleSize:s=100,mdThreshold:a=100,lgCircleSize:l=140,lgThreshold:c=500,xlCircleSize:u=180,borderWidth:d=4,borderColor:p="#fff",clusterPaint:y,onClick:f,showCount:m,clusterCountLayout:h,fontColor:g="#fff"},b){const v=`${e}-layer-clusters`,C=`${e}-layer-cluster-count`,O=Object.assign({"circle-color":["step",["get","point_count"],o,n,o,a,o,c,o],"circle-radius":["step",["get","point_count"],i,n,s,a,l,c,u],"circle-stroke-width":d,"circle-stroke-color":p},y),R={id:v,type:"circle",source:e,filter:["has","point_count"],paint:O};if(t.addLayer(Object.assign({},R)),t.on("click",v,(function(r){"function"==typeof f&&f(r);const o=t.queryRenderedFeatures(r.point,{layers:[v]}),i=o[0].properties.cluster_id,n=t.getSource(e);(function(e){return"geojson"===e.type})(n)&&n.getClusterExpansionZoom(i,(function(e,r){e||t.easeTo({center:o[0].geometry.coordinates,zoom:r})}))})),m){const o={"text-field":"{point_count_abbreviated}","text-size":24},i=b||r.Geo.getDefaultMap().style;i&&(o["text-font"]=[w[i]]);const n=Object.assign(Object.assign({},o),h),s={id:C,type:"symbol",source:e,filter:["has","point_count"],layout:n,paint:{"text-color":g}};t.addLayer(Object.assign({},s))}return{clusterLayerId:v,clusterSymbolLayerId:C}}(p,o,n,a));const{unclusteredLayerId:m}=x(p,o,s||{});return{sourceId:p,unclusteredLayerId:m,clusterLayerId:y,clusterSymbolLayerId:f,setData:e=>{const t=d(e);o.getSource(p).setData({type:"FeatureCollection",features:t})},show:()=>{o.setLayoutProperty(m,"visibility","visible"),y&&o.setLayoutProperty(y,"visibility","visible"),f&&o.setLayoutProperty(f,"visibility","visible")},hide:()=>{o.setLayoutProperty(m,"visibility","none"),y&&o.setLayoutProperty(y,"visibility","none"),f&&o.setLayoutProperty(f,"visibility","none")}}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@aws-amplify/core"),require("@aws-amplify/geo"),require("maplibre-gl"),require("@maplibre/maplibre-gl-geocoder")):"function"==typeof define&&define.amd?define(["exports","@aws-amplify/core","@aws-amplify/geo","maplibre-gl","@maplibre/maplibre-gl-geocoder"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).AmplifyMapLibre={},e.aws_amplify_core,e.aws_amplify_geo,e.maplibregl,e.MaplibreGeocoder)}(this,(function(e,t,o,r,i){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(r),a=n(i);function l(e){return Array.isArray(e)&&"number"==typeof e[0]&&"number"==typeof e[1]}function c(e){return(t=e[0])&&Array.isArray(t.coordinates)&&"number"==typeof t.coordinates[0]&&"number"==typeof t.coordinates[1];var t}const u=e=>"string"==typeof e&&e.length>0,d=e=>{let t;return t=l(e[0])?e.map((e=>({type:"Feature",geometry:{type:"Point",coordinates:e},properties:{place_name:`Coordinates,${e}`}}))):c(e)?e.map((e=>({type:"Feature",geometry:{type:"Point",coordinates:e.coordinates},properties:{title:e.title,address:e.address}}))):e,t};var p=function(e,t,o,r){return new(o||(o=Promise))((function(i,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},y=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(o[r[i]]=e[r[i]])}return o};class f{constructor(e,o){this.refreshCredentials=()=>p(this,void 0,void 0,(function*(){try{this.credentials=yield t.Amplify.Auth.currentCredentials()}catch(e){throw console.error(`Failed to refresh credentials: ${e}`),e}})),this.refreshCredentialsWithRetry=()=>p(this,void 0,void 0,(function*(){try{const e=3e5;yield t.jitteredExponentialRetry(this.refreshCredentials,[],e),this.activeTimeout&&clearTimeout(this.activeTimeout);const o=new Date(this.credentials.expiration).getTime()-(new Date).getTime()-1e4;this.activeTimeout=window.setTimeout(this.refreshCredentialsWithRetry,o)}catch(e){console.error(`Failed to refresh credentials: ${e}`)}})),this.transformRequest=(e,o)=>{if("Style"===o&&!e.includes("://")){if(null==this.region)throw new Error("AWS region for map is undefined. Please verify that the region is set in aws-exports.js or that you are providing an AWS region parameter to createMap");e=`https://maps.geo.${this.region}.amazonaws.com/maps/v0/maps/${e}/style-descriptor`}if(e.includes("amazonaws.com")){const o=e+`?x-amz-user-agent=${encodeURIComponent((r=t.getAmplifyUserAgent(),r.replace(/\./g,"%2E")))}`;return{url:t.Signer.signUrl(o,{access_key:this.credentials.accessKeyId,secret_key:this.credentials.secretAccessKey,session_token:this.credentials.sessionToken})}}var r},this.credentials=e,this.region=o,this.activeTimeout=null,this.refreshCredentialsWithRetry(),t.Hub.listen("auth",(e=>{switch(e.payload.event){case"signIn":case"signOut":case"tokenRefresh":this.refreshCredentialsWithRetry()}}))}}f.createMapLibreMap=e=>p(void 0,void 0,void 0,(function*(){const{region:i,mapConstructor:n=r.Map}=e,s=y(e,["region","mapConstructor"]),a=o.Geo.getDefaultMap(),l=new f(yield t.Amplify.Auth.currentCredentials(),i||a.region).transformRequest;return new n(Object.assign(Object.assign({},s),{style:e.style||a.mapName,transformRequest:l}))}));const h="#fff",m="#000",g="#5d8aff",b="M24.8133 38.533C18.76 31.493 13 28.8264 13 20.8264C13.4827 14.9864 16.552 9.67169 21.368 6.33302C33.768 -2.26165 50.824 5.78902 52.0667 20.8264C52.0667 28.613 46.5733 31.6797 40.6533 38.373C32.4933 47.5464 35.4 63.093 32.4933 63.093C29.72 63.093 32.4933 47.5464 24.8133 38.533ZM32.4933 8.23969C26.5573 8.23969 21.7467 13.0504 21.7467 18.9864C21.7467 24.9224 26.5573 29.733 32.4933 29.733C38.4293 29.733 43.24 24.9224 43.24 18.9864C43.24 13.0504 38.4293 8.23969 32.4933 8.23969Z";var v;!function(e){e.ESRI_TOPOGRAPHIC="VectorEsriTopographic",e.ESRI_STREETS="VectorEsriStreets",e.ESRI_LIGHT_GRAY="VectorEsriLightGrayCanvas",e.ESRI_DARK_GRAY="VectorEsriDarkGrayCanvas",e.ESRI_NAVIGATION="VectorEsriNavigation",e.HERE_BERLIN="VectorHereBerlin"}(v||(v={}));const w={[v.ESRI_TOPOGRAPHIC]:"Noto Sans Regular",[v.ESRI_STREETS]:"Arial Regular",[v.ESRI_LIGHT_GRAY]:"Ubuntu Regular",[v.ESRI_DARK_GRAY]:"Ubuntu Regular",[v.ESRI_NAVIGATION]:"Arial Regular",[v.HERE_BERLIN]:"Fira GO Regular"};function C(e){const t=(null==e?void 0:e.fillColor)?e.fillColor:g,o=(null==e?void 0:e.strokeColor)?e.strokeColor:h,r=(null==e?void 0:e.lineWidth)?e.lineWidth:4;return{width:64,height:64,data:new Uint8Array(16384),onAdd:function(){const e=document.createElement("canvas");e.width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){const e=this.context,i=new Path2D(b);return e.stroke(i),e.fillStyle=t,e.strokeStyle=o,e.lineWidth=r,e.fill(i),this.data=e.getImageData(0,0,this.width,this.height).data,!0}}}var R=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(o[r[i]]=e[r[i]])}return o};const O="amplify-tip";function x(e,t,o){var{showMarkerPopup:i=!1}=o,n=R(o,["showMarkerPopup"]);const s=`${e}-layer-unclustered-point`;let a=null;function c(){null!==a&&(t.setLayoutProperty(s,"icon-image","inactive-marker"),a=null)}const d=n.popupRender?n.popupRender:function(e,{popupBackgroundColor:t="#fff",popupBorderColor:o="#0000001f",popupBorderWidth:r=2,popupFontColor:i="#000",popupPadding:n=20,popupBorderRadius:s=4,popupTitleFontWeight:a="bold"}){return l=>{let c,d;if(u(l.properties.place_name)){const e=l.properties.place_name.split(",");c=e[0],d=e.splice(1,e.length).join(",")}else u(l.properties.title)||u(l.properties.address)?(c=l.properties.title,d=l.properties.address):(c="Coordinates",d=l.geometry.coordinates);let p=`<div class="${e}-popup" style="background: ${t}; border: ${r}px solid ${o}; color: ${i}; border-radius: ${s}px; padding: ${n}px; word-wrap: break-word; margin: -10px -10px -15px;">`;return c&&(p+=`<div class="${e}-popup-title" style="font-weight: ${a};">${c}</div>`),d&&(p+=`<div class="${e}-popup-address">${d}</div>`),p+="</div>",p}}(s,n);!function(e,{selectedColor:t="#ff9900",selectedBorderColor:o="#fff",selectedBorderWidth:r=4,defaultBorderColor:i="#fff",defaultBorderWidth:n=4,defaultColor:s="#5d8aff"}){const a=C({fillColor:s,strokeColor:i,lineWidth:n}),l=C({fillColor:t,strokeColor:o,lineWidth:r});e.addImage("inactive-marker",a,{pixelRatio:2}),e.addImage("active-marker",l,{pixelRatio:2})}(t,n);const p={id:s,type:"symbol",source:e,filter:["!",["has","point_count"]],layout:{"icon-image":"inactive-marker"}};if(t.addLayer(Object.assign({},p)),i){if(!document.getElementById(O)){const e=document.createElement("style");e.setAttribute("id",O),document.head.append(e),e.textContent=".mapboxgl-popup-tip { display: none; }"}}return t.on("click",(function(){c()})),t.on("click",s,(function(e){if("function"==typeof n.onClick&&n.onClick(e),a=e.features[0].id,t.setLayoutProperty(s,"icon-image",["match",["id"],a,"active-marker","inactive-marker"]),i){const o=e.features[0],i=o.geometry.coordinates;if(l(i)){(new r.Popup).setLngLat(i).setHTML(d(o)).setOffset(15).addTo(t).on("close",(function(){a===o.id&&c()}))}}})),t.on("mouseover",s,(function(){t.getCanvas().style.cursor="pointer"})),t.on("mouseleave",s,(()=>{t.getCanvas().style.cursor=""})),{unclusteredLayerId:s}}function I(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg"),t=document.createElementNS("http://www.w3.org/2000/svg","path"),o=document.createElement("circle");return e.setAttribute("viewBox","0 0 64 64"),e.setAttribute("width","32"),e.setAttribute("height","32"),t.setAttribute("d",b),t.setAttribute("fill","#5d8aff"),o.setAttribute("fill","white"),o.setAttribute("cx","50%"),o.setAttribute("cy","50%"),o.setAttribute("r","5"),e.appendChild(o),e.appendChild(t),e}var A=function(e,t,o,r){return new(o||(o=Promise))((function(i,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},P=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(o[r[i]]=e[r[i]])}return o};const S={forwardGeocode:e=>A(void 0,void 0,void 0,(function*(){const t=[];try{const r=yield o.Geo.searchByText(e.query,{biasPosition:e.proximity,searchAreaConstraints:e.bbox,countries:e.countries,maxResults:e.limit});r&&r.forEach((e=>{const{geometry:o}=e,r=P(e,["geometry"]);t.push({type:"Feature",geometry:{type:"Point",coordinates:o.point},properties:Object.assign({},r),place_name:r.label,text:r.label,center:o.point})}))}catch(e){console.error(`Failed to forwardGeocode with error: ${e}`)}return{features:t}})),reverseGeocode:e=>A(void 0,void 0,void 0,(function*(){const t=[];try{const r=yield o.Geo.searchByCoordinates(e.query,{maxResults:e.limit});if(r&&r.geometry){const{geometry:e}=r,o=P(r,["geometry"]);t.push({type:"Feature",geometry:{type:"Point",coordinates:e.point},properties:Object.assign({},o),place_name:o.label,text:o.label,center:e.point})}}catch(e){console.error(`Failed to reverseGeocode with error: ${e}`)}return{features:t}})),getSuggestions:e=>A(void 0,void 0,void 0,(function*(){const t=[];try{const r=yield o.Geo.searchForSuggestions(e.query,{biasPosition:e.proximity,searchAreaConstraints:e.bbox,countries:e.countries,maxResults:e.limit});t.push(...r)}catch(e){console.error(`Failed to get suggestions with error: ${e}`)}return{suggestions:t}}))};const L=e=>e.map((e=>{var t;return{type:"Feature",geometry:{type:"Polygon",coordinates:(t=e)&&"string"==typeof t.id&&"object"==typeof t.geometry?e.geometry.polygon:e},properties:{}}}));e.AmplifyGeocoderAPI=S,e.AmplifyMapLibreRequest=f,e.createAmplifyGeocoder=function(e){return new a.default(S,Object.assign({maplibregl:s.default,showResultMarkers:{element:I()},marker:{element:I()},showResultsWhileTyping:!1!==(null==e?void 0:e.autocomplete)},e))},e.createDefaultIcon=I,e.createMap=e=>p(void 0,void 0,void 0,(function*(){return f.createMapLibreMap(e)})),e.drawGeofences=function(e,t,o,r={}){var i,n,s,a,l;if(!o||"function"!=typeof o.addSource||"function"!=typeof o.addLayer)throw new Error("Please use a maplibre map");const c=L(t),u=`${e}-source`;o.addSource(u,{type:"geojson",data:{type:"FeatureCollection",features:c},generateId:!0});const d=`${e}-fill-layer`;o.addLayer({id:d,type:"fill",source:u,layout:{visibility:"visible"},paint:{"fill-color":null!==(i=r.fillColor)&&void 0!==i?i:m,"fill-opacity":null!==(n=r.fillOpacity)&&void 0!==n?n:.3}});const p=`${e}-outline-layer`;return o.addLayer({id:p,type:"line",source:u,layout:{visibility:"visible"},paint:{"line-color":null!==(s=r.borderColor)&&void 0!==s?s:m,"line-opacity":null!==(a=r.borderOpacity)&&void 0!==a?a:.5,"line-width":null!==(l=r.borderWidth)&&void 0!==l?l:4}}),{sourceId:u,outlineLayerId:p,fillLayerId:d,show:()=>{o.setLayoutProperty(d,"visibility","visible"),o.setLayoutProperty(p,"visibility","visible")},hide:()=>{o.setLayoutProperty(d,"visibility","none"),o.setLayoutProperty(p,"visibility","none")}}},e.drawPoints=function(e,t,r,{showCluster:i=!0,clusterOptions:n={},unclusteredOptions:s={},autoFit:a=!0}={},l){var c,u;if(!r||"function"!=typeof r.addSource||"function"!=typeof r.addLayer)throw new Error("Please use a maplibre map");const p=d(t),y=`${e}-source-points`;let f,h;r.addSource(y,{type:"geojson",data:{type:"FeatureCollection",features:p},cluster:i,clusterMaxZoom:null!==(c=n.clusterMaxZoom)&&void 0!==c?c:14,clusterRadius:null!==(u=n.smCircleSize)&&void 0!==u?u:60,generateId:!0}),i&&({clusterLayerId:f,clusterSymbolLayerId:h}=function(e,t,{fillColor:r="#5d8aff",smCircleSize:i=60,smThreshold:n=50,mdCircleSize:s=100,mdThreshold:a=100,lgCircleSize:l=140,lgThreshold:c=500,xlCircleSize:u=180,borderWidth:d=4,borderColor:p="#fff",clusterPaint:y,onClick:f,showCount:h,clusterCountLayout:m,fontColor:g="#fff"},b){const v=`${e}-layer-clusters`,C=`${e}-layer-cluster-count`,R=Object.assign({"circle-color":["step",["get","point_count"],r,n,r,a,r,c,r],"circle-radius":["step",["get","point_count"],i,n,s,a,l,c,u],"circle-stroke-width":d,"circle-stroke-color":p},y),O={id:v,type:"circle",source:e,filter:["has","point_count"],paint:R};if(t.addLayer(Object.assign({},O)),t.on("click",v,(function(o){"function"==typeof f&&f(o);const r=t.queryRenderedFeatures(o.point,{layers:[v]}),i=r[0].properties.cluster_id,n=t.getSource(e);(function(e){return"geojson"===e.type})(n)&&n.getClusterExpansionZoom(i,(function(e,o){e||t.easeTo({center:r[0].geometry.coordinates,zoom:o})}))})),h){const r={"text-field":"{point_count_abbreviated}","text-size":24},i=b||o.Geo.getDefaultMap().style;i&&(r["text-font"]=[w[i]]);const n=Object.assign(Object.assign({},r),m),s={id:C,type:"symbol",source:e,filter:["has","point_count"],layout:n,paint:{"text-color":g}};t.addLayer(Object.assign({},s))}return{clusterLayerId:v,clusterSymbolLayerId:C}}(y,r,n,l));const{unclusteredLayerId:m}=x(y,r,s||{});if(a){const e=r.getBounds();p.forEach((function(t){e.extend(t.geometry.coordinates)})),r.fitBounds(e)}return{sourceId:y,unclusteredLayerId:m,clusterLayerId:f,clusterSymbolLayerId:h,setData:e=>{const t=d(e);r.getSource(y).setData({type:"FeatureCollection",features:t})},show:()=>{r.setLayoutProperty(m,"visibility","visible"),f&&r.setLayoutProperty(f,"visibility","visible"),h&&r.setLayoutProperty(h,"visibility","visible")},hide:()=>{r.setLayoutProperty(m,"visibility","none"),f&&r.setLayoutProperty(f,"visibility","none"),h&&r.setLayoutProperty(h,"visibility","none")}}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
Binary file
|