@inlog/inlog-maps 1.0.0 → 1.1.1-test
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/DOCUMENTATION.md +1813 -0
- package/README.md +46 -591
- package/_bundles/inlog-maps.js +3 -0
- package/_bundles/inlog-maps.js.LICENSE.txt +20 -0
- package/_bundles/inlog-maps.js.map +1 -0
- package/_bundles/inlog-maps.min.js +3 -0
- package/_bundles/inlog-maps.min.js.LICENSE.txt +20 -0
- package/_bundles/inlog-maps.min.js.map +1 -0
- package/bower.json +23 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.js +47 -0
- package/lib/index.js.map +1 -0
- package/lib/map.d.ts +519 -0
- package/lib/map.js +1139 -0
- package/lib/map.js.map +1 -0
- package/lib/models/apis/google/google-circles.d.ts +18 -0
- package/lib/models/apis/google/google-circles.js +134 -0
- package/lib/models/apis/google/google-circles.js.map +1 -0
- package/lib/models/apis/google/google-geojson.d.ts +9 -0
- package/lib/models/apis/google/google-geojson.js +73 -0
- package/lib/models/apis/google/google-geojson.js.map +1 -0
- package/lib/models/apis/google/google-map.d.ts +16 -0
- package/lib/models/apis/google/google-map.js +174 -0
- package/lib/models/apis/google/google-map.js.map +1 -0
- package/lib/models/apis/google/google-markers.d.ts +29 -0
- package/lib/models/apis/google/google-markers.js +325 -0
- package/lib/models/apis/google/google-markers.js.map +1 -0
- package/lib/models/apis/google/google-overlay.d.ts +11 -0
- package/lib/models/apis/google/google-overlay.js +102 -0
- package/lib/models/apis/google/google-overlay.js.map +1 -0
- package/lib/models/apis/google/google-polygons.d.ts +29 -0
- package/lib/models/apis/google/google-polygons.js +301 -0
- package/lib/models/apis/google/google-polygons.js.map +1 -0
- package/lib/models/apis/google/google-polylines.d.ts +55 -0
- package/lib/models/apis/google/google-polylines.js +707 -0
- package/lib/models/apis/google/google-polylines.js.map +1 -0
- package/lib/models/apis/google/google-popup.d.ts +10 -0
- package/lib/models/apis/google/google-popup.js +59 -0
- package/lib/models/apis/google/google-popup.js.map +1 -0
- package/lib/models/apis/googleMaps.d.ts +97 -0
- package/lib/models/apis/googleMaps.js +449 -0
- package/lib/models/apis/googleMaps.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-circle.d.ts +18 -0
- package/lib/models/apis/leaflet/leaflet-circle.js +163 -0
- package/lib/models/apis/leaflet/leaflet-circle.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-geojson.d.ts +9 -0
- package/lib/models/apis/leaflet/leaflet-geojson.js +73 -0
- package/lib/models/apis/leaflet/leaflet-geojson.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-map.d.ts +17 -0
- package/lib/models/apis/leaflet/leaflet-map.js +148 -0
- package/lib/models/apis/leaflet/leaflet-map.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-markers.d.ts +29 -0
- package/lib/models/apis/leaflet/leaflet-markers.js +294 -0
- package/lib/models/apis/leaflet/leaflet-markers.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-overlay.d.ts +10 -0
- package/lib/models/apis/leaflet/leaflet-overlay.js +35 -0
- package/lib/models/apis/leaflet/leaflet-overlay.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-polygons.d.ts +23 -0
- package/lib/models/apis/leaflet/leaflet-polygons.js +211 -0
- package/lib/models/apis/leaflet/leaflet-polygons.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-polylines.d.ts +57 -0
- package/lib/models/apis/leaflet/leaflet-polylines.js +739 -0
- package/lib/models/apis/leaflet/leaflet-polylines.js.map +1 -0
- package/lib/models/apis/leaflet/leaflet-popup.d.ts +11 -0
- package/lib/models/apis/leaflet/leaflet-popup.js +74 -0
- package/lib/models/apis/leaflet/leaflet-popup.js.map +1 -0
- package/lib/models/apis/leaflet.d.ts +99 -0
- package/lib/models/apis/leaflet.js +465 -0
- package/lib/models/apis/leaflet.js.map +1 -0
- package/lib/models/apis/mapFunctions.d.ts +85 -0
- package/lib/models/apis/mapFunctions.js +2 -0
- package/lib/models/apis/mapFunctions.js.map +1 -0
- package/lib/models/dto/event-type.d.ts +33 -0
- package/lib/models/dto/event-type.js +39 -0
- package/lib/models/dto/event-type.js.map +1 -0
- package/lib/models/dto/map-type.d.ts +4 -0
- package/lib/models/dto/map-type.js +6 -0
- package/lib/models/dto/map-type.js.map +1 -0
- package/lib/models/dto/polyline-type.d.ts +5 -0
- package/lib/models/dto/polyline-type.js +7 -0
- package/lib/models/dto/polyline-type.js.map +1 -0
- package/lib/models/features/circle/circle-alter-options.d.ts +12 -0
- package/lib/models/features/circle/circle-alter-options.js +14 -0
- package/lib/models/features/circle/circle-alter-options.js.map +1 -0
- package/lib/models/features/circle/circle-options.d.ts +15 -0
- package/lib/models/features/circle/circle-options.js +19 -0
- package/lib/models/features/circle/circle-options.js.map +1 -0
- package/lib/models/features/events/event-return.d.ts +4 -0
- package/lib/models/features/events/event-return.js +8 -0
- package/lib/models/features/events/event-return.js.map +1 -0
- package/lib/models/features/geojson/geojson-options.d.ts +5 -0
- package/lib/models/features/geojson/geojson-options.js +9 -0
- package/lib/models/features/geojson/geojson-options.js.map +1 -0
- package/lib/models/features/marker/circle-marker-options.d.ts +9 -0
- package/lib/models/features/marker/circle-marker-options.js +12 -0
- package/lib/models/features/marker/circle-marker-options.js.map +1 -0
- package/lib/models/features/marker/circle-marker-style.d.ts +8 -0
- package/lib/models/features/marker/circle-marker-style.js +12 -0
- package/lib/models/features/marker/circle-marker-style.js.map +1 -0
- package/lib/models/features/marker/marker-alter-options.d.ts +8 -0
- package/lib/models/features/marker/marker-alter-options.js +10 -0
- package/lib/models/features/marker/marker-alter-options.js.map +1 -0
- package/lib/models/features/marker/marker-icon.d.ts +6 -0
- package/lib/models/features/marker/marker-icon.js +10 -0
- package/lib/models/features/marker/marker-icon.js.map +1 -0
- package/lib/models/features/marker/marker-options.d.ts +11 -0
- package/lib/models/features/marker/marker-options.js +18 -0
- package/lib/models/features/marker/marker-options.js.map +1 -0
- package/lib/models/features/marker-clusterer/marker-clusterer-config.d.ts +6 -0
- package/lib/models/features/marker-clusterer/marker-clusterer-config.js +10 -0
- package/lib/models/features/marker-clusterer/marker-clusterer-config.js.map +1 -0
- package/lib/models/features/overlay/overlay-options.d.ts +11 -0
- package/lib/models/features/overlay/overlay-options.js +15 -0
- package/lib/models/features/overlay/overlay-options.js.map +1 -0
- package/lib/models/features/polygons/polygon-alter-options.d.ts +13 -0
- package/lib/models/features/polygons/polygon-alter-options.js +14 -0
- package/lib/models/features/polygons/polygon-alter-options.js.map +1 -0
- package/lib/models/features/polygons/polygon-options.d.ts +15 -0
- package/lib/models/features/polygons/polygon-options.js +19 -0
- package/lib/models/features/polygons/polygon-options.js.map +1 -0
- package/lib/models/features/polyline/navigations-options.d.ts +11 -0
- package/lib/models/features/polyline/navigations-options.js +16 -0
- package/lib/models/features/polyline/navigations-options.js.map +1 -0
- package/lib/models/features/polyline/polyline-options.d.ts +18 -0
- package/lib/models/features/polyline/polyline-options.js +20 -0
- package/lib/models/features/polyline/polyline-options.js.map +1 -0
- package/lib/models/features/popup/popup-options.d.ts +9 -0
- package/lib/models/features/popup/popup-options.js +13 -0
- package/lib/models/features/popup/popup-options.js.map +1 -0
- package/lib/utils/maps-api-loader.service.d.ts +14 -0
- package/lib/utils/maps-api-loader.service.js +89 -0
- package/lib/utils/maps-api-loader.service.js.map +1 -0
- package/lib/utils/url-builder.d.ts +20 -0
- package/lib/utils/url-builder.js +44 -0
- package/lib/utils/url-builder.js.map +1 -0
- package/lib-esm/index.d.ts +46 -0
- package/lib-esm/index.js +47 -0
- package/lib-esm/index.js.map +1 -0
- package/lib-esm/map.d.ts +519 -0
- package/lib-esm/map.js +1139 -0
- package/lib-esm/map.js.map +1 -0
- package/lib-esm/models/apis/google/google-circles.d.ts +18 -0
- package/lib-esm/models/apis/google/google-circles.js +134 -0
- package/lib-esm/models/apis/google/google-circles.js.map +1 -0
- package/lib-esm/models/apis/google/google-geojson.d.ts +9 -0
- package/lib-esm/models/apis/google/google-geojson.js +73 -0
- package/lib-esm/models/apis/google/google-geojson.js.map +1 -0
- package/lib-esm/models/apis/google/google-map.d.ts +16 -0
- package/lib-esm/models/apis/google/google-map.js +174 -0
- package/lib-esm/models/apis/google/google-map.js.map +1 -0
- package/lib-esm/models/apis/google/google-markers.d.ts +29 -0
- package/lib-esm/models/apis/google/google-markers.js +325 -0
- package/lib-esm/models/apis/google/google-markers.js.map +1 -0
- package/lib-esm/models/apis/google/google-overlay.d.ts +11 -0
- package/lib-esm/models/apis/google/google-overlay.js +102 -0
- package/lib-esm/models/apis/google/google-overlay.js.map +1 -0
- package/lib-esm/models/apis/google/google-polygons.d.ts +29 -0
- package/lib-esm/models/apis/google/google-polygons.js +301 -0
- package/lib-esm/models/apis/google/google-polygons.js.map +1 -0
- package/lib-esm/models/apis/google/google-polylines.d.ts +55 -0
- package/lib-esm/models/apis/google/google-polylines.js +707 -0
- package/lib-esm/models/apis/google/google-polylines.js.map +1 -0
- package/lib-esm/models/apis/google/google-popup.d.ts +10 -0
- package/lib-esm/models/apis/google/google-popup.js +59 -0
- package/lib-esm/models/apis/google/google-popup.js.map +1 -0
- package/lib-esm/models/apis/googleMaps.d.ts +97 -0
- package/lib-esm/models/apis/googleMaps.js +449 -0
- package/lib-esm/models/apis/googleMaps.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-circle.d.ts +18 -0
- package/lib-esm/models/apis/leaflet/leaflet-circle.js +163 -0
- package/lib-esm/models/apis/leaflet/leaflet-circle.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-geojson.d.ts +9 -0
- package/lib-esm/models/apis/leaflet/leaflet-geojson.js +73 -0
- package/lib-esm/models/apis/leaflet/leaflet-geojson.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-map.d.ts +17 -0
- package/lib-esm/models/apis/leaflet/leaflet-map.js +148 -0
- package/lib-esm/models/apis/leaflet/leaflet-map.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-markers.d.ts +29 -0
- package/lib-esm/models/apis/leaflet/leaflet-markers.js +294 -0
- package/lib-esm/models/apis/leaflet/leaflet-markers.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-overlay.d.ts +10 -0
- package/lib-esm/models/apis/leaflet/leaflet-overlay.js +35 -0
- package/lib-esm/models/apis/leaflet/leaflet-overlay.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-polygons.d.ts +23 -0
- package/lib-esm/models/apis/leaflet/leaflet-polygons.js +211 -0
- package/lib-esm/models/apis/leaflet/leaflet-polygons.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-polylines.d.ts +57 -0
- package/lib-esm/models/apis/leaflet/leaflet-polylines.js +739 -0
- package/lib-esm/models/apis/leaflet/leaflet-polylines.js.map +1 -0
- package/lib-esm/models/apis/leaflet/leaflet-popup.d.ts +11 -0
- package/lib-esm/models/apis/leaflet/leaflet-popup.js +74 -0
- package/lib-esm/models/apis/leaflet/leaflet-popup.js.map +1 -0
- package/lib-esm/models/apis/leaflet.d.ts +99 -0
- package/lib-esm/models/apis/leaflet.js +465 -0
- package/lib-esm/models/apis/leaflet.js.map +1 -0
- package/lib-esm/models/apis/mapFunctions.d.ts +85 -0
- package/lib-esm/models/apis/mapFunctions.js +2 -0
- package/lib-esm/models/apis/mapFunctions.js.map +1 -0
- package/lib-esm/models/dto/event-type.d.ts +33 -0
- package/lib-esm/models/dto/event-type.js +39 -0
- package/lib-esm/models/dto/event-type.js.map +1 -0
- package/lib-esm/models/dto/map-type.d.ts +4 -0
- package/lib-esm/models/dto/map-type.js +6 -0
- package/lib-esm/models/dto/map-type.js.map +1 -0
- package/lib-esm/models/dto/polyline-type.d.ts +5 -0
- package/lib-esm/models/dto/polyline-type.js +7 -0
- package/lib-esm/models/dto/polyline-type.js.map +1 -0
- package/lib-esm/models/features/circle/circle-alter-options.d.ts +12 -0
- package/lib-esm/models/features/circle/circle-alter-options.js +14 -0
- package/lib-esm/models/features/circle/circle-alter-options.js.map +1 -0
- package/lib-esm/models/features/circle/circle-options.d.ts +15 -0
- package/{src → lib-esm/models/features}/circle/circle-options.js +6 -4
- package/lib-esm/models/features/circle/circle-options.js.map +1 -0
- package/lib-esm/models/features/events/event-return.d.ts +4 -0
- package/lib-esm/models/features/events/event-return.js +8 -0
- package/lib-esm/models/features/events/event-return.js.map +1 -0
- package/lib-esm/models/features/geojson/geojson-options.d.ts +5 -0
- package/lib-esm/models/features/geojson/geojson-options.js +9 -0
- package/lib-esm/models/features/geojson/geojson-options.js.map +1 -0
- package/lib-esm/models/features/marker/circle-marker-options.d.ts +9 -0
- package/lib-esm/models/features/marker/circle-marker-options.js +12 -0
- package/lib-esm/models/features/marker/circle-marker-options.js.map +1 -0
- package/lib-esm/models/features/marker/circle-marker-style.d.ts +8 -0
- package/lib-esm/models/features/marker/circle-marker-style.js +12 -0
- package/lib-esm/models/features/marker/circle-marker-style.js.map +1 -0
- package/lib-esm/models/features/marker/marker-alter-options.d.ts +8 -0
- package/lib-esm/models/features/marker/marker-alter-options.js +10 -0
- package/lib-esm/models/features/marker/marker-alter-options.js.map +1 -0
- package/lib-esm/models/features/marker/marker-icon.d.ts +6 -0
- package/lib-esm/models/features/marker/marker-icon.js +10 -0
- package/lib-esm/models/features/marker/marker-icon.js.map +1 -0
- package/lib-esm/models/features/marker/marker-options.d.ts +11 -0
- package/lib-esm/models/features/marker/marker-options.js +18 -0
- package/lib-esm/models/features/marker/marker-options.js.map +1 -0
- package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.d.ts +6 -0
- package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.js +10 -0
- package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.js.map +1 -0
- package/lib-esm/models/features/overlay/overlay-options.d.ts +11 -0
- package/lib-esm/models/features/overlay/overlay-options.js +15 -0
- package/lib-esm/models/features/overlay/overlay-options.js.map +1 -0
- package/lib-esm/models/features/polygons/polygon-alter-options.d.ts +13 -0
- package/lib-esm/models/features/polygons/polygon-alter-options.js +14 -0
- package/lib-esm/models/features/polygons/polygon-alter-options.js.map +1 -0
- package/lib-esm/models/features/polygons/polygon-options.d.ts +15 -0
- package/{src → lib-esm/models/features}/polygons/polygon-options.js +7 -5
- package/lib-esm/models/features/polygons/polygon-options.js.map +1 -0
- package/lib-esm/models/features/polyline/navigations-options.d.ts +11 -0
- package/lib-esm/models/features/polyline/navigations-options.js +16 -0
- package/lib-esm/models/features/polyline/navigations-options.js.map +1 -0
- package/lib-esm/models/features/polyline/polyline-options.d.ts +18 -0
- package/lib-esm/models/features/polyline/polyline-options.js +20 -0
- package/lib-esm/models/features/polyline/polyline-options.js.map +1 -0
- package/lib-esm/models/features/popup/popup-options.d.ts +9 -0
- package/lib-esm/models/features/popup/popup-options.js +13 -0
- package/lib-esm/models/features/popup/popup-options.js.map +1 -0
- package/lib-esm/utils/maps-api-loader.service.d.ts +14 -0
- package/lib-esm/utils/maps-api-loader.service.js +89 -0
- package/lib-esm/utils/maps-api-loader.service.js.map +1 -0
- package/lib-esm/utils/url-builder.d.ts +20 -0
- package/lib-esm/utils/url-builder.js +44 -0
- package/lib-esm/utils/url-builder.js.map +1 -0
- package/nodemon.json +7 -0
- package/package.json +71 -53
- package/test/test.js +11 -0
- package/tslint.json +24 -0
- package/typings.json +5 -0
- package/.babelrc +0 -4
- package/.editorconfig +0 -12
- package/.eslintrc +0 -291
- package/.nvmrc +0 -1
- package/.travis.yml +0 -5
- package/demo/demo.js +0 -432
- package/demo/images/cursor_locate.png +0 -0
- package/demo/images/inicio_rota.png +0 -0
- package/demo/index.html +0 -58
- package/demo/style.css +0 -45
- package/lib/inlogMaps.js +0 -16326
- package/lib/inlogMaps.js.map +0 -1
- package/lib/inlogMaps.min.js +0 -5
- package/src/circle/circle-alter-options.js +0 -9
- package/src/events/event-return.js +0 -5
- package/src/google-maps.js +0 -722
- package/src/index.js +0 -36
- package/src/leaflet.js +0 -638
- package/src/map.js +0 -306
- package/src/marker/circle-marker-options.js +0 -9
- package/src/marker/circle-marker-style.js +0 -9
- package/src/marker/marker-alter-options.js +0 -7
- package/src/marker/marker-icon.js +0 -6
- package/src/marker/marker-options.js +0 -10
- package/src/polygons/polygon-alter-options.js +0 -9
- package/src/polyline/navigations-options.js +0 -6
- package/src/polyline/polyline-alter-options.js +0 -9
- package/src/polyline/polyline-navigation-options.js +0 -15
- package/src/polyline/polyline-options.js +0 -12
- package/src/popup/popup-options.js +0 -7
- package/test/index.spec.js +0 -32
- package/webpack.config.js +0 -50
- package/yarn.lock +0 -3403
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { SimpleMapScreenshoter } from "leaflet-simple-map-screenshoter";
|
|
38
|
+
import { MapsApiLoaderService } from "../../utils/maps-api-loader.service";
|
|
39
|
+
import LeafletCircles from "./leaflet/leaflet-circle";
|
|
40
|
+
import LeafletGeoJson from "./leaflet/leaflet-geojson";
|
|
41
|
+
import LeafletMap from "./leaflet/leaflet-map";
|
|
42
|
+
import LeafletMarkers from "./leaflet/leaflet-markers";
|
|
43
|
+
import LeafletOverlays from "./leaflet/leaflet-overlay";
|
|
44
|
+
import LeafletPolygons from "./leaflet/leaflet-polygons";
|
|
45
|
+
import LeafletPolylines from "./leaflet/leaflet-polylines";
|
|
46
|
+
import LeafletPopups from "./leaflet/leaflet-popup";
|
|
47
|
+
var Leaflet = /** @class */ (function () {
|
|
48
|
+
function Leaflet() {
|
|
49
|
+
this.leafletMarkers = null;
|
|
50
|
+
this.leafletPolygons = null;
|
|
51
|
+
this.leafletCircles = null;
|
|
52
|
+
this.leafletPolylines = null;
|
|
53
|
+
this.leafletPopups = null;
|
|
54
|
+
this.leafletMap = null;
|
|
55
|
+
this.leafletOverlays = null;
|
|
56
|
+
this.leafletGeoJson = null;
|
|
57
|
+
this.mapsApiLoader = new MapsApiLoaderService();
|
|
58
|
+
/* */
|
|
59
|
+
}
|
|
60
|
+
Leaflet.prototype.initialize = function (mapType, params, elementId) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
+
var api, leaflet_1, mapOptions, osm, wikimedia, satelliteURL, satellite, map, baseLayers_1, snapshotOptions, screenshoter, err_1;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
switch (_a.label) {
|
|
65
|
+
case 0:
|
|
66
|
+
_a.trys.push([0, 4, , 5]);
|
|
67
|
+
return [4 /*yield*/, this.mapsApiLoader.loadApi(mapType, params)];
|
|
68
|
+
case 1:
|
|
69
|
+
api = _a.sent();
|
|
70
|
+
leaflet_1 = api;
|
|
71
|
+
this.loadDependencies(params);
|
|
72
|
+
return [4 /*yield*/, this.mapTimeout(1000)];
|
|
73
|
+
case 2:
|
|
74
|
+
_a.sent();
|
|
75
|
+
mapOptions = {
|
|
76
|
+
center: new leaflet_1.LatLng(-14, -54),
|
|
77
|
+
editable: true,
|
|
78
|
+
keyboard: false,
|
|
79
|
+
maxZoom: params.wikimedia ? 18 : 19,
|
|
80
|
+
minZoom: 4,
|
|
81
|
+
zoom: 4,
|
|
82
|
+
zoomControl: false,
|
|
83
|
+
};
|
|
84
|
+
if (params.gestureHandling) {
|
|
85
|
+
mapOptions.gestureHandling = true;
|
|
86
|
+
}
|
|
87
|
+
return [4 /*yield*/, this.mapTimeout(200)];
|
|
88
|
+
case 3:
|
|
89
|
+
_a.sent();
|
|
90
|
+
osm = new leaflet_1.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", mapOptions);
|
|
91
|
+
wikimedia = new leaflet_1.tileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png", {
|
|
92
|
+
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
|
|
93
|
+
});
|
|
94
|
+
satelliteURL = "https://server.arcgisonline.com/ArcGIS/rest/services/" +
|
|
95
|
+
"World_Imagery/MapServer/tile/{z}/{y}/{x}";
|
|
96
|
+
satellite = L.tileLayer(satelliteURL, {
|
|
97
|
+
attribution: "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye," +
|
|
98
|
+
" Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",
|
|
99
|
+
maxZoom: 18,
|
|
100
|
+
});
|
|
101
|
+
mapOptions.layers = [params.wikimedia ? wikimedia : osm];
|
|
102
|
+
map = new leaflet_1.Map(elementId, mapOptions);
|
|
103
|
+
baseLayers_1 = {
|
|
104
|
+
Map: params.wikimedia ? wikimedia : osm,
|
|
105
|
+
Satellite: satellite,
|
|
106
|
+
};
|
|
107
|
+
if (params.mapTiles && params.mapTiles.length) {
|
|
108
|
+
params.mapTiles.forEach(function (tile) {
|
|
109
|
+
var layer = new leaflet_1.tileLayer(tile.url, tile.options);
|
|
110
|
+
baseLayers_1[tile.name] = layer;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
leaflet_1.control
|
|
114
|
+
.layers(baseLayers_1, null, { position: "topleft" })
|
|
115
|
+
.addTo(map);
|
|
116
|
+
leaflet_1.control.zoom({ position: "bottomright" }).addTo(map);
|
|
117
|
+
snapshotOptions = {
|
|
118
|
+
hideElementsWithSelectors: [
|
|
119
|
+
".leaflet-control-container",
|
|
120
|
+
".leaflet-dont-include-pane",
|
|
121
|
+
"#snapshot-button",
|
|
122
|
+
],
|
|
123
|
+
hidden: true,
|
|
124
|
+
};
|
|
125
|
+
screenshoter = new SimpleMapScreenshoter(snapshotOptions);
|
|
126
|
+
this.leafletScreenshot = screenshoter.addTo(map);
|
|
127
|
+
this.leafletMarkers = new LeafletMarkers(map, leaflet_1);
|
|
128
|
+
this.leafletPolygons = new LeafletPolygons(map, leaflet_1);
|
|
129
|
+
this.leafletCircles = new LeafletCircles(map, leaflet_1);
|
|
130
|
+
this.leafletPopups = new LeafletPopups(map, leaflet_1);
|
|
131
|
+
this.leafletPolylines = new LeafletPolylines(map, leaflet_1, this.leafletPopups);
|
|
132
|
+
this.leafletMap = new LeafletMap(map, leaflet_1, this.leafletPolylines);
|
|
133
|
+
this.leafletOverlays = new LeafletOverlays(map, leaflet_1, this.leafletPolygons);
|
|
134
|
+
this.leafletGeoJson = new LeafletGeoJson(map, leaflet_1);
|
|
135
|
+
return [2 /*return*/, this];
|
|
136
|
+
case 4:
|
|
137
|
+
err_1 = _a.sent();
|
|
138
|
+
console.error(err_1);
|
|
139
|
+
return [2 /*return*/, err_1];
|
|
140
|
+
case 5: return [2 /*return*/];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
/* GEOJson */
|
|
146
|
+
Leaflet.prototype.loadGEOJson = function (data, options, eventClick) {
|
|
147
|
+
var _a;
|
|
148
|
+
(_a = this.leafletGeoJson) === null || _a === void 0 ? void 0 : _a.loadGEOJson(data, options, eventClick);
|
|
149
|
+
};
|
|
150
|
+
/* Markers */
|
|
151
|
+
Leaflet.prototype.drawMarker = function (options, eventClick) {
|
|
152
|
+
var _a;
|
|
153
|
+
return (_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.drawMarker(options, eventClick);
|
|
154
|
+
};
|
|
155
|
+
Leaflet.prototype.drawCircleMarker = function (options, eventClick) {
|
|
156
|
+
var _a;
|
|
157
|
+
return (_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.drawCircleMarker(options, eventClick);
|
|
158
|
+
};
|
|
159
|
+
Leaflet.prototype.toggleMarkers = function (markers, show, markerClusterer) {
|
|
160
|
+
var _a;
|
|
161
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.toggleMarkers(markers, show, markerClusterer);
|
|
162
|
+
};
|
|
163
|
+
Leaflet.prototype.alterMarkerOptions = function (markers, options) {
|
|
164
|
+
var _a;
|
|
165
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.alterMarkerOptions(markers, options);
|
|
166
|
+
};
|
|
167
|
+
Leaflet.prototype.alterMarkerPosition = function (markers, position, addTransition) {
|
|
168
|
+
var _a;
|
|
169
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.alterMarkerPosition(markers, position, addTransition);
|
|
170
|
+
};
|
|
171
|
+
Leaflet.prototype.fitBoundsPositions = function (markers) {
|
|
172
|
+
var _a;
|
|
173
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.fitBoundsPositions(markers);
|
|
174
|
+
};
|
|
175
|
+
Leaflet.prototype.isMarkerOnMap = function (marker) {
|
|
176
|
+
var _a;
|
|
177
|
+
return (_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.isMarkerOnMap(marker);
|
|
178
|
+
};
|
|
179
|
+
Leaflet.prototype.setCenterMarker = function (marker) {
|
|
180
|
+
var _a;
|
|
181
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.setCenterMarker(marker);
|
|
182
|
+
};
|
|
183
|
+
Leaflet.prototype.addMarkerEvent = function (markers, eventType, eventFunction) {
|
|
184
|
+
var _a;
|
|
185
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.addMarkerEvent(markers, eventType, eventFunction);
|
|
186
|
+
};
|
|
187
|
+
Leaflet.prototype.removeMarkerEvent = function (markers, event) {
|
|
188
|
+
var _a;
|
|
189
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.removeMarkerEvent(markers, event);
|
|
190
|
+
};
|
|
191
|
+
/* Marker Clusterer */
|
|
192
|
+
Leaflet.prototype.addMarkerClusterer = function (config) {
|
|
193
|
+
var _a;
|
|
194
|
+
return (_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.addMarkerClusterer(config);
|
|
195
|
+
};
|
|
196
|
+
Leaflet.prototype.alterMarkerClustererConfig = function (markerClusterer, config) {
|
|
197
|
+
var _a;
|
|
198
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.alterMarkerClustererConfig(markerClusterer, config);
|
|
199
|
+
};
|
|
200
|
+
Leaflet.prototype.refreshClusterer = function (markerClusterer) {
|
|
201
|
+
var _a;
|
|
202
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.refreshClusterer(markerClusterer);
|
|
203
|
+
};
|
|
204
|
+
Leaflet.prototype.addMarkerOnClusterer = function (marker, markerClusterer) {
|
|
205
|
+
var _a;
|
|
206
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.addMarkerOnClusterer(marker, markerClusterer);
|
|
207
|
+
};
|
|
208
|
+
Leaflet.prototype.removeMarkerFromClusterer = function (marker, markerClusterer) {
|
|
209
|
+
var _a;
|
|
210
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.removeMarkerFromClusterer(marker, markerClusterer);
|
|
211
|
+
};
|
|
212
|
+
Leaflet.prototype.clearMarkersClusterer = function (markerClusterer) {
|
|
213
|
+
var _a;
|
|
214
|
+
(_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.clearMarkersClusterer(markerClusterer);
|
|
215
|
+
};
|
|
216
|
+
Leaflet.prototype.countMarkersOnCluster = function (markerClusterer) {
|
|
217
|
+
var _a;
|
|
218
|
+
return (_a = this.leafletMarkers) === null || _a === void 0 ? void 0 : _a.countMarkersOnCluster(markerClusterer);
|
|
219
|
+
};
|
|
220
|
+
/* Polygons */
|
|
221
|
+
Leaflet.prototype.drawPolygon = function (options, eventClick) {
|
|
222
|
+
var _a;
|
|
223
|
+
return (_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.drawPolygon(options, eventClick);
|
|
224
|
+
};
|
|
225
|
+
Leaflet.prototype.togglePolygons = function (polygons, show) {
|
|
226
|
+
var _a;
|
|
227
|
+
(_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.togglePolygons(polygons, show);
|
|
228
|
+
};
|
|
229
|
+
Leaflet.prototype.alterPolygonOptions = function (polygons, options) {
|
|
230
|
+
var _a;
|
|
231
|
+
(_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.alterPolygonOptions(polygons, options);
|
|
232
|
+
};
|
|
233
|
+
Leaflet.prototype.fitBoundsPolygons = function (polygons) {
|
|
234
|
+
var _a;
|
|
235
|
+
(_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.fitBoundsPolygons(polygons);
|
|
236
|
+
};
|
|
237
|
+
Leaflet.prototype.setCenterPolygons = function (polygons) {
|
|
238
|
+
var _a;
|
|
239
|
+
(_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.setCenterPolygons(polygons);
|
|
240
|
+
};
|
|
241
|
+
Leaflet.prototype.isPolygonOnMap = function (polygon) {
|
|
242
|
+
var _a;
|
|
243
|
+
return (_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.isPolygonOnMap(polygon);
|
|
244
|
+
};
|
|
245
|
+
Leaflet.prototype.getPolygonPath = function (polygon) {
|
|
246
|
+
var _a;
|
|
247
|
+
return (_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.getPolygonPath(polygon);
|
|
248
|
+
};
|
|
249
|
+
Leaflet.prototype.addPolygonEvent = function (polygons, eventType, eventFunction) {
|
|
250
|
+
var _a;
|
|
251
|
+
(_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.addPolygonEvent(polygons, eventType, eventFunction);
|
|
252
|
+
};
|
|
253
|
+
Leaflet.prototype.removePolygonEvent = function (polygons, event) {
|
|
254
|
+
var _a;
|
|
255
|
+
(_a = this.leafletPolygons) === null || _a === void 0 ? void 0 : _a.removePolygonEvent(polygons, event);
|
|
256
|
+
};
|
|
257
|
+
/* Circles */
|
|
258
|
+
Leaflet.prototype.drawCircle = function (options, eventClick) {
|
|
259
|
+
var _a;
|
|
260
|
+
return (_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.drawCircle(options, eventClick);
|
|
261
|
+
};
|
|
262
|
+
Leaflet.prototype.toggleCircles = function (circles, show) {
|
|
263
|
+
var _a;
|
|
264
|
+
(_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.toggleCircles(circles, show);
|
|
265
|
+
};
|
|
266
|
+
Leaflet.prototype.alterCircleOptions = function (circles, options) {
|
|
267
|
+
var _a;
|
|
268
|
+
(_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.alterCircleOptions(circles, options);
|
|
269
|
+
};
|
|
270
|
+
Leaflet.prototype.fitBoundsCircles = function (circles) {
|
|
271
|
+
var _a;
|
|
272
|
+
(_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.fitBoundsCircles(circles);
|
|
273
|
+
};
|
|
274
|
+
Leaflet.prototype.isCircleOnMap = function (circle) {
|
|
275
|
+
var _a;
|
|
276
|
+
return (_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.isCircleOnMap(circle);
|
|
277
|
+
};
|
|
278
|
+
Leaflet.prototype.getCircleCenter = function (circle) {
|
|
279
|
+
var _a;
|
|
280
|
+
return (_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.getCircleCenter(circle);
|
|
281
|
+
};
|
|
282
|
+
Leaflet.prototype.getCircleRadius = function (circle) {
|
|
283
|
+
var _a;
|
|
284
|
+
return (_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.getCircleRadius(circle);
|
|
285
|
+
};
|
|
286
|
+
Leaflet.prototype.addCircleEvent = function (circles, eventType, eventFunction) {
|
|
287
|
+
var _a;
|
|
288
|
+
(_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.addCircleEvent(circles, eventType, eventFunction);
|
|
289
|
+
};
|
|
290
|
+
Leaflet.prototype.removeCircleEvent = function (circles, event) {
|
|
291
|
+
var _a;
|
|
292
|
+
(_a = this.leafletCircles) === null || _a === void 0 ? void 0 : _a.removeCircleEvent(circles, event);
|
|
293
|
+
};
|
|
294
|
+
/* Polylines */
|
|
295
|
+
Leaflet.prototype.drawPolyline = function (options, eventClick) {
|
|
296
|
+
var _a;
|
|
297
|
+
return (_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.drawPolyline(options, eventClick);
|
|
298
|
+
};
|
|
299
|
+
Leaflet.prototype.drawPolylineWithNavigation = function (options, eventClick) {
|
|
300
|
+
var _a;
|
|
301
|
+
return (_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.drawPolylineWithNavigation(options, eventClick);
|
|
302
|
+
};
|
|
303
|
+
Leaflet.prototype.togglePolylines = function (polylines, show) {
|
|
304
|
+
var _a;
|
|
305
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.togglePolylines(polylines, show);
|
|
306
|
+
};
|
|
307
|
+
Leaflet.prototype.alterPolylineOptions = function (polylines, options) {
|
|
308
|
+
var _a;
|
|
309
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.alterPolylineOptions(polylines, options);
|
|
310
|
+
};
|
|
311
|
+
Leaflet.prototype.fitBoundsPolylines = function (polylines) {
|
|
312
|
+
var _a;
|
|
313
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.fitBoundsPolylines(polylines);
|
|
314
|
+
};
|
|
315
|
+
Leaflet.prototype.isPolylineOnMap = function (polyline) {
|
|
316
|
+
var _a;
|
|
317
|
+
return (_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.isPolylineOnMap(polyline);
|
|
318
|
+
};
|
|
319
|
+
Leaflet.prototype.addPolylinePath = function (polylines, position) {
|
|
320
|
+
var _a;
|
|
321
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.addPolylinePath(polylines, position);
|
|
322
|
+
};
|
|
323
|
+
Leaflet.prototype.getPolylinePath = function (polyline) {
|
|
324
|
+
var _a;
|
|
325
|
+
return (_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.getPolylinePath(polyline);
|
|
326
|
+
};
|
|
327
|
+
Leaflet.prototype.removePolylineHighlight = function () {
|
|
328
|
+
var _a;
|
|
329
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.removePolylineHighlight();
|
|
330
|
+
};
|
|
331
|
+
Leaflet.prototype.addPolylineEvent = function (polylines, eventType, eventFunction) {
|
|
332
|
+
var _a;
|
|
333
|
+
console.log("ADICIONANDO EVENTO POLYLINE", eventType);
|
|
334
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.addPolylineEvent(polylines, eventType, eventFunction);
|
|
335
|
+
};
|
|
336
|
+
Leaflet.prototype.removePolylineEvent = function (polylines, event) {
|
|
337
|
+
var _a;
|
|
338
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.removePolylineEvent(polylines, event);
|
|
339
|
+
};
|
|
340
|
+
Leaflet.prototype.setIndexPolylineHighlight = function (polyline, index) {
|
|
341
|
+
var _a;
|
|
342
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.setIndexPolylineHighlight(polyline, index);
|
|
343
|
+
};
|
|
344
|
+
Leaflet.prototype.getObjectPolyline = function (polyline) {
|
|
345
|
+
var _a;
|
|
346
|
+
return (_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.getObjectPolyline(polyline);
|
|
347
|
+
};
|
|
348
|
+
Leaflet.prototype.getObjectPolylineHighlight = function () {
|
|
349
|
+
var _a;
|
|
350
|
+
return (_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.getObjectPolylineHighlight();
|
|
351
|
+
};
|
|
352
|
+
Leaflet.prototype.addPolylineHighlightEvent = function (eventType, eventFunction) {
|
|
353
|
+
var _a;
|
|
354
|
+
(_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.addPolylineHighlightEvent(eventType, eventFunction);
|
|
355
|
+
};
|
|
356
|
+
Leaflet.prototype.getPolylineHighlightIndex = function () {
|
|
357
|
+
var _a;
|
|
358
|
+
return (_a = this.leafletPolylines) === null || _a === void 0 ? void 0 : _a.getPolylineHighlightIndex();
|
|
359
|
+
};
|
|
360
|
+
/* Popups */
|
|
361
|
+
Leaflet.prototype.drawPopup = function (options, marker) {
|
|
362
|
+
var _a;
|
|
363
|
+
return (_a = this.leafletPopups) === null || _a === void 0 ? void 0 : _a.drawPopup(options, marker);
|
|
364
|
+
};
|
|
365
|
+
Leaflet.prototype.alterPopup = function (popup, options, marker) {
|
|
366
|
+
var _a;
|
|
367
|
+
return (_a = this.leafletPopups) === null || _a === void 0 ? void 0 : _a.alterPopup(popup, options, marker);
|
|
368
|
+
};
|
|
369
|
+
Leaflet.prototype.alterPopupContent = function (popup, options, marker) {
|
|
370
|
+
var _a;
|
|
371
|
+
(_a = this.leafletPopups) === null || _a === void 0 ? void 0 : _a.alterPopupContent(popup, options, marker);
|
|
372
|
+
};
|
|
373
|
+
Leaflet.prototype.closePopup = function (popup) {
|
|
374
|
+
var _a;
|
|
375
|
+
(_a = this.leafletPopups) === null || _a === void 0 ? void 0 : _a.closePopup(popup);
|
|
376
|
+
};
|
|
377
|
+
/* Map */
|
|
378
|
+
Leaflet.prototype.resizeMap = function () {
|
|
379
|
+
var _a;
|
|
380
|
+
(_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.resizeMap();
|
|
381
|
+
};
|
|
382
|
+
Leaflet.prototype.addEventMap = function (eventType, eventFunction) {
|
|
383
|
+
var _a;
|
|
384
|
+
(_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.addEventMap(eventType, eventFunction);
|
|
385
|
+
};
|
|
386
|
+
Leaflet.prototype.removeEventMap = function (eventType) {
|
|
387
|
+
var _a;
|
|
388
|
+
(_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.removeEventMap(eventType);
|
|
389
|
+
};
|
|
390
|
+
Leaflet.prototype.getZoom = function () {
|
|
391
|
+
var _a;
|
|
392
|
+
return (_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.getZoom();
|
|
393
|
+
};
|
|
394
|
+
Leaflet.prototype.setZoom = function (zoom) {
|
|
395
|
+
var _a;
|
|
396
|
+
(_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.setZoom(zoom);
|
|
397
|
+
};
|
|
398
|
+
Leaflet.prototype.takeMapScreenshot = function () {
|
|
399
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
400
|
+
var image;
|
|
401
|
+
return __generator(this, function (_a) {
|
|
402
|
+
switch (_a.label) {
|
|
403
|
+
case 0: return [4 /*yield*/, this.leafletScreenshot.takeScreen("image")];
|
|
404
|
+
case 1:
|
|
405
|
+
image = _a.sent();
|
|
406
|
+
return [2 /*return*/, image];
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
Leaflet.prototype.getCenter = function () {
|
|
412
|
+
var _a;
|
|
413
|
+
return (_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.getCenter();
|
|
414
|
+
};
|
|
415
|
+
Leaflet.prototype.setCenter = function (position) {
|
|
416
|
+
var _a;
|
|
417
|
+
(_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.setCenter(position);
|
|
418
|
+
};
|
|
419
|
+
Leaflet.prototype.pixelsToLatLng = function (offsetx, offsety) {
|
|
420
|
+
var _a;
|
|
421
|
+
return (_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.pixelsToLatLng(offsetx, offsety);
|
|
422
|
+
};
|
|
423
|
+
Leaflet.prototype.fitBoundsElements = function (markers, circles, polygons, polylines) {
|
|
424
|
+
var _a;
|
|
425
|
+
(_a = this.leafletMap) === null || _a === void 0 ? void 0 : _a.fitBoundsElements(markers, circles, polygons, polylines);
|
|
426
|
+
};
|
|
427
|
+
/* Overlay */
|
|
428
|
+
Leaflet.prototype.drawOverlay = function (options, polygons) {
|
|
429
|
+
var _a;
|
|
430
|
+
return (_a = this.leafletOverlays) === null || _a === void 0 ? void 0 : _a.drawOverlay(options, polygons);
|
|
431
|
+
};
|
|
432
|
+
Leaflet.prototype.toggleOverlay = function (overlays, show) {
|
|
433
|
+
var _a;
|
|
434
|
+
(_a = this.leafletOverlays) === null || _a === void 0 ? void 0 : _a.toggleOverlay(overlays, show);
|
|
435
|
+
};
|
|
436
|
+
/* Private Methods */
|
|
437
|
+
Leaflet.prototype.mapTimeout = function (ms) {
|
|
438
|
+
return new Promise(function (resolve) { return setTimeout(resolve, ms); });
|
|
439
|
+
};
|
|
440
|
+
Leaflet.prototype.loadDependencies = function (params) {
|
|
441
|
+
var styles = params.cssDependencies;
|
|
442
|
+
if (styles && styles.length > 0) {
|
|
443
|
+
styles.forEach(function (path) {
|
|
444
|
+
var _a;
|
|
445
|
+
var link = document.createElement("link");
|
|
446
|
+
link.rel = "stylesheet";
|
|
447
|
+
link.href = path;
|
|
448
|
+
(_a = document === null || document === void 0 ? void 0 : document.querySelector("head")) === null || _a === void 0 ? void 0 : _a.appendChild(link);
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
var scripts = params.scriptsDependencies;
|
|
452
|
+
if (scripts && scripts.length > 0) {
|
|
453
|
+
scripts.forEach(function (path) {
|
|
454
|
+
var _a;
|
|
455
|
+
var script = document.createElement("script");
|
|
456
|
+
script.type = "text/javascript";
|
|
457
|
+
script.src = path;
|
|
458
|
+
(_a = document.querySelector("head")) === null || _a === void 0 ? void 0 : _a.appendChild(script);
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
return Leaflet;
|
|
463
|
+
}());
|
|
464
|
+
export default Leaflet;
|
|
465
|
+
//# sourceMappingURL=leaflet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leaflet.js","sourceRoot":"","sources":["../../../src/models/apis/leaflet.ts"],"names":[],"mappings":";;;;;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,CAAC,CAAC;IAC7D,CAAC;IAEO,kCAAgB,GAAxB,UAAyB,MAAW;QAChC,IAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;QACtC,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,CAAC,OAAO,CAAC,UAAC,IAAS;;gBACrB,IAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;gBAC5C,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC;gBACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;gBACjB,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,CAAC,MAAM,CAAC,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,CAAC;QAC3C,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,OAAO,CAAC,UAAC,IAAS;;gBACtB,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;gBAChD,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC;gBAChC,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC;gBAClB,MAAA,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,0CAAE,WAAW,CAAC,MAAM,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IACL,cAAC;AAAD,CAAC,AAvgBD,IAugBC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { MarkerEventType, CircleEventType, PolygonEventType, PolylineEventType, MapEventType } from '../dto/event-type';
|
|
2
|
+
import { MapType } from '../dto/map-type';
|
|
3
|
+
import CircleAlterOptions from '../features/circle/circle-alter-options';
|
|
4
|
+
import CircleOptions from '../features/circle/circle-options';
|
|
5
|
+
import GeoJsonOptions from '../features/geojson/geojson-options';
|
|
6
|
+
import CircleMarkerOptions from '../features/marker/circle-marker-options';
|
|
7
|
+
import MarkerAlterOptions from '../features/marker/marker-alter-options';
|
|
8
|
+
import MarkerOptions from '../features/marker/marker-options';
|
|
9
|
+
import OverlayOptions from '../features/overlay/overlay-options';
|
|
10
|
+
import PolygonAlterOptions from '../features/polygons/polygon-alter-options';
|
|
11
|
+
import PolygonOptions from '../features/polygons/polygon-options';
|
|
12
|
+
import PolylineOptions from '../features/polyline/polyline-options';
|
|
13
|
+
import PopupOptions from '../features/popup/popup-options';
|
|
14
|
+
import MarkerClustererConfig from '../features/marker-clusterer/marker-clusterer-config';
|
|
15
|
+
export default interface IMapFunctions {
|
|
16
|
+
initialize(mapType: MapType, params: object, elementId: string): Promise<any>;
|
|
17
|
+
loadGEOJson(data: object, options: GeoJsonOptions, eventClick: any): void;
|
|
18
|
+
drawMarker(options: MarkerOptions, eventClick: any): any;
|
|
19
|
+
drawCircleMarker(options: CircleMarkerOptions, eventClick: any): any;
|
|
20
|
+
toggleMarkers(markers: any[], show: boolean, markerClusterer?: any): void;
|
|
21
|
+
alterMarkerOptions(markers: any[], options: MarkerAlterOptions): void;
|
|
22
|
+
alterMarkerPosition(markers: any[], position: number[], addTransition: boolean): void;
|
|
23
|
+
fitBoundsPositions(markers: any[]): void;
|
|
24
|
+
isMarkerOnMap(marker: any): boolean | undefined;
|
|
25
|
+
setCenterMarker(marker: any): void;
|
|
26
|
+
addMarkerEvent(markers: any, event: MarkerEventType, eventFunction: any): void;
|
|
27
|
+
removeMarkerEvent(markers: any, event: MarkerEventType): void;
|
|
28
|
+
addMarkerClusterer(config: MarkerClustererConfig): any;
|
|
29
|
+
refreshClusterer(markerClusterer: any): void;
|
|
30
|
+
addMarkerOnClusterer(marker: any, markerClusterer: any): void;
|
|
31
|
+
removeMarkerFromClusterer(marker: any, markerClusterer: any): void;
|
|
32
|
+
clearMarkersClusterer(markerClusterer: any): void;
|
|
33
|
+
alterMarkerClustererConfig(markerClusterer: any, config: MarkerClustererConfig): void;
|
|
34
|
+
countMarkersOnCluster(markerClusterer: any): number;
|
|
35
|
+
drawPolygon(options: PolygonOptions, eventClick: any): any;
|
|
36
|
+
togglePolygons(polygons: any[], show: boolean): void;
|
|
37
|
+
alterPolygonOptions(polygons: any[], options: PolygonAlterOptions): void;
|
|
38
|
+
fitBoundsPolygons(polygons: any): void;
|
|
39
|
+
setCenterPolygons(polygons: any): void;
|
|
40
|
+
isPolygonOnMap(polygon: any): boolean;
|
|
41
|
+
getPolygonPath(polygon: any): number[][];
|
|
42
|
+
addPolygonEvent(polygons: any, event: PolygonEventType, eventFunction: any): void;
|
|
43
|
+
removePolygonEvent(polygons: any, event: PolygonEventType): void;
|
|
44
|
+
drawCircle(options: CircleOptions, eventClick: any): any;
|
|
45
|
+
toggleCircles(circles: any[], show: boolean): void;
|
|
46
|
+
alterCircleOptions(circles: any[], options: CircleAlterOptions): void;
|
|
47
|
+
fitBoundsCircles(circles: any): void;
|
|
48
|
+
isCircleOnMap(circle: any): boolean;
|
|
49
|
+
getCircleCenter(circle: any): number[];
|
|
50
|
+
getCircleRadius(circle: any): number;
|
|
51
|
+
addCircleEvent(circles: any, event: CircleEventType, eventFunction: any): void;
|
|
52
|
+
removeCircleEvent(circles: any, event: CircleEventType): void;
|
|
53
|
+
drawPolyline(options: PolylineOptions, eventClick: any): any;
|
|
54
|
+
drawPolylineWithNavigation(options: PolylineOptions, eventClick?: any): any;
|
|
55
|
+
togglePolylines(polylines: any, show: boolean): void;
|
|
56
|
+
alterPolylineOptions(polylines: any, options: PolylineOptions): void;
|
|
57
|
+
fitBoundsPolylines(polylines: any): void;
|
|
58
|
+
isPolylineOnMap(polyline: any): boolean;
|
|
59
|
+
addPolylinePath(polylines: any, position: number[]): void;
|
|
60
|
+
getPolylinePath(polyline: any): number[][];
|
|
61
|
+
removePolylineHighlight(): void;
|
|
62
|
+
addPolylineEvent(polyline: any, event: PolylineEventType, eventFunction: any): any;
|
|
63
|
+
removePolylineEvent(polyline: any, event: PolylineEventType): void;
|
|
64
|
+
setIndexPolylineHighlight(polyline: any, index: number): void;
|
|
65
|
+
getObjectPolyline(polyline: any): object;
|
|
66
|
+
addPolylineHighlightEvent(event: PolylineEventType, eventFunction: any): void;
|
|
67
|
+
getPolylineHighlightIndex(): number[];
|
|
68
|
+
getObjectPolylineHighlight(): object;
|
|
69
|
+
drawPopup(options: PopupOptions, marker?: any): any;
|
|
70
|
+
alterPopup(popup: any, options: PopupOptions, marker?: any): void;
|
|
71
|
+
alterPopupContent(popup: any, options: PopupOptions, marker?: any): void;
|
|
72
|
+
closePopup(popup: any): void;
|
|
73
|
+
resizeMap(): void;
|
|
74
|
+
addEventMap(eventType: MapEventType, eventFunction: any): void;
|
|
75
|
+
removeEventMap(eventType: MapEventType): void;
|
|
76
|
+
getZoom(): number;
|
|
77
|
+
setZoom(zoom: number): void;
|
|
78
|
+
getCenter(): number[];
|
|
79
|
+
setCenter(position: number[]): void;
|
|
80
|
+
pixelsToLatLng(offsetx: number, offsety: number): number[];
|
|
81
|
+
fitBoundsElements(markers: any, circles: any, polygons: any, polylines: any): void;
|
|
82
|
+
drawOverlay(options: OverlayOptions, polygons?: any): any;
|
|
83
|
+
toggleOverlay(overlays: any[], show: boolean): void;
|
|
84
|
+
takeMapScreenshot(): Promise<string | null>;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapFunctions.js","sourceRoot":"","sources":["../../../src/models/apis/mapFunctions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare enum MapEventType {
|
|
2
|
+
Click = 0,
|
|
3
|
+
ZoomChanged = 1
|
|
4
|
+
}
|
|
5
|
+
export declare enum MarkerEventType {
|
|
6
|
+
Click = 0,
|
|
7
|
+
RightClick = 1,
|
|
8
|
+
AfterDrag = 2,
|
|
9
|
+
MouseOver = 3,
|
|
10
|
+
MouseOut = 4,
|
|
11
|
+
BeforeDrag = 5
|
|
12
|
+
}
|
|
13
|
+
export declare enum CircleEventType {
|
|
14
|
+
Click = 0,
|
|
15
|
+
CenterChanged = 1,
|
|
16
|
+
RadiusChanged = 2
|
|
17
|
+
}
|
|
18
|
+
export declare enum PolygonEventType {
|
|
19
|
+
SetAt = 0,
|
|
20
|
+
InsertAt = 1,
|
|
21
|
+
RemoveAt = 2,
|
|
22
|
+
DragPolygon = 3,
|
|
23
|
+
Click = 4
|
|
24
|
+
}
|
|
25
|
+
export declare enum PolylineEventType {
|
|
26
|
+
SetAt = 0,
|
|
27
|
+
InsertAt = 1,
|
|
28
|
+
RemoveAt = 2,
|
|
29
|
+
DragPolyline = 3,
|
|
30
|
+
MouseOver = 4,
|
|
31
|
+
MouseOut = 5,
|
|
32
|
+
RightClick = 6
|
|
33
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export var MapEventType;
|
|
2
|
+
(function (MapEventType) {
|
|
3
|
+
MapEventType[MapEventType["Click"] = 0] = "Click";
|
|
4
|
+
MapEventType[MapEventType["ZoomChanged"] = 1] = "ZoomChanged";
|
|
5
|
+
})(MapEventType || (MapEventType = {}));
|
|
6
|
+
export var MarkerEventType;
|
|
7
|
+
(function (MarkerEventType) {
|
|
8
|
+
MarkerEventType[MarkerEventType["Click"] = 0] = "Click";
|
|
9
|
+
MarkerEventType[MarkerEventType["RightClick"] = 1] = "RightClick";
|
|
10
|
+
MarkerEventType[MarkerEventType["AfterDrag"] = 2] = "AfterDrag";
|
|
11
|
+
MarkerEventType[MarkerEventType["MouseOver"] = 3] = "MouseOver";
|
|
12
|
+
MarkerEventType[MarkerEventType["MouseOut"] = 4] = "MouseOut";
|
|
13
|
+
MarkerEventType[MarkerEventType["BeforeDrag"] = 5] = "BeforeDrag";
|
|
14
|
+
})(MarkerEventType || (MarkerEventType = {}));
|
|
15
|
+
export var CircleEventType;
|
|
16
|
+
(function (CircleEventType) {
|
|
17
|
+
CircleEventType[CircleEventType["Click"] = 0] = "Click";
|
|
18
|
+
CircleEventType[CircleEventType["CenterChanged"] = 1] = "CenterChanged";
|
|
19
|
+
CircleEventType[CircleEventType["RadiusChanged"] = 2] = "RadiusChanged";
|
|
20
|
+
})(CircleEventType || (CircleEventType = {}));
|
|
21
|
+
export var PolygonEventType;
|
|
22
|
+
(function (PolygonEventType) {
|
|
23
|
+
PolygonEventType[PolygonEventType["SetAt"] = 0] = "SetAt";
|
|
24
|
+
PolygonEventType[PolygonEventType["InsertAt"] = 1] = "InsertAt";
|
|
25
|
+
PolygonEventType[PolygonEventType["RemoveAt"] = 2] = "RemoveAt";
|
|
26
|
+
PolygonEventType[PolygonEventType["DragPolygon"] = 3] = "DragPolygon";
|
|
27
|
+
PolygonEventType[PolygonEventType["Click"] = 4] = "Click";
|
|
28
|
+
})(PolygonEventType || (PolygonEventType = {}));
|
|
29
|
+
export var PolylineEventType;
|
|
30
|
+
(function (PolylineEventType) {
|
|
31
|
+
PolylineEventType[PolylineEventType["SetAt"] = 0] = "SetAt";
|
|
32
|
+
PolylineEventType[PolylineEventType["InsertAt"] = 1] = "InsertAt";
|
|
33
|
+
PolylineEventType[PolylineEventType["RemoveAt"] = 2] = "RemoveAt";
|
|
34
|
+
PolylineEventType[PolylineEventType["DragPolyline"] = 3] = "DragPolyline";
|
|
35
|
+
PolylineEventType[PolylineEventType["MouseOver"] = 4] = "MouseOver";
|
|
36
|
+
PolylineEventType[PolylineEventType["MouseOut"] = 5] = "MouseOut";
|
|
37
|
+
PolylineEventType[PolylineEventType["RightClick"] = 6] = "RightClick";
|
|
38
|
+
})(PolylineEventType || (PolylineEventType = {}));
|
|
39
|
+
//# sourceMappingURL=event-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-type.js","sourceRoot":"","sources":["../../../src/models/dto/event-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,iDAAK,CAAA;IACL,6DAAW,CAAA;AACf,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACvB,uDAAK,CAAA;IACL,iEAAU,CAAA;IACV,+DAAS,CAAA;IACT,+DAAS,CAAA;IACT,6DAAQ,CAAA;IACR,iEAAU,CAAA;AACd,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,uDAAK,CAAA;IACL,uEAAa,CAAA;IACb,uEAAa,CAAA;AACjB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,yDAAK,CAAA;IACL,+DAAQ,CAAA;IACR,+DAAQ,CAAA;IACR,qEAAW,CAAA;IACX,yDAAK,CAAA;AACT,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B;AAED,MAAM,CAAN,IAAY,iBAQX;AARD,WAAY,iBAAiB;IACzB,2DAAK,CAAA;IACL,iEAAQ,CAAA;IACR,iEAAQ,CAAA;IACR,yEAAY,CAAA;IACZ,mEAAS,CAAA;IACT,iEAAQ,CAAA;IACR,qEAAU,CAAA;AACd,CAAC,EARW,iBAAiB,KAAjB,iBAAiB,QAQ5B"}
|