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js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/Graticule.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/GraticuleSeries.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapArc.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapArcSeries.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapImage.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapImageSeries.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapLine.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapLineObject.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapLineSeries.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapObject.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapPolygon.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapPolygonSeries.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapSeries.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapSpline.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapSplineSeries.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/MapUtils.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/SmallMap.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/ZoomControl.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Mercator.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Miller.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Eckert6.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Orthographic.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Stereographic.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Albers.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/AlbersUSA.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/NaturalEarth1.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/AzimuthalEqualArea.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/EqualEarth.js","webpack://rokk3rfuel/./node_modules/@amcharts/amcharts4/.internal/charts/map/projections/Projection.js"],"sourcesContent":["/**\r\n * A collection of GeoJSON format-related utility functions.\r\n */\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $array from \"../../core/utils/Array\";\r\n/**\r\n * Normalizes a geo-point.\r\n *\r\n * @ignore Exclude from docs\r\n * @param geoPoint Source geo-point\r\n * @return Normalized geo-point\r\n */\r\nexport function normalizePoint(geoPoint) {\r\n var longitude = wrapAngleTo180(geoPoint.longitude);\r\n var latitude = Math.asin(Math.sin((geoPoint.latitude * $math.RADIANS))) * $math.DEGREES;\r\n var latitude180 = wrapAngleTo180(geoPoint.latitude);\r\n if (Math.abs(latitude180) > 90) {\r\n longitude = wrapAngleTo180(longitude + 180);\r\n }\r\n geoPoint.longitude = longitude;\r\n geoPoint.latitude = latitude;\r\n return geoPoint;\r\n}\r\n/**\r\n * Normalizes all points of a geo-line.\r\n *\r\n * @ignore Exclude from docs\r\n * @param multiline Source geo-line\r\n * @return Normalized geo-line\r\n */\r\nexport function normalizeMultiline(multiline) {\r\n $array.each(multiline, function (segment) {\r\n $array.each(segment, function (point) {\r\n normalizePoint(point);\r\n });\r\n });\r\n return multiline;\r\n}\r\n/**\r\n * [wrapAngleTo180 description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n * @param angle Angle\r\n * @return Angle\r\n */\r\nexport function wrapAngleTo180(angle) {\r\n angle = angle % 360;\r\n if (angle > 180) {\r\n angle -= 360;\r\n }\r\n if (angle < -180) {\r\n angle += 360;\r\n }\r\n return angle;\r\n}\r\n/**\r\n * Converts a geo point to a regular point object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param geoPoint Source geo point\r\n * @return Point\r\n */\r\nexport function geoToPoint(geoPoint) {\r\n return { x: geoPoint.longitude, y: geoPoint.latitude };\r\n}\r\n//# sourceMappingURL=Geo.js.map","/**\r\n * Graticule (map grid line).\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLine } from \"./MapLine\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Graticule is a map line spanning from the poles or around the globe.\r\n *\r\n * @since 4.3.0\r\n * @see {@link IGraticuleEvents} for a list of available events\r\n * @see {@link IGraticuleAdapters} for a list of available Adapters\r\n */\r\nvar Graticule = /** @class */ (function (_super) {\r\n __extends(Graticule, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Graticule() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"Graticule\";\r\n // Apply theme\r\n _this.applyTheme();\r\n _this.shortestDistance = true;\r\n return _this;\r\n }\r\n return Graticule;\r\n}(MapLine));\r\nexport { Graticule };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Graticule\"] = Graticule;\r\n//# sourceMappingURL=Graticule.js.map","/**\r\n * Graticule (map grid) series functionality.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLineSeries, MapLineSeriesDataItem } from \"./MapLineSeries\";\r\nimport { Graticule } from \"./Graticule\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\nimport * as $array from \"../../core/utils/Array\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[GraticuleSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar GraticuleSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(GraticuleSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function GraticuleSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"GraticuleSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return GraticuleSeriesDataItem;\r\n}(MapLineSeriesDataItem));\r\nexport { GraticuleSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This class is used to create a set of graticules (map grid).\r\n *\r\n * To enable, create like you would create any regular map series:\r\n *\r\n * ```TypeScript\r\n * let graticule = chart.series.push(new am4maps.GraticuleSeries())\r\n * graticule.mapLines.template.line.stroke = am4core.color(\"#000000\");\r\n * graticule.mapLines.template.line.strokeOpacity = 0.1;\r\n * ```\r\n * ```JavaScript\r\n * var graticule = chart.series.push(new am4maps.GraticuleSeries())\r\n * graticule.mapLines.template.line.stroke = am4core.color(\"#000000\");\r\n * graticule.mapLines.template.line.strokeOpacity = 0.1;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * \"type\": \"GraticuleSeries\",\r\n * \"mapLines\": {\r\n * \"line\": {\r\n * \"stroke\": \"#000000\",\r\n * \"strokeOpacity\": 0.1\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.3.0\r\n * @see {@link IGraticuleSeriesEvents} for a list of available Events\r\n * @see {@link IGraticuleSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar GraticuleSeries = /** @class */ (function (_super) {\r\n __extends(GraticuleSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function GraticuleSeries() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"GraticuleSeries\";\r\n _this.longitudeStep = 10;\r\n _this.latitudeStep = 10;\r\n _this.north = 90;\r\n _this.south = -90;\r\n _this.east = -180;\r\n _this.west = 180;\r\n //this.majorLatitudeStep = 90;\r\n //this.majorLongitudeStep = 360;\r\n _this.fitExtent = true;\r\n _this.singleSprite = true;\r\n _this.events.disableType(\"geoBoundsChanged\");\r\n _this.mapLines.template.line.strokeOpacity = 0.08;\r\n _this.ignoreBounds = false;\r\n _this.hiddenInLegend = true;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n GraticuleSeries.prototype.createDataItem = function () {\r\n return new GraticuleSeriesDataItem();\r\n };\r\n GraticuleSeries.prototype.validateData = function () {\r\n var _this = this;\r\n _super.prototype.validateData.call(this);\r\n this.mapLines.clear();\r\n var graticule = d3geo.geoGraticule();\r\n if (graticule) {\r\n graticule.stepMinor([this.longitudeStep, this.latitudeStep]);\r\n graticule.stepMajor([360, 360]);\r\n var chart = this.chart;\r\n if (this.fitExtent) {\r\n graticule.extent([[chart.east, chart.north], [chart.west, chart.south]]);\r\n }\r\n else {\r\n graticule.extent([[this.east, this.north], [this.west, this.south]]);\r\n }\r\n if (this.singleSprite) {\r\n var mapLine = this.mapLines.create();\r\n mapLine.multiLine = graticule().coordinates;\r\n }\r\n else {\r\n var lineStrings = graticule.lines();\r\n $array.each(lineStrings, function (lineString) {\r\n var mapLine = _this.mapLines.create();\r\n mapLine.multiLine = [lineString.coordinates];\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n GraticuleSeries.prototype.createLine = function () {\r\n return new Graticule();\r\n };\r\n Object.defineProperty(GraticuleSeries.prototype, \"latitudeStep\", {\r\n /**\r\n * @return Step\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"latitudeStep\");\r\n },\r\n /**\r\n * Draw a graticule (grid) every X degrees of latitude.\r\n *\r\n * @default 10\r\n * @param value Step\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"latitudeStep\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraticuleSeries.prototype, \"longitudeStep\", {\r\n /**\r\n * @return Step\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"longitudeStep\");\r\n },\r\n /**\r\n * Draw a graticule (grid) every X degrees of longitude.\r\n *\r\n * @default 10\r\n * @param value Step\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"longitudeStep\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraticuleSeries.prototype, \"fitExtent\", {\r\n /**\r\n * @return Fit?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fitExtent\");\r\n },\r\n /**\r\n * Draw a thicker (major) graticule every X degrees of latitude.\r\n *\r\n * @default 90\r\n * @param value Step\r\n */\r\n // public set majorLatitudeStep(value: number) {\r\n // \tif (this.setPropertyValue(\"majorLatitudeStep\", value)) {\r\n // \t\tthis.invalidateData();\r\n // \t}\r\n // }\r\n /**\r\n * @return Step\r\n */\r\n // public get majorLatitudeStep(): number {\r\n // \treturn this.getPropertyValue(\"majorLatitudeStep\");\r\n // }\r\n /**\r\n * Draw a thicker (major) graticule every X degrees of longitude.\r\n *\r\n * @default 360\r\n * @param value Step\r\n */\r\n // public set majorLongitudeStep(value: number) {\r\n // \tif (this.setPropertyValue(\"majorLongitudeStep\", value)) {\r\n // \t\tthis.invalidateData();\r\n // \t}\r\n // }\r\n /**\r\n * @return Step\r\n */\r\n // public get majorLongitudeStep(): number {\r\n // \treturn this.getPropertyValue(\"majorLongitudeStep\");\r\n // }\r\n /**\r\n * Whether to cap graticules (grid) to actual span of the map (`true`), e.g.\r\n * where there are polygons, or draw full-world grid (`false`).\r\n *\r\n * For world maps, using `false` makes sense. For smaller maps - not so much.\r\n *\r\n * If set to `false`, the grid will be drawn from this series `east` to\r\n * `west`, and from `south` to `north` (default values: `east = -180`;\r\n * `west = 180`; `south =-90`; `north =90`).\r\n *\r\n * These can be overridden by setting `GraticuleSeries`' respective\r\n * properties.\r\n *\r\n * @default true\r\n * @param value Fit?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"fitExtent\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraticuleSeries.prototype, \"singleSprite\", {\r\n /**\r\n * @return Use single sprite?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"singleSprite\");\r\n },\r\n /**\r\n * Whether to draw all the grid as a single element or as separate lines.\r\n *\r\n * Setting `true` (default) will result in better performance, whereas\r\n * `false` allows setting visual properties of each line individually.\r\n *\r\n * @default true\r\n * @param value Use single sprite?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"singleSprite\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraticuleSeries;\r\n}(MapLineSeries));\r\nexport { GraticuleSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"GraticuleSeries\"] = GraticuleSeries;\r\nregistry.registeredClasses[\"GraticuleSeriesDataItem\"] = GraticuleSeriesDataItem;\r\n//# sourceMappingURL=GraticuleSeries.js.map","/**\r\n * Map arched line module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLine } from \"./MapLine\";\r\nimport { Polyarc } from \"../../core/elements/Polyarc\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw an arched line on the map.\r\n *\r\n * @see {@link IMapArcEvents} for a list of available events\r\n * @see {@link IMapArcAdapters} for a list of available Adapters\r\n */\r\nvar MapArc = /** @class */ (function (_super) {\r\n __extends(MapArc, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapArc() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapArc\";\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapArc.prototype.createLine = function () {\r\n this.line = new Polyarc();\r\n };\r\n Object.defineProperty(MapArc.prototype, \"shortestDistance\", {\r\n get: function () {\r\n return false;\r\n },\r\n /**\r\n * `shortestDistance = true` is not supported by `MapArc`.\r\n *\r\n * Only [[MapLine]] supports it.\r\n *\r\n * @default false\r\n * @param value\r\n */\r\n set: function (value) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapArc;\r\n}(MapLine));\r\nexport { MapArc };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapArc\"] = MapArc;\r\n//# sourceMappingURL=MapArc.js.map","/**\r\n * Map arc series module.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLineSeries, MapLineSeriesDataItem } from \"./MapLineSeries\";\r\nimport { MapArc } from \"./MapArc\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapArcSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar MapArcSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapArcSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapArcSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapArcSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return MapArcSeriesDataItem;\r\n}(MapLineSeriesDataItem));\r\nexport { MapArcSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of arc elements. (curved lines)\r\n *\r\n * @see {@link IMapArcSeriesEvents} for a list of available Events\r\n * @see {@link IMapArcSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapArcSeries = /** @class */ (function (_super) {\r\n __extends(MapArcSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapArcSeries() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapArcSeries\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapArcSeries.prototype.createDataItem = function () {\r\n return new MapArcSeriesDataItem();\r\n };\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n MapArcSeries.prototype.createLine = function () {\r\n return new MapArc();\r\n };\r\n return MapArcSeries;\r\n}(MapLineSeries));\r\nexport { MapArcSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapArcSeries\"] = MapArcSeries;\r\nregistry.registeredClasses[\"MapArcSeriesDataItem\"] = MapArcSeriesDataItem;\r\n//# sourceMappingURL=MapArcSeries.js.map","/**\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapObject } from \"./MapObject\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to place an image on the map.\r\n *\r\n * @see {@link IMapImageEvents} for a list of available events\r\n * @see {@link IMapImageAdapters} for a list of available Adapters\r\n */\r\nvar MapImage = /** @class */ (function (_super) {\r\n __extends(MapImage, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapImage() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapImage\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(MapImage.prototype, \"latitude\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n var latitude = this.getPropertyValue(\"latitude\");\r\n if (!$type.isNumber(latitude) && this.dataItem && this.dataItem.geoPoint) {\r\n latitude = this.dataItem.geoPoint.latitude;\r\n }\r\n return latitude;\r\n },\r\n /**\r\n * Latitude image is placed at.\r\n *\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"latitude\", value, false, true);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImage.prototype, \"longitude\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n var longitude = this.getPropertyValue(\"longitude\");\r\n if (!$type.isNumber(longitude) && this.dataItem && this.dataItem.geoPoint) {\r\n longitude = this.dataItem.geoPoint.longitude;\r\n }\r\n return longitude;\r\n },\r\n /**\r\n * Longitude image is placed on.\r\n *\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"longitude\", value, false, true);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Repositions the image to it's current position.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapImage.prototype.validatePosition = function () {\r\n if ($type.isNumber(this.latitude) && $type.isNumber(this.longitude)) {\r\n //this.moveTo(this.series.chart.projection.convert({ latitude: this.latitude, longitude: this.longitude }));\r\n var p = this.series.chart.projection.d3Projection([this.longitude, this.latitude]);\r\n var visible = this.series.chart.projection.d3Path({ type: 'Point', coordinates: [this.longitude, this.latitude] });\r\n if (!visible) {\r\n this.__disabled = true;\r\n }\r\n else {\r\n this.__disabled = false;\r\n }\r\n this.moveTo({ x: p[0], y: p[1] });\r\n }\r\n _super.prototype.validatePosition.call(this);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapImage.prototype.getFeature = function () {\r\n return { \"type\": \"Feature\", geometry: { type: \"Point\", coordinates: [this.longitude, this.latitude] } };\r\n };\r\n return MapImage;\r\n}(MapObject));\r\nexport { MapImage };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapImage\"] = MapImage;\r\n//# sourceMappingURL=MapImage.js.map","/**\r\n * Map image series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapSeries, MapSeriesDataItem } from \"./MapSeries\";\r\nimport { MapImage } from \"./MapImage\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapImageSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapImageSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapImageSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapImageSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapImageSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapImageSeriesDataItem.prototype.getFeature = function () {\r\n return { \"type\": \"Feature\", geometry: { type: \"Point\", coordinates: this.point } };\r\n };\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"mapImage\", {\r\n /**\r\n * A [[MapImage]] element related to this data item.\r\n *\r\n * @return Element\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._mapImage) {\r\n var mapImage_1 = this.component.mapImages.create();\r\n this.addSprite(mapImage_1);\r\n this._mapImage = mapImage_1;\r\n this._disposers.push(mapImage_1);\r\n this._disposers.push(new Disposer(function () {\r\n if (_this.component) {\r\n _this.component.mapImages.removeValue(mapImage_1);\r\n }\r\n }));\r\n this.mapObject = mapImage_1;\r\n }\r\n return this._mapImage;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"point\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._point;\r\n },\r\n /**\r\n * [point description]\r\n *\r\n * @todo Description\r\n * @param point [description]\r\n */\r\n set: function (point) {\r\n this._point = point;\r\n this._geoPoint = $mapUtils.pointToGeo(point);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"multiPoint\", {\r\n /**\r\n * @return [description]\r\n */\r\n get: function () {\r\n return [this._point];\r\n },\r\n /**\r\n * [point description]\r\n *\r\n * @todo Description\r\n * @param point [description]\r\n */\r\n set: function (multiPoint) {\r\n this._point = multiPoint[0];\r\n this._geoPoint = $mapUtils.pointToGeo(this._point);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapImageSeriesDataItem.prototype, \"geoPoint\", {\r\n /**\r\n * @return Image coordinates\r\n */\r\n get: function () {\r\n return this._geoPoint;\r\n },\r\n /**\r\n * Geographical coordinates (lat/long) image is placed at.\r\n *\r\n * @param geoPoint Image coordinates\r\n */\r\n set: function (geoPoint) {\r\n this._geoPoint = geoPoint;\r\n this.point = [geoPoint.longitude, geoPoint.latitude];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapImageSeriesDataItem;\r\n}(MapSeriesDataItem));\r\nexport { MapImageSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map image (marker) elements.\r\n *\r\n * @see {@link IMapImageSeriesEvents} for a list of available Events\r\n * @see {@link IMapImageSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapImageSeries = /** @class */ (function (_super) {\r\n __extends(MapImageSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapImageSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapImageSeries\";\r\n // Set data fields\r\n _this.dataFields.multiPoint = \"multiPoint\";\r\n _this.dataFields.point = \"point\";\r\n _this.dataFields.geoPoint = \"geoPoint\";\r\n _this.dataFields.multiGeoPoint = \"multiGeoPoint\";\r\n _this.ignoreBounds = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapImageSeries.prototype.createDataItem = function () {\r\n return new MapImageSeriesDataItem();\r\n };\r\n /**\r\n * (Re)validates the data of the sries, effectively forcing it to redraw\r\n * all of its elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapImageSeries.prototype.validateData = function () {\r\n var _this = this;\r\n if (this.data.length > 0 && this._parseDataFrom == 0) {\r\n this.mapImages.clear();\r\n }\r\n // process geoJSON and created map objects\r\n if (this.useGeodata) {\r\n if (this.useGeodata || this.geodata) {\r\n var geoJSON = this.chart.geodata;\r\n var features = void 0;\r\n if (geoJSON.type == \"FeatureCollection\") {\r\n features = geoJSON.features;\r\n }\r\n else if (geoJSON.type == \"Feature\") {\r\n features = [geoJSON];\r\n }\r\n else if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\r\n features = [{ geometry: geoJSON }];\r\n }\r\n else {\r\n console.log(\"nothing found in geoJSON\");\r\n }\r\n if (features) {\r\n var _loop_1 = function (i, len) {\r\n var feature = features[i];\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var type = geometry.type;\r\n var id_1 = feature.id;\r\n if (type == \"Point\" || type == \"MultiPoint\") { // todo: we don't support multipoints at the moment actually\r\n if (!this_1.checkInclude(this_1.include, this_1.exclude, id_1)) {\r\n return \"continue\";\r\n }\r\n var coordinates = geometry.coordinates;\r\n // make the same as MultiPoint\r\n if (type == \"Point\") {\r\n coordinates = [coordinates];\r\n }\r\n var dataObject = $array.find(this_1.data, function (value, i) {\r\n return value.id == id_1;\r\n });\r\n if (!dataObject) {\r\n dataObject = { multiPoint: coordinates, id: id_1, madeFromGeoData: true };\r\n this_1.data.push(dataObject);\r\n }\r\n else {\r\n if (!dataObject.multiPoint) {\r\n dataObject.multiPoint = coordinates;\r\n }\r\n }\r\n // copy properties data to datacontext\r\n $utils.softCopyProperties(feature.properties, dataObject);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (var i = 0, len = features.length; i < len; i++) {\r\n _loop_1(i, len);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.validateData.call(this);\r\n // important! this should go after super.validateData\r\n // if data is parsed in chunks, images list is corrupted, fix it here\r\n $iter.each(this.dataItems.iterator(), function (dataItem) {\r\n var mapImage = dataItem.mapImage;\r\n if (!mapImage.isDisposed()) {\r\n _this.mapImages.moveValue(mapImage);\r\n if ($type.isNumber(mapImage.latitude) && $type.isNumber(mapImage.latitude)) {\r\n dataItem.geoPoint = { latitude: mapImage.latitude, longitude: mapImage.longitude };\r\n }\r\n }\r\n });\r\n };\r\n Object.defineProperty(MapImageSeries.prototype, \"mapImages\", {\r\n /**\r\n * A list of map images in the series.\r\n *\r\n * @return Map images\r\n */\r\n get: function () {\r\n if (!this._mapImages) {\r\n var template = new MapImage();\r\n var mapImages = new ListTemplate(template);\r\n this._disposers.push(new ListDisposer(mapImages));\r\n this._disposers.push(mapImages.template);\r\n mapImages.template.focusable = true;\r\n mapImages.events.on(\"inserted\", this.handleObjectAdded, this, false);\r\n this._mapImages = mapImages;\r\n this._mapObjects = mapImages;\r\n }\r\n return this._mapImages;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * (Re)validates data element, effectively triggering its redrawal.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\r\n MapImageSeries.prototype.validateDataElement = function (dataItem) {\r\n _super.prototype.validateDataElement.call(this, dataItem);\r\n dataItem.mapImage.invalidate();\r\n };\r\n /**\r\n * (Re)validates the series\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapImageSeries.prototype.validate = function () {\r\n _super.prototype.validate.call(this);\r\n $iter.each(this.mapImages.iterator(), function (mapImage) {\r\n mapImage.validatePosition();\r\n });\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n MapImageSeries.prototype.copyFrom = function (source) {\r\n this.mapImages.template.copyFrom(source.mapImages.template);\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapImageSeries.prototype.getFeatures = function () {\r\n var _this = this;\r\n var features = [];\r\n this.dataItems.each(function (dataItem) {\r\n var feature = dataItem.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n });\r\n this.mapImages.each(function (mapImage) {\r\n if (_this.dataItems.indexOf(mapImage._dataItem) == -1) {\r\n var feature = mapImage.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n }\r\n });\r\n return features;\r\n };\r\n /**\r\n * returns MapImage by id\r\n * @param image id\r\n * @return {MapImage}\r\n */\r\n MapImageSeries.prototype.getImageById = function (id) {\r\n return $iter.find(this.mapImages.iterator(), function (mapImage) {\r\n var dataContext = mapImage.dataItem.dataContext;\r\n if (mapImage.id == id || (dataContext && dataContext.id == id)) {\r\n return true;\r\n }\r\n });\r\n };\r\n return MapImageSeries;\r\n}(MapSeries));\r\nexport { MapImageSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapImageSeries\"] = MapImageSeries;\r\nregistry.registeredClasses[\"MapImageSeriesDataItem\"] = MapImageSeriesDataItem;\r\n//# sourceMappingURL=MapImageSeries.js.map","/**\r\n * Map line module\r\n */\r\nimport { __extends, __values } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapObject } from \"./MapObject\";\r\nimport { MapLineObject } from \"./MapLineObject\";\r\nimport { MapImage } from \"./MapImage\";\r\nimport { MapImageSeries } from \"./MapImageSeries\";\r\nimport { Triangle } from \"../../core/elements/Triangle\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { Polyline } from \"../../core/elements/Polyline\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $geo from \"./Geo\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a line on the map.\r\n *\r\n * @see {@link IMapLineEvents} for a list of available events\r\n * @see {@link IMapLineAdapters} for a list of available Adapters\r\n */\r\nvar MapLine = /** @class */ (function (_super) {\r\n __extends(MapLine, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLine() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A list of event disposers for images.\r\n */\r\n _this._imageListeners = {};\r\n _this.className = \"MapLine\";\r\n _this.createLine();\r\n _this.line.stroke = color();\r\n _this.line.parent = _this;\r\n _this.strokeOpacity = 1;\r\n _this.setPropertyValue(\"precision\", 0.1);\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.stroke = interfaceColors.getFor(\"grid\");\r\n _this.shortestDistance = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapLine.prototype.createLine = function () {\r\n this.line = new Polyline();\r\n };\r\n /**\r\n * Converts a position within the line (0-1) to a physical point\r\n * coordinates.\r\n *\r\n * 0 indicates start of the line, 0.5 - middle, while 1 indicates the end.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n MapLine.prototype.positionToPoint = function (position) {\r\n if (this.shortestDistance) {\r\n return this.series.chart.projection.positionToPoint(this.multiGeoLine, position);\r\n }\r\n else {\r\n if (this.line) {\r\n return this.line.positionToPoint(position);\r\n }\r\n }\r\n return { x: 0, y: 0, angle: 0 };\r\n };\r\n Object.defineProperty(MapLine.prototype, \"multiGeoLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n var multiGeoLine = this.getPropertyValue(\"multiGeoLine\");\r\n if (!multiGeoLine && this.dataItem && this.dataItem.multiGeoLine) {\r\n multiGeoLine = this.dataItem.multiGeoLine;\r\n }\r\n return multiGeoLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * { longitude: 3.121, latitude: 0.58 },\r\n * { longitude: -5.199, latitude: 21.223 }\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * { longitude: -5.199, latitude: 21.223 },\r\n * { longitude: -12.9, latitude: 25.85 }\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.5} GeoJSON MultiLineString reference\r\n * @param multiGeoLine Coordinates\r\n */\r\n set: function (multiGeoLine) {\r\n if (multiGeoLine && multiGeoLine.length > 0) {\r\n this.setPropertyValue(\"multiGeoLine\", $geo.normalizeMultiline(multiGeoLine), true);\r\n var multiLine = $mapUtils.multiGeoLineToMultiLine(multiGeoLine);\r\n this.setPropertyValue(\"multiLine\", multiLine);\r\n this.updateExtremes();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"multiLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n var multiLine = this.getPropertyValue(\"multiLine\");\r\n if (!multiLine && this.dataItem && this.dataItem.multiLine) {\r\n multiLine = this.dataItem.multiLine;\r\n }\r\n return multiLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ]\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * [ 120, 200 ],\r\n * [ 150, 100 ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiLine Coordinates\r\n */\r\n set: function (multiLine) {\r\n this.setPropertyValue(\"multiLine\", multiLine);\r\n this.multiGeoLine = $mapUtils.multiLineToGeo(multiLine);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"imagesToConnect\", {\r\n /**\r\n * @return {MapImages[]}\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"imagesToConnect\");\r\n },\r\n /**\r\n * Instead of setting longitudes/latitudes you can set an array of images\r\n * which will be connected by the line.\r\n *\r\n * Parameter is an array that can hold string `id`'s to of the images, or\r\n * references to actual [[MapImage]] objects.\r\n *\r\n * @param images Images\r\n */\r\n set: function (images) {\r\n var _this = this;\r\n this.setPropertyValue(\"imagesToConnect\", images, true);\r\n this.handleImagesToConnect();\r\n if (this.series) {\r\n var chart = this.series.chart;\r\n if (chart) {\r\n chart.series.each(function (series) {\r\n if (series instanceof MapImageSeries) {\r\n if (!series.isReady()) {\r\n _this._disposers.push(series.events.on(\"ready\", _this.handleImagesToConnect, _this, false));\r\n }\r\n }\r\n });\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n MapLine.prototype.handleImagesToConnect = function () {\r\n var e_1, _a;\r\n var _this = this;\r\n if (this.imagesToConnect) {\r\n var segment = [];\r\n var multiGeoLine = [segment];\r\n var _loop_1 = function (image) {\r\n if ($type.isString(image)) {\r\n var chart = this_1.series.chart;\r\n if (chart) {\r\n chart.series.each(function (series) {\r\n if (series instanceof MapImageSeries) {\r\n var img = series.getImageById(image);\r\n if (img) {\r\n image = img;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n if (image instanceof MapImage) {\r\n segment.push({ longitude: image.longitude, latitude: image.latitude });\r\n if (!this_1._imageListeners[image.uid]) {\r\n var disposer = image.events.on(\"propertychanged\", function (event) {\r\n if (event.property == \"longitude\" || event.property == \"latitude\") {\r\n _this.handleImagesToConnect();\r\n _this.invalidate();\r\n }\r\n }, this_1, false);\r\n this_1._imageListeners[image.uid] = disposer;\r\n this_1._disposers.push(disposer);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n try {\r\n for (var _b = __values(this.imagesToConnect), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var image = _c.value;\r\n _loop_1(image);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n this.multiGeoLine = multiGeoLine;\r\n }\r\n };\r\n /**\r\n * (Re)validates the line, effectively forcing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLine.prototype.validate = function () {\r\n var chart = this.series.chart;\r\n if (this.multiLine) {\r\n if (!this.shortestDistance) {\r\n var convertedPoints = [];\r\n for (var i = 0, len = this.multiLine.length; i < len; i++) {\r\n var segment = this.multiLine[i];\r\n var convertedSegmentPoints = [];\r\n for (var s = 0, slen = segment.length; s < slen; s++) {\r\n var geoPoint = segment[s];\r\n var point = this.series.chart.projection.convert({ longitude: geoPoint[0], latitude: geoPoint[1] });\r\n convertedSegmentPoints.push(point);\r\n }\r\n convertedPoints.push(convertedSegmentPoints);\r\n }\r\n this.line.segments = convertedPoints;\r\n }\r\n else {\r\n chart.projection.d3Projection.precision(this.precision);\r\n this.line.path = chart.projection.d3Path(this.getFeature());\r\n }\r\n if (this._arrow) {\r\n this._arrow.validatePosition();\r\n }\r\n $iter.each(this.lineObjects.iterator(), function (x) {\r\n x.validatePosition();\r\n });\r\n this.handleGlobalScale();\r\n }\r\n else if (this.imagesToConnect) {\r\n this.handleImagesToConnect();\r\n }\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapLine.prototype.getFeature = function () {\r\n if (this.multiLine && this.multiLine.length > 0 && this.multiLine[0] && this.multiLine[0].length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiLineString\", coordinates: this.multiLine } };\r\n }\r\n };\r\n /**\r\n * @ignore Exclude from docs\r\n */\r\n MapLine.prototype.measureElement = function () {\r\n // Overriding, just to avoid extra measure\r\n };\r\n Object.defineProperty(MapLine.prototype, \"shortestDistance\", {\r\n /**\r\n * @return Real path?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"shortestDistance\");\r\n },\r\n /**\r\n * The line should take the shortest path over the globe.\r\n *\r\n * Enabling this will make the line look differently in different\r\n * projections. Only `MapLine` supports this setting, `MapArc` and\r\n * `MapSplice` don't.\r\n *\r\n * @default true\r\n * @param value Real path?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"shortestDistance\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"lineObjects\", {\r\n /**\r\n * List of separate line objects the line consists of.\r\n *\r\n * @readonly\r\n * @return List of line objects\r\n */\r\n get: function () {\r\n if (!this._lineObjects) {\r\n this._lineObjects = new ListTemplate(new MapLineObject());\r\n this._lineObjects.events.on(\"inserted\", this.handleLineObjectAdded, this, false);\r\n this._disposers.push(new ListDisposer(this._lineObjects));\r\n this._disposers.push(this._lineObjects.template);\r\n }\r\n return this._lineObjects;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorate a [[LineObject]] when it is added to the line.\r\n *\r\n * @param event Event\r\n */\r\n MapLine.prototype.handleLineObjectAdded = function (event) {\r\n var mapLineObject = event.newValue;\r\n mapLineObject.mapLine = this;\r\n mapLineObject.shouldClone = false;\r\n mapLineObject.parent = this;\r\n };\r\n Object.defineProperty(MapLine.prototype, \"arrow\", {\r\n /**\r\n * @return Arrow element\r\n */\r\n get: function () {\r\n if (!this._arrow) {\r\n var arrow = this.createChild(MapLineObject);\r\n arrow.shouldClone = false;\r\n arrow.width = 8;\r\n arrow.height = 10;\r\n arrow.mapLine = this;\r\n arrow.position = 0.5;\r\n var triangle = arrow.createChild(Triangle);\r\n //triangle.shouldClone = false;\r\n triangle.fillOpacity = 1;\r\n triangle.width = percent(100);\r\n triangle.height = percent(100);\r\n triangle.rotation = 90;\r\n triangle.horizontalCenter = \"middle\";\r\n triangle.verticalCenter = \"middle\";\r\n this._arrow = arrow;\r\n }\r\n return this._arrow;\r\n },\r\n /**\r\n * A [[MapLineObject]] to use as an option arrowhead on the line.\r\n *\r\n * Just accessing this property will create a default arrowhead on the line\r\n * automatically.\r\n *\r\n * @param arrow Arrow element\r\n */\r\n set: function (arrow) {\r\n this._arrow = arrow;\r\n arrow.mapLine = this;\r\n arrow.parent = this;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies line properties and other attributes, like arrow, from another\r\n * instance of [[MapLine]].\r\n *\r\n * @param source Source map line\r\n */\r\n MapLine.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.line.copyFrom(source.line);\r\n this.lineObjects.copyFrom(source.lineObjects);\r\n if (source._arrow) {\r\n this.arrow = source.arrow.clone();\r\n }\r\n };\r\n Object.defineProperty(MapLine.prototype, \"latitude\", {\r\n /**\r\n * Latitude of the line center.\r\n *\r\n * @readonly\r\n * @return Latitude\r\n */\r\n get: function () {\r\n return this.north + (this.south - this.north) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLine.prototype, \"longitude\", {\r\n /**\r\n * Longitude of the line center.\r\n *\r\n * @readonly\r\n * @return Latitude\r\n */\r\n get: function () {\r\n return this.east + (this.west - this.east) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * X coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return X\r\n */\r\n MapLine.prototype.getTooltipX = function () {\r\n var x = this.getPropertyValue(\"tooltipX\");\r\n if (!(x instanceof Percent)) {\r\n x = percent(50);\r\n }\r\n if (x instanceof Percent) {\r\n return this.positionToPoint(x.value).x;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n /**\r\n * Y coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return Y\r\n */\r\n MapLine.prototype.getTooltipY = function () {\r\n var y = this.getPropertyValue(\"tooltipY\");\r\n if (!(y instanceof Percent)) {\r\n y = percent(50);\r\n }\r\n if (y instanceof Percent) {\r\n return this.positionToPoint(y.value).y;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n Object.defineProperty(MapLine.prototype, \"precision\", {\r\n /**\r\n * @return Precision\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"precision\");\r\n },\r\n /**\r\n * When line is plotted, if its `shortestDistance` is set to `true` it is\r\n * bent according to the used projection, to depict the shortest distance how\r\n * it would go on the actual land.\r\n *\r\n * `precision` introduces a setting which can control when such bending\r\n * occurs.\r\n *\r\n * If the distance (in degrees) between line start and end points\r\n * is less than `precision`, no bending will take place and the line will be\r\n * straight.\r\n *\r\n * Set to large number (e.g. 10000) for perfectly straight line.\r\n *\r\n * @since 4.9.1\r\n * @default 0.1\r\n * @param value Precision\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"precision\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapLine;\r\n}(MapObject));\r\nexport { MapLine };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapLine\"] = MapLine;\r\n//# sourceMappingURL=MapLine.js.map","/**\r\n * Map line module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Draws a line on the map.\r\n *\r\n * @see {@link IMapLineObjectEvents} for a list of available events\r\n * @see {@link IMapLineObjectAdapters} for a list of available Adapters\r\n */\r\nvar MapLineObject = /** @class */ (function (_super) {\r\n __extends(MapLineObject, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLineObject() {\r\n var _this = _super.call(this) || this;\r\n _this.adjustRotation = true;\r\n _this.className = \"MapLineObject\";\r\n _this.isMeasured = false;\r\n _this.layout = \"none\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * (Re)validates element's position.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLineObject.prototype.validatePosition = function () {\r\n var mapLine = this.mapLine;\r\n if (mapLine) {\r\n var point = mapLine.positionToPoint(this.position);\r\n this.x = point.x;\r\n this.y = point.y;\r\n if (this.adjustRotation) {\r\n this.rotation = point.angle;\r\n }\r\n var dataItem = this.mapLine.dataItem;\r\n if (dataItem) {\r\n var series = this.mapLine.dataItem.component;\r\n this.scale = 1 / series.scale;\r\n }\r\n // hide out of bounds\r\n if (mapLine.shortestDistance) {\r\n var projection = this.mapLine.series.chart.projection;\r\n var geoPoint = projection.positionToGeoPoint(mapLine.multiGeoLine, this.position);\r\n var visible = projection.d3Path({ type: 'Point', coordinates: [geoPoint.longitude, geoPoint.latitude] });\r\n if (!visible) {\r\n this.__disabled = true;\r\n }\r\n else {\r\n this.__disabled = false;\r\n }\r\n }\r\n }\r\n _super.prototype.validatePosition.call(this);\r\n };\r\n Object.defineProperty(MapLineObject.prototype, \"position\", {\r\n /**\r\n * @return Position within the line\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"position\");\r\n },\r\n /**\r\n * Sets object's relative position (0-1) within the line.\r\n *\r\n * `0` will place the object at the beginning of the line. `1` - at the end.\r\n *\r\n * Any intermediate number will place the object at some point within the\r\n * line.\r\n *\r\n * @param value Position within the line (0-1)\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"position\", value, false, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineObject.prototype, \"adjustRotation\", {\r\n /**\r\n * @return Auto-rotate\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"adjustRotation\");\r\n },\r\n /**\r\n * If set to `true`, the object will be automatically rotated to face the\r\n * direction of the line at the specific position.\r\n *\r\n * This allows creating images that has its \"front\" always facing the logical\r\n * direction of the line.\r\n *\r\n * @default false\r\n * @param value Auto-rotate\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"adjustRotation\", value, false, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapLineObject;\r\n}(Container));\r\nexport { MapLineObject };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapLineObject\"] = MapLineObject;\r\n//# sourceMappingURL=MapLineObject.js.map","/**\r\n * Map line series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapSeries, MapSeriesDataItem } from \"./MapSeries\";\r\nimport { MapLine } from \"./MapLine\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapLineSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapLineSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapLineSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLineSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapLineSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n MapLineSeriesDataItem.prototype.getFeature = function () {\r\n if (this.multiLine && this.multiLine.length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiLineString\", coordinates: this.multiLine } };\r\n }\r\n };\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"mapLine\", {\r\n /**\r\n * A [[MapLine]] element related to this data item.\r\n *\r\n * @readonly\r\n * @return Element\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._mapLine) {\r\n var mapLine_1 = this.component.mapLines.create();\r\n this._mapLine = mapLine_1;\r\n this.addSprite(mapLine_1);\r\n this._disposers.push(mapLine_1);\r\n this._disposers.push(new Disposer(function () {\r\n if (_this.component) {\r\n _this.component.mapLines.removeValue(mapLine_1);\r\n }\r\n }));\r\n this.mapObject = mapLine_1;\r\n }\r\n return this._mapLine;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"line\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._line;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a single-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ]\r\n * ]\r\n * ```\r\n *\r\n * @param line Coordinates\r\n */\r\n set: function (line) {\r\n this._line = line;\r\n this.multiLine = [line];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"multiLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ]\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * [ 120, 200 ],\r\n * [ 150, 100 ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiLine Coordinates\r\n */\r\n set: function (multiLine) {\r\n this._multiLine = multiLine;\r\n this._multiGeoLine = $mapUtils.multiLineToGeo(multiLine);\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"geoLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._geoLine;\r\n },\r\n /**\r\n * A collection of lat/long coordinates for a single-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * { longitude: 3.121, latitude: 0.58 },\r\n * { longitude: -5.199, latitude: 21.223 }\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.4} GeoJSON LineString reference\r\n * @param geoLine Coordinates\r\n */\r\n set: function (geoLine) {\r\n this._geoLine = geoLine;\r\n this.multiLine = $mapUtils.multiGeoLineToMultiLine([geoLine]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapLineSeriesDataItem.prototype, \"multiGeoLine\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiGeoLine;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-segment line. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Segment 1\r\n * [\r\n * { longitude: 3.121, latitude: 0.58 },\r\n * { longitude: -5.199, latitude: 21.223 }\r\n * ],\r\n *\r\n * // Segment 2\r\n * [\r\n * { longitude: -5.199, latitude: 21.223 },\r\n * { longitude: -12.9, latitude: 25.85 }\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.5} GeoJSON MultiLineString reference\r\n * @param multiGeoLine Coordinates\r\n */\r\n set: function (multiGeoLine) {\r\n this._multiGeoLine = multiGeoLine;\r\n this.multiLine = $mapUtils.multiGeoLineToMultiLine(multiGeoLine);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapLineSeriesDataItem;\r\n}(MapSeriesDataItem));\r\nexport { MapLineSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map line series.\r\n *\r\n * @see {@link IMapLineSeriesEvents} for a list of available Events\r\n * @see {@link IMapLineSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapLineSeries = /** @class */ (function (_super) {\r\n __extends(MapLineSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapLineSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapLineSeries\";\r\n // Set data fields\r\n _this.dataFields.multiLine = \"multiLine\";\r\n _this.dataFields.line = \"line\";\r\n _this.dataFields.geoLine = \"geoLine\";\r\n _this.dataFields.multiGeoLine = \"multiGeoLine\";\r\n _this.ignoreBounds = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapLineSeries.prototype.createDataItem = function () {\r\n return new MapLineSeriesDataItem();\r\n };\r\n /**\r\n * (Re)validates series data, effectively causing the whole series to be\r\n * redrawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLineSeries.prototype.validateData = function () {\r\n // process geoJSON and created map objects\r\n if (this.useGeodata || this.geodata) {\r\n var geoJSON = this.chart.geodata;\r\n if (geoJSON) {\r\n var features = void 0;\r\n if (geoJSON.type == \"FeatureCollection\") {\r\n features = geoJSON.features;\r\n }\r\n else if (geoJSON.type == \"Feature\") {\r\n features = [geoJSON];\r\n }\r\n else if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\r\n features = [{ geometry: geoJSON }];\r\n }\r\n else {\r\n console.log(\"nothing found in geoJSON\");\r\n }\r\n if (features) {\r\n var _loop_1 = function (i, len) {\r\n var feature = features[i];\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var type = geometry.type;\r\n var id_1 = feature.id;\r\n if (type == \"LineString\" || type == \"MultiLineString\") {\r\n if (!this_1.checkInclude(this_1.include, this_1.exclude, id_1)) {\r\n return \"continue\";\r\n }\r\n var coordinates = geometry.coordinates;\r\n var dataObject = $array.find(this_1.data, function (value, i) {\r\n return value.id == id_1;\r\n });\r\n if (type == \"LineString\") {\r\n coordinates = [coordinates];\r\n }\r\n if (!dataObject) {\r\n dataObject = { multiLine: coordinates, id: id_1, madeFromGeoData: true };\r\n this_1.data.push(dataObject);\r\n }\r\n else {\r\n if (!dataObject.multiLine) {\r\n dataObject.multiLine = coordinates;\r\n }\r\n }\r\n // copy properties data to datacontext\r\n $utils.softCopyProperties(feature.properties, dataObject);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (var i = 0, len = features.length; i < len; i++) {\r\n _loop_1(i, len);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.validateData.call(this);\r\n };\r\n Object.defineProperty(MapLineSeries.prototype, \"mapLines\", {\r\n /**\r\n * A list of lines in the series.\r\n *\r\n * @return Lines\r\n */\r\n get: function () {\r\n if (!this._mapLines) {\r\n var lineTemplate = this.createLine();\r\n var mapLines = new ListTemplate(lineTemplate);\r\n this._disposers.push(new ListDisposer(mapLines));\r\n this._disposers.push(mapLines.template);\r\n mapLines.events.on(\"inserted\", this.handleObjectAdded, this, false);\r\n this._mapLines = mapLines;\r\n this._mapObjects = mapLines;\r\n }\r\n return this._mapLines;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n MapLineSeries.prototype.createLine = function () {\r\n return new MapLine();\r\n };\r\n /**\r\n * (Re)validates the series\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapLineSeries.prototype.validate = function () {\r\n this.dataItems.each(function (dataItem) {\r\n $utils.used(dataItem.mapLine);\r\n });\r\n _super.prototype.validate.call(this);\r\n this.mapLines.each(function (mapLine) {\r\n mapLine.validate();\r\n });\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n MapLineSeries.prototype.copyFrom = function (source) {\r\n this.mapLines.template.copyFrom(source.mapLines.template);\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapLineSeries.prototype.getFeatures = function () {\r\n var _this = this;\r\n var features = [];\r\n this.dataItems.each(function (dataItem) {\r\n var feature = dataItem.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n });\r\n this.mapLines.each(function (mapLine) {\r\n if (_this.dataItems.indexOf(mapLine._dataItem) == -1) {\r\n var feature = mapLine.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n }\r\n });\r\n return features;\r\n };\r\n /**\r\n * returns MapLine by id\r\n * @param line id\r\n * @return {MapLine}\r\n */\r\n MapLineSeries.prototype.getLineById = function (id) {\r\n return $iter.find(this.mapLines.iterator(), function (mapLine) {\r\n var dataContext = mapLine.dataItem.dataContext;\r\n return dataContext.id == id;\r\n });\r\n };\r\n return MapLineSeries;\r\n}(MapSeries));\r\nexport { MapLineSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapLineSeries\"] = MapLineSeries;\r\nregistry.registeredClasses[\"MapLineSeriesDataItem\"] = MapLineSeriesDataItem;\r\n//# sourceMappingURL=MapLineSeries.js.map","/**\r\n * Map object module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as d3geo from \"d3-geo\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for all map objects: lines, images, etc.\r\n *\r\n * @see {@link IMapObjectEvents} for a list of available events\r\n * @see {@link IMapObjectAdapters} for a list of available Adapters\r\n */\r\nvar MapObject = /** @class */ (function (_super) {\r\n __extends(MapObject, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapObject() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapObject\";\r\n // Set defaults\r\n _this.isMeasured = false;\r\n _this.layout = \"none\";\r\n _this.clickable = true;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * (Re)validates this object, forcing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapObject.prototype.validate = function () {\r\n if (this.series && this.series.itemReaderText) {\r\n this.readerTitle = this.series.itemReaderText;\r\n }\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * Updates the item's bounding coordinates: coordinates of the East, West,\r\n * North, and South-most points.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapObject.prototype.updateExtremes = function () {\r\n var feature = this.getFeature();\r\n if (feature) {\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var bounds = d3geo.geoBounds(geometry);\r\n var west = bounds[0][0];\r\n var south = bounds[0][1];\r\n var north = bounds[1][1];\r\n var east = bounds[1][0];\r\n var changed = false;\r\n if (north != this.north) {\r\n this._north = $math.round(north, 8);\r\n changed = true;\r\n }\r\n if (south != this.south) {\r\n this._south = $math.round(south);\r\n changed = true;\r\n }\r\n if (east != this.east) {\r\n this._east = $math.round(east);\r\n changed = true;\r\n }\r\n if (west != this.west) {\r\n this._west = $math.round(west);\r\n changed = true;\r\n }\r\n if (changed) {\r\n this.dispatch(\"geoBoundsChanged\");\r\n if (this.series) {\r\n this.series.invalidateDataItems();\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapObject.prototype.getFeature = function () {\r\n return {};\r\n };\r\n Object.defineProperty(MapObject.prototype, \"east\", {\r\n /**\r\n * Longitude of the East-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._east)) {\r\n return this._east;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.east;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapObject.prototype, \"west\", {\r\n /**\r\n * Longitude of the West-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._west)) {\r\n return this._west;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.west;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapObject.prototype, \"south\", {\r\n /**\r\n * Latitude of the South-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._south)) {\r\n return this._south;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.south;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapObject.prototype, \"north\", {\r\n /**\r\n * Latitude of the North-most point of the element.\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._north)) {\r\n return this._north;\r\n }\r\n else if (this.dataItem) {\r\n return this.dataItem.north;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Shows the element's [[Tooltip]].\r\n *\r\n * A tooltip will be populated using text templates in either `tooltipHTML` or\r\n * `tooltipText` as well as data in `tooltipDataItem`.\r\n *\r\n * @see {@link Tooltip}\r\n * @param optional point (sprite-related) to which tooltip must point.\r\n * @return returns true if the tooltip was shown and false if it wasn't (no text was found)\r\n */\r\n MapObject.prototype.showTooltip = function (point) {\r\n var res = _super.prototype.showTooltip.call(this, point);\r\n if (res && this.showTooltipOn == \"always\" && !this.series.chart.events.has(\"mappositionchanged\", this.handleTooltipMove, this)) {\r\n this.addDisposer(this.series.chart.events.on(\"mappositionchanged\", this.handleTooltipMove, this));\r\n }\r\n return res;\r\n };\r\n MapObject.prototype.handleTooltipMove = function (ev) {\r\n if (!this.tooltip.isHidden) {\r\n this.showTooltip();\r\n }\r\n };\r\n /**\r\n * Sets a [[DataItem]].\r\n * @param dataItem DataItem\r\n */\r\n MapObject.prototype.setDataItem = function (dataItem) {\r\n _super.prototype.setDataItem.call(this, dataItem);\r\n this.applyAccessibility();\r\n };\r\n return MapObject;\r\n}(Container));\r\nexport { MapObject };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapObject\"] = MapObject;\r\n//# sourceMappingURL=MapObject.js.map","/**\r\n * Map polygon module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapObject } from \"./MapObject\";\r\nimport { Polygon } from \"../../core/elements/Polygon\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport $polylabel from \"polylabel\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a polygon on the map.\r\n *\r\n * @see {@link IMapPolygonEvents} for a list of available events\r\n * @see {@link IMapPolygonAdapters} for a list of available Adapters\r\n */\r\nvar MapPolygon = /** @class */ (function (_super) {\r\n __extends(MapPolygon, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapPolygon() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapPolygon\";\r\n _this.polygon = _this.createChild(Polygon);\r\n _this.polygon.shouldClone = false;\r\n _this.polygon.applyOnClones = true;\r\n _this.setPropertyValue(\"precision\", 0.5);\r\n var interfaceColors = new InterfaceColorSet();\r\n _this.fill = interfaceColors.getFor(\"secondaryButton\");\r\n _this.stroke = interfaceColors.getFor(\"secondaryButtonStroke\");\r\n _this.strokeOpacity = 1;\r\n _this.tooltipPosition = \"pointer\";\r\n _this.nonScalingStroke = true;\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapPolygon.prototype.getFeature = function () {\r\n if (this.multiPolygon && this.multiPolygon.length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiPolygon\", coordinates: this.multiPolygon } };\r\n }\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"multiGeoPolygon\", {\r\n /**\r\n * @return Polygon coordinates\r\n */\r\n get: function () {\r\n var multiGeoPolygon = this.getPropertyValue(\"multiGeoPolygon\");\r\n if (!multiGeoPolygon && this.dataItem) {\r\n multiGeoPolygon = this.dataItem.multiGeoPolygon;\r\n }\r\n return multiGeoPolygon;\r\n },\r\n /**\r\n * Set of coordinates for the polygon.\r\n *\r\n * @param multiGeoPolygon Polygon coordinates\r\n */\r\n set: function (multiGeoPolygon) {\r\n this.setPropertyValue(\"multiGeoPolygon\", multiGeoPolygon, true);\r\n this.multiPolygon = $mapUtils.multiGeoPolygonToMultipolygon(multiGeoPolygon);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"multiPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n var multiPolygon = this.getPropertyValue(\"multiPolygon\");\r\n if (!multiPolygon && this.dataItem) {\r\n multiPolygon = this.dataItem.multiPolygon;\r\n }\r\n return multiPolygon;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-part polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Part 1\r\n * [\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ],\r\n * [ 150, 220 ],\r\n * [ 170, 240 ],\r\n * [ 100, 150 ]\r\n * ]\r\n * ],\r\n *\r\n * // Part 2\r\n * [\r\n * [\r\n * [ 300, 350 ],\r\n * [ 320, 400 ],\r\n * [ 350, 420 ],\r\n * [ 370, 440 ],\r\n * [ 300, 350 ]\r\n * ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiPolygon Coordinates\r\n */\r\n set: function (multiPolygon) {\r\n if (this.setPropertyValue(\"multiPolygon\", multiPolygon)) {\r\n this.updateExtremes();\r\n this.invalidate();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * (Re)validates the polygon, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygon.prototype.validate = function () {\r\n if (this.series) {\r\n var projection = this.series.chart.projection;\r\n var pathGenerator = projection.d3Path;\r\n if (this.multiPolygon) {\r\n if (this.series) {\r\n var feature = { type: \"MultiPolygon\", coordinates: this.multiPolygon };\r\n projection.d3Projection.precision(this.precision);\r\n this.polygon.path = pathGenerator(feature);\r\n }\r\n if (this.series.calculateVisualCenter) {\r\n var biggestArea = 0;\r\n var biggestPolygon = this.multiPolygon[0];\r\n if (this.multiPolygon.length > 1) {\r\n for (var i = 0; i < this.multiPolygon.length; i++) {\r\n var polygon = this.multiPolygon[i];\r\n var area = d3geo.geoArea({ type: \"Polygon\", coordinates: polygon });\r\n if (area > biggestArea) {\r\n biggestPolygon = polygon;\r\n biggestArea = area;\r\n }\r\n }\r\n }\r\n var center = $polylabel(biggestPolygon);\r\n this._visualLongitude = center[0];\r\n this._visualLatitude = center[1];\r\n }\r\n else {\r\n this._visualLongitude = this.longitude;\r\n this._visualLatitude = this.latitude;\r\n }\r\n }\r\n }\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygon.prototype.measureElement = function () {\r\n // Overriding, just to avoid extra measure\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"latitude\", {\r\n /**\r\n * Latitude of the geometrical center of the polygon.\r\n *\r\n * @readonly\r\n * @return Center latitude\r\n */\r\n get: function () {\r\n return this.north + (this.south - this.north) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"longitude\", {\r\n /**\r\n * Longitude of the geometrical center of the polygon.\r\n *\r\n * @readonly\r\n * @return Center longitude\r\n */\r\n get: function () {\r\n return this.east + (this.west - this.east) / 2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"visualLatitude\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n var latitude = this.getPropertyValue(\"visualLatitude\");\r\n if ($type.isNumber(latitude)) {\r\n return (latitude);\r\n }\r\n if (!this._adapterO) {\r\n return this._visualLatitude;\r\n }\r\n else {\r\n return this._adapterO.apply(\"visualLatitude\", this._visualLatitude);\r\n }\r\n },\r\n /**\r\n * Latitude of the visual center of the polygon.\r\n *\r\n * It may (and probably won't) coincide with geometrical center.\r\n *\r\n * @since 4.3.0\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"visualLatitude\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"visualLongitude\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n var longitude = this.getPropertyValue(\"visualLongitude\");\r\n if ($type.isNumber(longitude)) {\r\n return (longitude);\r\n }\r\n if (!this._adapterO) {\r\n return this._visualLongitude;\r\n }\r\n else {\r\n return this._adapterO.apply(\"visualLongitude\", this._visualLongitude);\r\n }\r\n },\r\n /**\r\n * Longitude of the visual center of the polygon.\r\n *\r\n * It may (and probably won't) coincide with geometrical center.\r\n *\r\n * @since 4.3.0\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"visualLongitude\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"pixelWidth\", {\r\n /**\r\n * Not 100% sure about this, as if we add something to MapPolygon this\r\n * won't be true, but otherwise we will get all 0 and the tooltip won't\r\n * be positioned properly\r\n * @hidden\r\n */\r\n /**\r\n * Element's width in pixels.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.polygon.pixelWidth;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygon.prototype, \"pixelHeight\", {\r\n /**\r\n * Element's height in pixels.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.polygon.pixelHeight;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Copies all properties from another instance of [[MapPolygon]].\r\n *\r\n * @param source Source series\r\n */\r\n MapPolygon.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.polygon.copyFrom(source.polygon);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapPolygon.prototype.updateExtremes = function () {\r\n _super.prototype.updateExtremes.call(this);\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"boxArea\", {\r\n /**\r\n * @ignore\r\n * used to sorth polygons from big to small\r\n */\r\n get: function () {\r\n return (this.north - this.south) * (this.east - this.west);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * X coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return X\r\n */\r\n MapPolygon.prototype.getTooltipX = function () {\r\n return this.series.chart.projection.convert({ longitude: this.visualLongitude, latitude: this.visualLatitude }).x;\r\n };\r\n /**\r\n * Y coordinate for the slice tooltip.\r\n *\r\n * @ignore\r\n * @return Y\r\n */\r\n MapPolygon.prototype.getTooltipY = function () {\r\n return this.series.chart.projection.convert({ longitude: this.visualLongitude, latitude: this.visualLatitude }).y;\r\n };\r\n Object.defineProperty(MapPolygon.prototype, \"precision\", {\r\n get: function () {\r\n return this.getPropertyValue(\"precision\");\r\n },\r\n /**\r\n * When polygon's sides are plotted, they are bent according to the used\r\n * projection.\r\n *\r\n * `precision` introduces a setting which can control when such bending\r\n * occurs.\r\n *\r\n * If the distance (in degrees) between two points of polygon's side is less\r\n * than `precision`, no bending will take place and the line will be straight.\r\n *\r\n * Set to large number (e.g. 10000) for perfectly straight lines on all\r\n * polygon's sides.\r\n *\r\n * @since 4.9.1\r\n * @default 0.5\r\n * @param value Precision\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"precision\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapPolygon;\r\n}(MapObject));\r\nexport { MapPolygon };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapPolygon\"] = MapPolygon;\r\n//# sourceMappingURL=MapPolygon.js.map","/**\r\n * Map polygon series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapSeries, MapSeriesDataItem } from \"./MapSeries\";\r\nimport { MapPolygon } from \"./MapPolygon\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $mapUtils from \"./MapUtils\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapPolygonSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapPolygonSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapPolygonSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapPolygonSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapPolygonSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapPolygonSeriesDataItem.prototype.getFeature = function () {\r\n if (this.multiPolygon && this.multiPolygon.length > 0) {\r\n return { \"type\": \"Feature\", geometry: { type: \"MultiPolygon\", coordinates: this.multiPolygon } };\r\n }\r\n };\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"mapPolygon\", {\r\n /**\r\n * A [[MapPolygon]] element related to this data item.\r\n *\r\n * @readonly\r\n * @return Element\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._mapPolygon) {\r\n var mapPolygon_1 = this.component.mapPolygons.create();\r\n this._mapPolygon = mapPolygon_1;\r\n this.addSprite(mapPolygon_1);\r\n this._disposers.push(new Disposer(function () {\r\n if (_this.component) {\r\n _this.component.mapPolygons.removeValue(mapPolygon_1);\r\n }\r\n }));\r\n this.mapObject = mapPolygon_1;\r\n }\r\n return this._mapPolygon;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"polygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._polygon;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a single polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ],\r\n * [ 150, 200 ],\r\n * [ 170, 240 ],\r\n * [ 100, 150 ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param polygon Coordinates\r\n */\r\n set: function (polygon) {\r\n this._polygon = polygon;\r\n this.multiPolygon = [polygon];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"multiPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiPolygon;\r\n },\r\n /**\r\n * A collection of X/Y coordinates for a multi-part polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * // Part 1\r\n * [\r\n * [\r\n * [ 100, 150 ],\r\n * [ 120, 200 ],\r\n * [ 150, 220 ],\r\n * [ 170, 240 ],\r\n * [ 100, 150 ]\r\n * ]\r\n * ],\r\n *\r\n * // Part 2\r\n * [\r\n * [\r\n * [ 300, 350 ],\r\n * [ 320, 400 ],\r\n * [ 350, 420 ],\r\n * [ 370, 440 ],\r\n * [ 300, 350 ]\r\n * ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @param multiPolygon Coordinates\r\n */\r\n set: function (multiPolygon) {\r\n this._multiPolygon = multiPolygon;\r\n this.updateExtremes();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"geoPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._geoPolygon;\r\n },\r\n /**\r\n * A collection of lat/long coordinates for a single polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [\r\n * { latitude: -10.0, longitude: -10.0 },\r\n * { latitude: 10.0, longitude: -10.0 },\r\n * { latitude: 10.0, longitude: 10.0 },\r\n * { latitude: -10.0, longitude: -10.0 }\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.6} GeoJSON Polygon reference\r\n * @param geoPolygon Coordinates\r\n */\r\n set: function (geoPolygon) {\r\n this._geoPolygon = geoPolygon;\r\n this.multiGeoPolygon = [geoPolygon];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeriesDataItem.prototype, \"multiGeoPolygon\", {\r\n /**\r\n * @return Coordinates\r\n */\r\n get: function () {\r\n return this._multiGeoPolygon;\r\n },\r\n /**\r\n * A collection of lat/long coordinates for a multi-part polygon. E.g.:\r\n *\r\n * ```JSON\r\n * [\r\n * [\r\n * [\r\n * { longitude: 180.0, latitude: 40.0 },\r\n * { longitude: 180.0, latitude: 50.0 },\r\n * { longitude: 170.0, latitude: 50.0 },\r\n * { longitude: 170.0, latitude: 40.0 },\r\n * { longitude: 180.0, latitude: 40.0 }\r\n * ]\r\n * ],\r\n * [\r\n * [\r\n * { longitude: -170.0, latitude: 40.0 },\r\n * { longitude: -170.0, latitude: 50.0 },\r\n * { longitude: -180.0, latitude: 50.0 },\r\n * { longitude: -180.0, latitude: 40.0 },\r\n * { longitude: -170.0, latitude: 40.0 }\r\n * ]\r\n * ]\r\n * ]\r\n * ```\r\n *\r\n * @see {@link https://tools.ietf.org/html/rfc7946#section-3.1.7} GeoJSON MultiPolygon reference\r\n * @param multiGeoPolygon Coordinates\r\n */\r\n set: function (multiGeoPolygon) {\r\n this._multiGeoPolygon = multiGeoPolygon;\r\n this.multiPolygon = $mapUtils.multiGeoPolygonToMultipolygon(multiGeoPolygon);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapPolygonSeriesDataItem;\r\n}(MapSeriesDataItem));\r\nexport { MapPolygonSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map polygon elements.\r\n *\r\n * @see {@link IMapPolygonSeriesEvents} for a list of available Events\r\n * @see {@link IMapPolygonSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapPolygonSeries = /** @class */ (function (_super) {\r\n __extends(MapPolygonSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapPolygonSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Indicates if series should automatically calculate visual center of the\r\n * polygons (accessible via `visualLongitude` and `visualLatitude` properties\r\n * of the [[MapPolygon]]).\r\n *\r\n * @default false\r\n * @since 4.3.0\r\n */\r\n _this.calculateVisualCenter = false;\r\n _this.className = \"MapPolygonSeries\";\r\n // Set data fields\r\n _this.dataFields.multiPolygon = \"multiPolygon\";\r\n _this.dataFields.polygon = \"polygon\";\r\n _this.dataFields.geoPolygon = \"geoPolygon\";\r\n _this.dataFields.multiGeoPolygon = \"multiGeoPolygon\";\r\n _this.setPropertyValue(\"sortPolygonsBy\", \"area\");\r\n _this.setPropertyValue(\"sortPolygonsReversed\", false);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapPolygonSeries.prototype.createDataItem = function () {\r\n return new MapPolygonSeriesDataItem();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapPolygonSeries.prototype.processIncExc = function () {\r\n this.mapPolygons.clear();\r\n _super.prototype.processIncExc.call(this);\r\n };\r\n /**\r\n * (Re)validates series data, effectively causing the whole series to be\r\n * redrawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygonSeries.prototype.validateData = function () {\r\n // process geoJSON and created map objects\r\n if (this.useGeodata || this.geodata) {\r\n var geoJSON = !this._dataSources[\"geodata\"] ? this.chart.geodata : undefined;\r\n if (this.geodata) {\r\n geoJSON = this.geodata;\r\n }\r\n if (geoJSON) {\r\n var features = void 0;\r\n if (geoJSON.type == \"FeatureCollection\") {\r\n features = geoJSON.features;\r\n }\r\n else if (geoJSON.type == \"Feature\") {\r\n features = [geoJSON];\r\n }\r\n else if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\r\n features = [{ geometry: geoJSON }];\r\n }\r\n else {\r\n console.log(\"nothing found in geoJSON\");\r\n }\r\n if (features) {\r\n var _loop_1 = function (i, len) {\r\n var feature = features[i];\r\n var geometry = feature.geometry;\r\n if (geometry) {\r\n var type = geometry.type;\r\n var id_1 = feature.id;\r\n if (this_1.chart.geodataNames && this_1.chart.geodataNames[id_1]) {\r\n feature.properties.name = this_1.chart.geodataNames[id_1];\r\n }\r\n if (type == \"Polygon\" || type == \"MultiPolygon\") {\r\n if (!this_1.checkInclude(this_1.include, this_1.exclude, id_1)) {\r\n return \"continue\";\r\n }\r\n var coordinates = geometry.coordinates;\r\n if (coordinates) {\r\n // make the same as MultiPolygon\r\n if (type == \"Polygon\") {\r\n coordinates = [coordinates];\r\n }\r\n }\r\n // find data object in user-provided data\r\n var dataObject = $array.find(this_1.data, function (value, i) {\r\n return value.id == id_1;\r\n });\r\n // create one if not found\r\n if (!dataObject) {\r\n dataObject = { multiPolygon: coordinates, id: id_1, madeFromGeoData: true };\r\n this_1.data.push(dataObject);\r\n }\r\n // in case found\r\n else {\r\n // if user-provided object doesn't have points data provided in any way:\r\n if (!dataObject.multiPolygon) {\r\n dataObject.multiPolygon = coordinates;\r\n }\r\n }\r\n // copy properties data to datacontext\r\n $utils.softCopyProperties(feature.properties, dataObject);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (var i = 0, len = features.length; i < len; i++) {\r\n _loop_1(i, len);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.validateData.call(this);\r\n };\r\n /**\r\n * (Re)validates the series\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapPolygonSeries.prototype.validate = function () {\r\n _super.prototype.validate.call(this);\r\n this.dataItems.each(function (dataItem) {\r\n $utils.used(dataItem.mapPolygon);\r\n });\r\n if (this.sortPolygonsBy != \"none\") {\r\n var sortBy_1 = this.sortPolygonsBy;\r\n var reversed_1 = this.sortPolygonsReversed;\r\n this.mapPolygons.sort(function (a, b) {\r\n var valA = \"\";\r\n var valB = \"\";\r\n var dirA = -1;\r\n var dirB = 1;\r\n switch (sortBy_1) {\r\n case \"area\":\r\n valA = a.boxArea;\r\n valB = b.boxArea;\r\n dirA = -1;\r\n dirB = 1;\r\n break;\r\n case \"name\":\r\n valA = a.dataItem.dataContext.name || \"\";\r\n valB = b.dataItem.dataContext.name || \"\";\r\n dirA = 1;\r\n dirB = -1;\r\n break;\r\n case \"id\":\r\n valA = a.dataItem.dataContext.id || \"\";\r\n valB = b.dataItem.dataContext.id || \"\";\r\n dirA = 1;\r\n dirB = -1;\r\n break;\r\n case \"latitude\":\r\n valA = reversed_1 ? a.south : a.north;\r\n valB = reversed_1 ? b.south : b.north;\r\n dirA = -1;\r\n dirB = 1;\r\n break;\r\n case \"longitude\":\r\n valA = reversed_1 ? a.east : a.west;\r\n valB = reversed_1 ? b.east : b.west;\r\n dirA = 1;\r\n dirB = -1;\r\n break;\r\n }\r\n if (valA < valB) {\r\n return reversed_1 ? dirB : dirA;\r\n }\r\n if (valA > valB) {\r\n return reversed_1 ? dirA : dirB;\r\n }\r\n return 0;\r\n });\r\n this.mapPolygons.each(function (mapPolygon, index) {\r\n mapPolygon.validate();\r\n // makes small go first to avoid hover problems with IE\r\n if (!mapPolygon.zIndex && !mapPolygon.propertyFields.zIndex) {\r\n mapPolygon.zIndex = 1000000 - index;\r\n }\r\n });\r\n }\r\n };\r\n Object.defineProperty(MapPolygonSeries.prototype, \"mapPolygons\", {\r\n /**\r\n * List of polygon elements in the series.\r\n *\r\n * @return Polygon list\r\n */\r\n get: function () {\r\n if (!this._mapPolygons) {\r\n var polygonTemplate = new MapPolygon();\r\n var mapPolygons = new ListTemplate(polygonTemplate);\r\n this._disposers.push(new ListDisposer(mapPolygons));\r\n this._disposers.push(mapPolygons.template);\r\n mapPolygons.template.focusable = true;\r\n mapPolygons.events.on(\"inserted\", this.handleObjectAdded, this, false);\r\n this._mapPolygons = mapPolygons;\r\n this._mapObjects = mapPolygons;\r\n }\r\n return this._mapPolygons;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * returns MapPolygon by id in geoJSON file\r\n * @param polygon id\r\n * @return {MapPolygon}\r\n */\r\n MapPolygonSeries.prototype.getPolygonById = function (id) {\r\n return $iter.find(this.mapPolygons.iterator(), function (mapPolygon) {\r\n var dataContext = mapPolygon.dataItem.dataContext;\r\n return dataContext.id == id;\r\n });\r\n };\r\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\r\n MapPolygonSeries.prototype.copyFrom = function (source) {\r\n this.mapPolygons.template.copyFrom(source.mapPolygons.template);\r\n _super.prototype.copyFrom.call(this, source);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapPolygonSeries.prototype.getFeatures = function () {\r\n var _this = this;\r\n var features = [];\r\n this.dataItems.each(function (dataItem) {\r\n var feature = dataItem.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n });\r\n this.mapPolygons.each(function (mapPolygon) {\r\n if (_this.dataItems.indexOf(mapPolygon._dataItem) == -1) {\r\n var feature = mapPolygon.getFeature();\r\n if (feature) {\r\n features.push(feature);\r\n }\r\n }\r\n });\r\n return features;\r\n };\r\n Object.defineProperty(MapPolygonSeries.prototype, \"sortPolygonsBy\", {\r\n /**\r\n * @return How to sort map polygons\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"sortPolygonsBy\");\r\n },\r\n /**\r\n * How to order polygons in actual SVG document. Affects selection order\r\n * using TAB key.\r\n *\r\n * Available options: `\"area\"` (default), `\"name\"`, `\"longitude\"`,\r\n * `\"latitude\"`, `\"id\"`, and `\"none\"`.\r\n *\r\n * @default area\r\n * @since 4.9.36\r\n * @param value How to sort map polygons\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"sortPolygonsBy\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapPolygonSeries.prototype, \"sortPolygonsReversed\", {\r\n /**\r\n * @return Reverse polygon sort direction\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"sortPolygonsReversed\");\r\n },\r\n /**\r\n * If `sortPolygonsBy` is set to something other than `\"none\"`, polygons\r\n * will be sorted by the given parameter, using natural sort direction.\r\n *\r\n * Setting `sortPolygonsReversed = true` will reverse this direction.\r\n *\r\n * @default false\r\n * @since 4.9.36\r\n * @param value Reverse polygon sort direction\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"sortPolygonsReversed\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapPolygonSeries;\r\n}(MapSeries));\r\nexport { MapPolygonSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapPolygonSeries\"] = MapPolygonSeries;\r\nregistry.registeredClasses[\"MapPolygonSeriesDataItem\"] = MapPolygonSeriesDataItem;\r\n//# sourceMappingURL=MapPolygonSeries.js.map","/**\r\n * Map series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Series, SeriesDataItem } from \"../series/Series\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nvar MapSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapSeriesDataItem\";\r\n _this.values.value = {};\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"value\", {\r\n /**\r\n * @return Value\r\n */\r\n get: function () {\r\n return this.values.value.value;\r\n },\r\n /**\r\n * Numeric value of the data item.\r\n *\r\n * Value may be used in heat-map calculations.\r\n *\r\n * @param value Value\r\n */\r\n set: function (value) {\r\n this.setValue(\"value\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"zoomLevel\", {\r\n /**\r\n * @return Zoom level\r\n */\r\n get: function () {\r\n return this.properties[\"zoomLevel\"];\r\n },\r\n /**\r\n * When `zoomToMapObject()` is called the map will either calculate suitable\r\n * zoom level itself or use object's `zoomLevel` if set.\r\n *\r\n * @param value Zoom level\r\n */\r\n set: function (value) {\r\n this.setProperty(\"zoomLevel\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"zoomGeoPoint\", {\r\n /**\r\n * @return Zoom geo point\r\n */\r\n get: function () {\r\n return this.properties[\"zoomGeoPoint\"];\r\n },\r\n /**\r\n * When `zoomToMapObject()` is called the map will either calculate suitable\r\n * center position itself or use object's `zoomGeoPoint` if set.\r\n *\r\n * @param value Zoom geo point\r\n */\r\n set: function (value) {\r\n this.setProperty(\"zoomGeoPoint\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"east\", {\r\n /**\r\n * Longitude of the East-most point of the element.\r\n */\r\n get: function () {\r\n return this._east;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"west\", {\r\n /**\r\n * Longitude of the West-most point of the element.\r\n */\r\n get: function () {\r\n return this._west;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"south\", {\r\n /**\r\n * Latitude of the South-most point of the element.\r\n */\r\n get: function () {\r\n return this._south;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeriesDataItem.prototype, \"north\", {\r\n /**\r\n * Latitude of the North-most point of the element.\r\n */\r\n get: function () {\r\n return this._north;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the item's bounding coordinates: coordinates of the East, West,\r\n * North, and South-most points.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n MapSeriesDataItem.prototype.updateExtremes = function () {\r\n var geometry = this.getFeature().geometry;\r\n if (geometry) {\r\n var bounds = d3geo.geoBounds(geometry);\r\n var west = bounds[0][0];\r\n var south = bounds[0][1];\r\n var north = bounds[1][1];\r\n var east = bounds[1][0];\r\n var changed = false;\r\n if (north != this.north) {\r\n this._north = $math.round(north, 6);\r\n changed = true;\r\n }\r\n if (south != this.south) {\r\n this._south = $math.round(south, 6);\r\n changed = true;\r\n }\r\n if (east != this.east) {\r\n this._east = $math.round(east, 6);\r\n changed = true;\r\n }\r\n if (west != this.west) {\r\n this._west = $math.round(west, 6);\r\n changed = true;\r\n }\r\n // solves single russia prob\r\n if (this._east < this._west) {\r\n this._east = 180;\r\n this._west = -180;\r\n }\r\n if (changed) {\r\n this.component.invalidateDataItems();\r\n }\r\n }\r\n };\r\n MapSeriesDataItem.prototype.getFeature = function () {\r\n return {};\r\n };\r\n return MapSeriesDataItem;\r\n}(SeriesDataItem));\r\nexport { MapSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A base class for series of map objects.\r\n *\r\n * @see {@link IMapSeriesEvents} for a list of available Events\r\n * @see {@link IMapSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapSeries = /** @class */ (function (_super) {\r\n __extends(MapSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSeries() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapSeries\";\r\n // Set defaults\r\n _this.isMeasured = false;\r\n _this.nonScalingStroke = true;\r\n // Set data fields\r\n _this.dataFields.value = \"value\";\r\n _this.ignoreBounds = false;\r\n if (_this.tooltip) {\r\n _this.tooltip.showInViewport = true;\r\n }\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapSeries.prototype.createDataItem = function () {\r\n return new MapSeriesDataItem();\r\n };\r\n /**\r\n * Checks whether object should be included in series.\r\n *\r\n * @param includes A list of explicitly included ids\r\n * @param excludes A list of explicitly excluded ids\r\n * @param id Id of the object\r\n * @return Include?\r\n */\r\n MapSeries.prototype.checkInclude = function (includes, excludes, id) {\r\n if (includes) {\r\n if (includes.length == 0) {\r\n return false;\r\n }\r\n else {\r\n if (includes.indexOf(id) == -1) {\r\n return false;\r\n }\r\n }\r\n }\r\n if (excludes && excludes.length > 0) {\r\n if (excludes.indexOf(id) != -1) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"useGeodata\", {\r\n /**\r\n * @return Use GeoJSON data?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"useGeodata\");\r\n },\r\n /**\r\n * Should the map extract all the data about element from the GeoJSON?\r\n *\r\n * This is especially relevant for [[MapPolygonSeries]]. If not set to `true`\r\n * polygon series will need to contain geographical data in itself in order\r\n * to be drawn.\r\n *\r\n * If this is set to `true`, series will try to extract data for its objects\r\n * from either chart-level `geodata` or from series' `geodata` which holds\r\n * map infor in GeoJSON format.\r\n *\r\n * @default false\r\n * @param value Use GeoJSON data?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"useGeodata\", value)) {\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"include\", {\r\n /**\r\n * @return Included objects\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"include\");\r\n },\r\n /**\r\n * A list of object ids that should be explictly included in the series.\r\n *\r\n * If this is not set, the series will automatically include all of the\r\n * objects, available in the GeoJSON map. (minus the ones listed in\r\n * `exclude`)\r\n *\r\n * If you need to display only specific objects, use `include`. E.g.:\r\n *\r\n * `include = [\"FR\", \"ES\", \"DE\"];`\r\n *\r\n * The above will show only France, Spain, and Germany out of the whole map.\r\n *\r\n * @param value Included objects\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"include\", value)) {\r\n this.processIncExc();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.processIncExc = function () {\r\n //this.data = [];\r\n this.invalidateData();\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"ignoreBounds\", {\r\n /**\r\n * @return Ignore bounds?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"ignoreBounds\");\r\n },\r\n /**\r\n * Should this series be included when calculating bounds of the map?\r\n *\r\n * This affects initial zoom as well as limits for zoom/pan.\r\n *\r\n * By default, `MapPolygonSeries` included (true), while `MapImageSeries` and\r\n * `MapLineSeries` are not (`false`).\r\n *\r\n * @since 4.3.0\r\n * @param value Ignore bounds?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"ignoreBounds\", value)) {\r\n if (this.chart) {\r\n this.chart.updateExtremes();\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"exclude\", {\r\n /**\r\n * @return Excluded ids\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"exclude\");\r\n },\r\n /**\r\n * A list of object ids that should be excluded from the series.\r\n *\r\n * E.g. you want to include all of the areas from a GeoJSON map, except\r\n * Antarctica.\r\n *\r\n * You'd leave `include` empty, and set `exclude = [\"AQ\"]`.\r\n *\r\n * @param value Excluded ids\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"exclude\", value)) {\r\n this.processIncExc();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorates a newly added object.\r\n *\r\n * @param event [description]\r\n */\r\n MapSeries.prototype.handleObjectAdded = function (event) {\r\n var mapObject = event.newValue;\r\n mapObject.parent = this;\r\n mapObject.series = this;\r\n mapObject.strokeWidth = mapObject.strokeWidth;\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"geodata\", {\r\n /**\r\n * @return GeoJSON data\r\n */\r\n get: function () {\r\n return this._geodata;\r\n },\r\n /**\r\n * Map data in GeoJSON format.\r\n *\r\n * The series supports the following GeoJSON objects: `Point`, `LineString`,\r\n * `Polygon`, `MultiPoint`, `MultiLineString`, and `MultiPolygon`.\r\n *\r\n * @see {@link http://geojson.org/} Official GeoJSON format specification\r\n * @param geoJSON GeoJSON data\r\n */\r\n set: function (geodata) {\r\n if (geodata != this._geodata) {\r\n this._geodata = geodata;\r\n if (this.reverseGeodata) {\r\n this.chart.processReverseGeodata(this._geodata);\r\n }\r\n for (var i = this.data.length - 1; i >= 0; i--) {\r\n if (this.data[i].madeFromGeoData == true) {\r\n this.data.splice(i, 1);\r\n }\r\n }\r\n this.disposeData();\r\n this.invalidateData();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"reverseGeodata\", {\r\n /**\r\n * @returns Reverse the order of geodata coordinates?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"reverseGeodata\");\r\n },\r\n /**\r\n * Indicates whether GeoJSON geodata supplied to the chart uses\r\n * ESRI (clockwise) or non-ESRI (counter-clockwise) order of the polygon\r\n * coordinates.\r\n *\r\n * `MapChart` supports only ESRI standard, so if your custom maps appears\r\n * garbled, try setting `reverseGeodata = true`.\r\n *\r\n * @default false\r\n * @since 4.10.11\r\n * @param value Reverse the order of geodata coordinates?\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"reverseGeodata\", value) && this._geodata) {\r\n this.chart.processReverseGeodata(this._geodata);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"geodataSource\", {\r\n /**\r\n * Returns a [[DataSource]] specifically for loading Component's data.\r\n *\r\n * @return Data source\r\n */\r\n get: function () {\r\n if (!this._dataSources[\"geodata\"]) {\r\n this.getDataSource(\"geodata\");\r\n }\r\n return this._dataSources[\"geodata\"];\r\n },\r\n /**\r\n * Sets a [[DataSource]] to be used for loading Component's data.\r\n *\r\n * @param value Data source\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this._dataSources[\"geodata\"]) {\r\n this.removeDispose(this._dataSources[\"geodata\"]);\r\n }\r\n this._dataSources[\"geodata\"] = value;\r\n this._dataSources[\"geodata\"].component = this;\r\n this.events.on(\"inited\", function () {\r\n _this.loadData(\"geodata\");\r\n }, undefined, false);\r\n this.setDataSourceEvents(value, \"geodata\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.getFeatures = function () {\r\n return;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.validateDataItems = function () {\r\n _super.prototype.validateDataItems.call(this);\r\n this.updateExtremes();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.updateExtremes = function () {\r\n var north;\r\n var south;\r\n var east;\r\n var west;\r\n this.dataItems.each(function (dataItem) {\r\n if (dataItem.north > north || !$type.isNumber(north)) {\r\n north = dataItem.north;\r\n }\r\n if (dataItem.south < south || !$type.isNumber(south)) {\r\n south = dataItem.south;\r\n }\r\n if (dataItem.west < west || !$type.isNumber(west)) {\r\n west = dataItem.west;\r\n }\r\n if (dataItem.east > east || !$type.isNumber(east)) {\r\n east = dataItem.east;\r\n }\r\n });\r\n if (this._mapObjects) {\r\n this._mapObjects.each(function (mapObject) {\r\n if (mapObject.north > north || !$type.isNumber(north)) {\r\n north = mapObject.north;\r\n }\r\n if (mapObject.south < south || !$type.isNumber(south)) {\r\n south = mapObject.south;\r\n }\r\n if (mapObject.west < west || !$type.isNumber(west)) {\r\n west = mapObject.west;\r\n }\r\n if (mapObject.east > east || !$type.isNumber(east)) {\r\n east = mapObject.east;\r\n }\r\n });\r\n }\r\n if (this.north != north || this.east != east || this.south != south || this.west != west) {\r\n this._north = north;\r\n this._east = east;\r\n this._west = west;\r\n this._south = south;\r\n this.dispatch(\"geoBoundsChanged\");\r\n if (!this.ignoreBounds) {\r\n this.chart.updateExtremes();\r\n }\r\n }\r\n };\r\n Object.defineProperty(MapSeries.prototype, \"north\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._northDefined)) {\r\n return this._northDefined;\r\n }\r\n return this._north;\r\n },\r\n /**\r\n * North-most latitude of the series.\r\n *\r\n * By default, this holds auto-calculated latitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this._northDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"south\", {\r\n /**\r\n * @return Latitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._southDefined)) {\r\n return this._southDefined;\r\n }\r\n return this._south;\r\n },\r\n /**\r\n * South-most latitude of the series.\r\n *\r\n * By default, this holds auto-calculated latitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Latitude\r\n */\r\n set: function (value) {\r\n this._southDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"west\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._westDefined)) {\r\n return this._westDefined;\r\n }\r\n return this._west;\r\n },\r\n /**\r\n * West-most longitude of the series.\r\n *\r\n * By default, this holds auto-calculated longitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this._westDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapSeries.prototype, \"east\", {\r\n /**\r\n * @return Longitude\r\n */\r\n get: function () {\r\n if ($type.isNumber(this._eastDefined)) {\r\n return this._eastDefined;\r\n }\r\n return this._east;\r\n },\r\n /**\r\n * East-most longitude of the series.\r\n *\r\n * By default, this holds auto-calculated longitude of the extremity.\r\n *\r\n * It can be overridden manually.\r\n *\r\n * @param value Longitude\r\n */\r\n set: function (value) {\r\n this._eastDefined = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n MapSeries.prototype.processConfig = function (config) {\r\n if ($type.hasValue(config[\"geodata\"]) && $type.isString(config[\"geodata\"])) {\r\n var name_1 = config[\"geodata\"];\r\n // Check if there's a map loaded by such name\r\n if ($type.hasValue(window[\"am4geodata_\" + config[\"geodata\"]])) {\r\n config[\"geodata\"] = window[\"am4geodata_\" + config[\"geodata\"]];\r\n }\r\n // Nope. Let's try maybe we got JSON as string?\r\n else {\r\n try {\r\n config[\"geodata\"] = JSON.parse(config[\"geodata\"]);\r\n }\r\n catch (e) {\r\n // No go again. Error out.\r\n throw Error(\"MapChart error: Geodata `\" + name_1 + \"` is not loaded or is incorrect.\");\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n /**\r\n * Adds `projection` to \"as is\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as is?\r\n */\r\n MapSeries.prototype.asIs = function (field) {\r\n return field == \"geodata\" || _super.prototype.asIs.call(this, field);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n MapSeries.prototype.updateTooltipBounds = function () {\r\n if (this.tooltip && this.topParent) {\r\n this.tooltip.setBounds({ x: 10, y: 10, width: this.topParent.maxWidth - 20, height: this.topParent.maxHeight - 20 });\r\n }\r\n };\r\n return MapSeries;\r\n}(Series));\r\nexport { MapSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapSeries\"] = MapSeries;\r\nregistry.registeredClasses[\"MapSeriesDataItem\"] = MapSeriesDataItem;\r\n//# sourceMappingURL=MapSeries.js.map","/**\r\n * Map spline module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLine } from \"./MapLine\";\r\nimport { Polyspline } from \"../../core/elements/Polyspline\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Used to draw a spline on the map.\r\n *\r\n * @see {@link IMapSplineEvents} for a list of available events\r\n * @see {@link IMapSplineAdapters} for a list of available Adapters\r\n */\r\nvar MapSpline = /** @class */ (function (_super) {\r\n __extends(MapSpline, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSpline() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n _this.className = \"MapSpline\";\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n MapSpline.prototype.createLine = function () {\r\n this.line = new Polyspline();\r\n this.line.tensionX = 0.8;\r\n this.line.tensionY = 0.8;\r\n };\r\n Object.defineProperty(MapSpline.prototype, \"shortestDistance\", {\r\n /**\r\n * ShortestDistance = true is not supported by MapSpline, only MapLine does support it\r\n * @default false\r\n * @param value\r\n * @todo: review description\r\n */\r\n get: function () {\r\n return false;\r\n },\r\n set: function (value) {\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MapSpline;\r\n}(MapLine));\r\nexport { MapSpline };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapSpline\"] = MapSpline;\r\n//# sourceMappingURL=MapSpline.js.map","/**\r\n * Map spline series module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { MapLineSeries, MapLineSeriesDataItem } from \"./MapLineSeries\";\r\nimport { MapSpline } from \"./MapSpline\";\r\nimport { registry } from \"../../core/Registry\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Defines a [[DataItem]] for [[MapSplineSeries]]\r\n * @see {@link DataItem}\r\n */\r\nvar MapSplineSeriesDataItem = /** @class */ (function (_super) {\r\n __extends(MapSplineSeriesDataItem, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSplineSeriesDataItem() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapSplineSeriesDataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n return MapSplineSeriesDataItem;\r\n}(MapLineSeriesDataItem));\r\nexport { MapSplineSeriesDataItem };\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A series of map spline elements.\r\n *\r\n * @see {@link IMapSplineSeriesEvents} for a list of available Events\r\n * @see {@link IMapSplineSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar MapSplineSeries = /** @class */ (function (_super) {\r\n __extends(MapSplineSeries, _super);\r\n /**\r\n * Constructor\r\n */\r\n function MapSplineSeries() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"MapSplineSeries\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n MapSplineSeries.prototype.createDataItem = function () {\r\n return new MapSplineSeriesDataItem();\r\n };\r\n /**\r\n * Returns a new line instance of suitable type.\r\n *\r\n * @return New line\r\n */\r\n MapSplineSeries.prototype.createLine = function () {\r\n return new MapSpline();\r\n };\r\n return MapSplineSeries;\r\n}(MapLineSeries));\r\nexport { MapSplineSeries };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"MapSplineSeries\"] = MapSplineSeries;\r\nregistry.registeredClasses[\"MapSplineSeriesDataItem\"] = MapSplineSeriesDataItem;\r\n//# sourceMappingURL=MapSplineSeries.js.map","/**\r\n * A collection of Map-related utility functions.\r\n */\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Converts a multi-part polygon in X/Y coordinates to a geo-multipolygon in\r\n * geo-points (lat/long).\r\n *\r\n * @param multiPolygon Source multi-polygon\r\n * @return Geo-multipolygon\r\n */\r\nexport function multiPolygonToGeo(multiPolygon) {\r\n return $array.map(multiPolygon, function (polygon) {\r\n var surface = polygon[0];\r\n var hole = polygon[1];\r\n //let holePoints: Array = [];\r\n var geoArea = [];\r\n if (surface) {\r\n geoArea.push(multiPointToGeo(surface));\r\n }\r\n if (hole) {\r\n geoArea.push(multiPointToGeo(hole));\r\n }\r\n return geoArea;\r\n });\r\n}\r\n/**\r\n * Converts a multiline in X/Y coordinates to a geo-multiline in geo-points\r\n * (lat/long).\r\n *\r\n * @param multiLine Source multiline\r\n * @return Geo-multiline\r\n */\r\nexport function multiLineToGeo(multiLine) {\r\n return $array.map(multiLine, function (multiLine) {\r\n return multiPointToGeo(multiLine);\r\n });\r\n}\r\n/**\r\n * Converts multiple X/Y points into a lat/long geo-points.\r\n *\r\n * @param points Source points\r\n * @return Geo-points\r\n */\r\nexport function multiPointToGeo(points) {\r\n return $array.map(points, function (point) {\r\n return pointToGeo(point);\r\n });\r\n}\r\n/**\r\n * Converts multiple X/Y points into a lat/long geo-points.\r\n *\r\n * @param points Source points\r\n * @return Geo-points\r\n */\r\nexport function multiGeoToPoint(geoPoints) {\r\n return $array.map(geoPoints, geoToPoint);\r\n}\r\n/**\r\n * Converts X/Y point into a lat/long geo-point.\r\n *\r\n * @param point Source point\r\n * @return Geo-point\r\n */\r\nexport function pointToGeo(point) {\r\n return { longitude: point[0], latitude: point[1] };\r\n}\r\n/**\r\n * Converts lat/long geo-point into a X/Y point.\r\n *\r\n * @param point Source geo-point\r\n * @return X/Y point\r\n */\r\nexport function geoToPoint(geoPoint) {\r\n return [geoPoint.longitude, geoPoint.latitude];\r\n}\r\n/**\r\n * Converts geo line (collection of lat/long coordinates) to screen line (x/y).\r\n *\r\n * @param multiGeoLine Source geo line\r\n * @return Screen line\r\n */\r\nexport function multiGeoLineToMultiLine(multiGeoLine) {\r\n return $array.map(multiGeoLine, function (segment) {\r\n return $array.map(segment, geoToPoint);\r\n });\r\n}\r\n/**\r\n * Converts a geo polygon (collection of lat/long coordinates) to screen\r\n * polygon (x/y).\r\n *\r\n * @param multiGeoPolygon Source polygon\r\n * @return Screen polygon\r\n */\r\nexport function multiGeoPolygonToMultipolygon(multiGeoPolygon) {\r\n return $array.map(multiGeoPolygon, function (geoPolygon) {\r\n var surface = geoPolygon[0];\r\n var hole = geoPolygon[1];\r\n var multiPolygon = [];\r\n if (surface) {\r\n multiPolygon.push(multiGeoToPoint(surface));\r\n }\r\n if (hole) {\r\n multiPolygon.push(multiGeoToPoint(hole));\r\n }\r\n return multiPolygon;\r\n });\r\n}\r\n/**\r\n * Returns a set of geographical coordinates for the circle with a center\r\n * at specific lat/long coordinates and radius (in degrees).\r\n *\r\n * @since 4.3.0\r\n * @param longitude Center longitude\r\n * @param latitude Center latitude\r\n * @param radius Radius (degrees)\r\n * @return Circle coordinates\r\n */\r\nexport function getCircle(longitude, latitude, radius) {\r\n return [d3geo.geoCircle().center([longitude, latitude]).radius(radius)().coordinates];\r\n}\r\n/**\r\n * Returns a set of screen coordinates that represents a \"background\" area\r\n * between provided extremities.\r\n *\r\n * @since 4.3.0\r\n * @param north North latitude\r\n * @param east East longitude\r\n * @param south South latitude\r\n * @param west West longitude\r\n * @return Polygon\r\n */\r\nexport function getBackground(north, east, south, west) {\r\n var multiPolygon = [];\r\n if (west == -180) {\r\n west = -179.9999;\r\n }\r\n if (south == -90) {\r\n south = -89.9999;\r\n }\r\n if (north == 90) {\r\n north = 89.9999;\r\n }\r\n if (east == 180) {\r\n east = 179.9999;\r\n }\r\n var stepLong = Math.min(90, (east - west) / Math.ceil((east - west) / 90));\r\n var stepLat = (north - south) / Math.ceil((north - south) / 90);\r\n for (var ln = west; ln < east; ln = ln + stepLong) {\r\n var surface = [];\r\n multiPolygon.push([surface]);\r\n if (ln + stepLong > east) {\r\n stepLong = east - ln;\r\n }\r\n for (var ll = ln; ll <= ln + stepLong; ll = ll + 5) {\r\n surface.push([ll, north]);\r\n }\r\n for (var lt = north; lt >= south; lt = lt - stepLat) {\r\n surface.push([ln + stepLong, lt]);\r\n }\r\n for (var ll = ln + stepLong; ll >= ln; ll = ll - 5) {\r\n surface.push([ll, south]);\r\n }\r\n for (var lt = south; lt <= north; lt = lt + stepLat) {\r\n surface.push([ln, lt]);\r\n }\r\n }\r\n return multiPolygon;\r\n}\r\n//# sourceMappingURL=MapUtils.js.map","/**\r\n * A module for the mini-map control.\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { Rectangle } from \"../../core/elements/Rectangle\";\r\nimport { List } from \"../../core/utils/List\";\r\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a \"bird's eye\" view of the whole map.\r\n *\r\n * This control creates a mini-map with the whole of the map, highlighting\r\n * the area which is in the current viewport of the map map.\r\n *\r\n * @see {@link ISmallMapEvents} for a list of available events\r\n * @see {@link ISmallMapAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar SmallMap = /** @class */ (function (_super) {\r\n __extends(SmallMap, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SmallMap() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * A target map.\r\n */\r\n _this._chart = new MutableValueDisposer();\r\n _this.className = \"SmallMap\";\r\n // Set defaults\r\n _this.align = \"left\";\r\n _this.valign = \"bottom\";\r\n _this.percentHeight = 20;\r\n _this.percentWidth = 20;\r\n _this.margin(5, 5, 5, 5);\r\n var interfaceColors = new InterfaceColorSet();\r\n // Set background defailts\r\n _this.background.fillOpacity = 0.9;\r\n _this.background.fill = interfaceColors.getFor(\"background\");\r\n // Set up events\r\n _this.events.on(\"hit\", _this.moveToPosition, _this, false);\r\n _this.events.on(\"maxsizechanged\", _this.updateMapSize, _this, false);\r\n // Create a container\r\n _this.seriesContainer = _this.createChild(Container);\r\n _this.seriesContainer.shouldClone = false;\r\n // Create an outline rectangle\r\n var rectangle = _this.createChild(Rectangle);\r\n rectangle.shouldClone = false;\r\n rectangle.stroke = interfaceColors.getFor(\"alternativeBackground\");\r\n rectangle.strokeWidth = 1;\r\n rectangle.strokeOpacity = 0.5;\r\n rectangle.fill = color(); //\"none\";\r\n rectangle.verticalCenter = \"middle\";\r\n rectangle.horizontalCenter = \"middle\";\r\n rectangle.isMeasured = false;\r\n rectangle.visible = false;\r\n _this.rectangle = rectangle;\r\n _this._disposers.push(_this._chart);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(SmallMap.prototype, \"series\", {\r\n /**\r\n * A list of map series used to draw the mini-map.\r\n *\r\n * @readonly\r\n * @return Series\r\n */\r\n get: function () {\r\n if (!this._series) {\r\n this._series = new List();\r\n this._series.events.on(\"inserted\", this.handleSeriesAdded, this, false);\r\n this._series.events.on(\"removed\", this.handleSeriesRemoved, this, false);\r\n }\r\n return this._series;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Decorates a new series when they are pushed into a `series` list.\r\n *\r\n * @param event Event\r\n */\r\n SmallMap.prototype.handleSeriesAdded = function (event) {\r\n var series = event.newValue;\r\n if (this.chart.series.contains(series)) {\r\n var newSeries = series.clone();\r\n this._series.removeValue(series);\r\n this._series.push(newSeries);\r\n series = newSeries;\r\n this.chart.dataUsers.push(newSeries);\r\n }\r\n series.chart = this.chart;\r\n series.parent = this.seriesContainer;\r\n series.interactionsEnabled = false;\r\n series.events.on(\"inited\", this.updateMapSize, this, false);\r\n series.hidden = false;\r\n };\r\n /**\r\n * Cleans up after series are removed from Scrollbar.\r\n *\r\n * @param event Event\r\n */\r\n SmallMap.prototype.handleSeriesRemoved = function (event) {\r\n //let sourceSeries: MapSeries = event.oldValue;\r\n this.invalidate();\r\n };\r\n /**\r\n * Moves main map pan position after click on the small map.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n SmallMap.prototype.moveToPosition = function (event) {\r\n var rectPoint = $utils.spritePointToSprite(event.spritePoint, this, this.seriesContainer);\r\n var geoPoint = this.chart.seriesPointToGeo(rectPoint);\r\n this.chart.zoomToGeoPoint(geoPoint, this.chart.zoomLevel, true);\r\n };\r\n Object.defineProperty(SmallMap.prototype, \"chart\", {\r\n /**\r\n * @return Chart/map\r\n */\r\n get: function () {\r\n return this._chart.get();\r\n },\r\n /**\r\n * A chart/map that this control is meant for.\r\n *\r\n * @param chart Chart/map\r\n */\r\n set: function (chart) {\r\n if (this.chart != chart) {\r\n this._chart.set(chart, new MultiDisposer([\r\n //chart.events.on(\"zoomlevelchanged\", this.updateRectangle, this, false),\r\n chart.events.on(\"mappositionchanged\", this.updateRectangle, this, false),\r\n chart.events.on(\"scaleratiochanged\", this.updateMapSize, this, false)\r\n ]));\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the viewport recangle as per current map zoom/pan position.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n SmallMap.prototype.updateRectangle = function () {\r\n var chart = this.chart;\r\n var zoomLevel = chart.zoomLevel;\r\n var rectangle = this.rectangle;\r\n rectangle.width = this.pixelWidth / zoomLevel;\r\n rectangle.height = this.pixelHeight / zoomLevel;\r\n var scale = Math.min(this.percentWidth, this.percentHeight) / 100;\r\n var seriesContainer = chart.seriesContainer;\r\n rectangle.x = Math.ceil((-seriesContainer.pixelX) * scale / zoomLevel) + this.seriesContainer.pixelX;\r\n rectangle.y = Math.ceil((-seriesContainer.pixelY) * scale / zoomLevel) + this.seriesContainer.pixelY;\r\n rectangle.validate();\r\n };\r\n /**\r\n * Update map size so that internal elements can redraw themselves after\r\n * the size of the small map changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n SmallMap.prototype.updateMapSize = function () {\r\n if (this.chart) {\r\n var scale = this.chart.scaleRatio * Math.min(this.percentWidth, this.percentHeight) / 100;\r\n this.seriesContainer.scale = scale;\r\n var bbox = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0\r\n };\r\n try { // Add exception catching to tame FF\r\n bbox = this.seriesContainer.group.node.getBBox();\r\n }\r\n catch (err) { }\r\n if (bbox.width > 0) {\r\n this.rectangle.visible = true;\r\n }\r\n this.seriesContainer.x = this.pixelWidth / 2 - bbox.x * scale - bbox.width / 2 * scale;\r\n this.seriesContainer.y = this.pixelHeight / 2 - bbox.y * scale - bbox.height / 2 * scale;\r\n this.updateRectangle();\r\n this.afterDraw();\r\n }\r\n };\r\n /**\r\n * Update elements after drawing the small map.\r\n */\r\n SmallMap.prototype.afterDraw = function () {\r\n _super.prototype.afterDraw.call(this);\r\n //this.seriesContainer.moveTo({ x: this.pixelWidth / 2, y: this.pixelHeight / 2 });\r\n this.rectangle.maskRectangle = { x: -1, y: -1, width: Math.ceil(this.pixelWidth + 2), height: Math.ceil(this.pixelHeight + 2) };\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n SmallMap.prototype.processConfig = function (config) {\r\n if (config) {\r\n // Set up series\r\n if ($type.hasValue(config.series) && $type.isArray(config.series)) {\r\n for (var i = 0, len = config.series.length; i < len; i++) {\r\n var series = config.series[i];\r\n if ($type.hasValue(series) && $type.isString(series) && this.map.hasKey(series)) {\r\n config.series[i] = this.map.getKey(series);\r\n }\r\n }\r\n }\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return SmallMap;\r\n}(Container));\r\nexport { SmallMap };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SmallMap\"] = SmallMap;\r\n//# sourceMappingURL=SmallMap.js.map","/**\r\n * Zoom control module\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"../../core/Container\";\r\nimport { Button } from \"../../core/elements/Button\";\r\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\r\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { keyboard } from \"../../core/utils/Keyboard\";\r\nimport { getInteraction } from \"../../core/interaction/Interaction\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Creates a control for zooming the map.\r\n *\r\n * @see {@link IZoomControlEvents} for a list of available events\r\n * @see {@link IZoomControlAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar ZoomControl = /** @class */ (function (_super) {\r\n __extends(ZoomControl, _super);\r\n /**\r\n * Constructor\r\n */\r\n function ZoomControl() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * A target map.\r\n */\r\n _this._chart = new MutableValueDisposer();\r\n _this.className = \"ZoomControl\";\r\n _this.align = \"right\";\r\n _this.valign = \"bottom\";\r\n _this.layout = \"vertical\";\r\n _this.padding(5, 5, 5, 5);\r\n var interfaceColors = new InterfaceColorSet();\r\n var plusButton = _this.createChild(Button);\r\n plusButton.shouldClone = false;\r\n plusButton.label.text = \"+\";\r\n //plusButton.fontFamily = \"Verdana\";\r\n _this.plusButton = plusButton;\r\n var slider = _this.createChild(Container);\r\n slider.shouldClone = false;\r\n slider.background.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n slider.background.fillOpacity = 0.05;\r\n slider.background.events.on(\"hit\", _this.handleBackgroundClick, _this, false);\r\n slider.events.on(\"sizechanged\", _this.updateThumbSize, _this, false);\r\n _this.slider = slider;\r\n var thumb = slider.createChild(Button);\r\n thumb.shouldClone = false;\r\n thumb.padding(0, 0, 0, 0);\r\n thumb.draggable = true;\r\n thumb.events.on(\"drag\", _this.handleThumbDrag, _this, false);\r\n _this.thumb = thumb;\r\n var minusButton = _this.createChild(Button);\r\n minusButton.shouldClone = false;\r\n minusButton.label.text = \"-\";\r\n //minusButton.fontFamily = \"Verdana\";\r\n _this.minusButton = minusButton;\r\n // Set roles\r\n _this.thumb.role = \"slider\";\r\n _this.thumb.readerLive = \"polite\";\r\n // Set reader text\r\n _this.thumb.readerTitle = _this.language.translate(\"Use arrow keys to zoom in and out\");\r\n _this.minusButton.readerTitle = _this.language.translate(\"Press ENTER to zoom in\");\r\n _this.plusButton.readerTitle = _this.language.translate(\"Press ENTER to zoom out\");\r\n _this.applyTheme();\r\n _this.events.on(\"propertychanged\", function (event) {\r\n if (event.property == \"layout\") {\r\n _this.fixLayout();\r\n }\r\n }, undefined, false);\r\n _this._disposers.push(_this._chart);\r\n _this.fixLayout();\r\n return _this;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n ZoomControl.prototype.fixLayout = function () {\r\n var plusButton = this.plusButton;\r\n var minusButton = this.minusButton;\r\n var thumb = this.thumb;\r\n var slider = this.slider;\r\n plusButton.x = undefined;\r\n plusButton.y = undefined;\r\n minusButton.x = undefined;\r\n minusButton.y = undefined;\r\n thumb.x = undefined;\r\n thumb.y = undefined;\r\n slider.x = undefined;\r\n slider.y = undefined;\r\n plusButton.padding(6, 10, 6, 10);\r\n minusButton.padding(6, 10, 6, 10);\r\n minusButton.label.align = \"center\";\r\n minusButton.label.valign = \"middle\";\r\n plusButton.label.align = \"center\";\r\n plusButton.label.valign = \"middle\";\r\n if (this.layout == \"vertical\") {\r\n this.width = 40;\r\n this.height = undefined;\r\n minusButton.width = percent(100);\r\n minusButton.height = undefined;\r\n thumb.width = percent(100);\r\n thumb.height = undefined;\r\n plusButton.width = percent(100);\r\n plusButton.height = undefined;\r\n slider.width = percent(100);\r\n minusButton.marginTop = 1;\r\n plusButton.marginBottom = 2;\r\n slider.height = 0;\r\n minusButton.toFront();\r\n plusButton.toBack();\r\n thumb.minX = 0;\r\n thumb.maxX = 0;\r\n thumb.minY = 0;\r\n }\r\n else if (this.layout == \"horizontal\") {\r\n this.height = 40;\r\n this.width = undefined;\r\n minusButton.height = percent(100);\r\n minusButton.width = undefined;\r\n plusButton.height = percent(100);\r\n plusButton.width = undefined;\r\n thumb.height = percent(100);\r\n thumb.width = undefined;\r\n thumb.minX = 0;\r\n thumb.minY = 0;\r\n thumb.maxY = 0;\r\n slider.height = percent(100);\r\n slider.width = 0;\r\n minusButton.toBack();\r\n plusButton.toFront();\r\n }\r\n };\r\n /**\r\n * Handles zoom operation after clicking on the slider background.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\r\n ZoomControl.prototype.handleBackgroundClick = function (event) {\r\n var sprite = event.target;\r\n var y = event.spritePoint.y;\r\n var chart = this.chart;\r\n var maxPower = Math.log(chart.maxZoomLevel) / Math.LN2;\r\n var minPower = Math.log(chart.minZoomLevel) / Math.LN2;\r\n var power = (sprite.pixelHeight - y) / sprite.pixelHeight * (minPower + (maxPower - minPower));\r\n var zoomLevel = Math.pow(2, power);\r\n chart.zoomToGeoPoint(chart.zoomGeoPoint, zoomLevel);\r\n };\r\n Object.defineProperty(ZoomControl.prototype, \"chart\", {\r\n /**\r\n * @return Map/chart\r\n */\r\n get: function () {\r\n return this._chart.get();\r\n },\r\n /**\r\n * A main chart/map that this zoom control is for.\r\n *\r\n * @param chart Map/chart\r\n */\r\n set: function (chart) {\r\n var _this = this;\r\n this._chart.set(chart, new MultiDisposer([\r\n chart.events.on(\"maxsizechanged\", this.updateThumbSize, this, false),\r\n chart.events.on(\"zoomlevelchanged\", this.updateThumb, this, false),\r\n this.minusButton.events.on(\"hit\", function () { chart.zoomOut(chart.zoomGeoPoint); }, chart, false),\r\n getInteraction().body.events.on(\"keyup\", function (ev) {\r\n if (_this.topParent.hasFocused) {\r\n // ENTER is now handled globally\r\n if (keyboard.isKey(ev.event, \"plus\")) {\r\n chart.zoomIn();\r\n }\r\n else if (keyboard.isKey(ev.event, \"minus\")) {\r\n chart.zoomOut();\r\n }\r\n }\r\n }, chart),\r\n this.plusButton.events.on(\"hit\", function () { chart.zoomIn(chart.zoomGeoPoint); }, chart, false)\r\n ]));\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the slider's thumb size based on the available zoom space.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ZoomControl.prototype.updateThumbSize = function () {\r\n var chart = this.chart;\r\n if (chart) {\r\n var slider = this.slider;\r\n var thumb = this.thumb;\r\n if (this.layout == \"vertical\") {\r\n thumb.minHeight = Math.min(this.slider.pixelHeight, 20);\r\n thumb.height = slider.pixelHeight / this.stepCount;\r\n thumb.maxY = slider.pixelHeight - thumb.pixelHeight;\r\n if (thumb.pixelHeight <= 1) {\r\n thumb.visible = false;\r\n }\r\n else {\r\n thumb.visible = true;\r\n }\r\n }\r\n else {\r\n thumb.minWidth = Math.min(this.slider.pixelWidth, 20);\r\n thumb.width = slider.pixelWidth / this.stepCount;\r\n thumb.maxX = slider.pixelWidth - thumb.pixelWidth;\r\n if (thumb.pixelWidth <= 1) {\r\n thumb.visible = false;\r\n }\r\n else {\r\n thumb.visible = true;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Updates thumb according to current zoom position from map.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ZoomControl.prototype.updateThumb = function () {\r\n var slider = this.slider;\r\n var chart = this.chart;\r\n var thumb = this.thumb;\r\n if (!thumb.isDown) {\r\n var step = (Math.log(chart.zoomLevel) - Math.log(this.chart.minZoomLevel)) / Math.LN2;\r\n if (this.layout == \"vertical\") {\r\n thumb.y = slider.pixelHeight - (slider.pixelHeight - thumb.pixelHeight) * step / this.stepCount - thumb.pixelHeight;\r\n }\r\n else {\r\n thumb.x = slider.pixelWidth * step / this.stepCount;\r\n }\r\n }\r\n };\r\n /**\r\n * Zooms the actual map when slider position changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n ZoomControl.prototype.handleThumbDrag = function () {\r\n var slider = this.slider;\r\n var chart = this.chart;\r\n var thumb = this.thumb;\r\n var step;\r\n var minStep = Math.log(this.chart.minZoomLevel) / Math.LN2;\r\n if (this.layout == \"vertical\") {\r\n step = this.stepCount * (slider.pixelHeight - thumb.pixelY - thumb.pixelHeight) / (slider.pixelHeight - thumb.pixelHeight);\r\n }\r\n else {\r\n step = this.stepCount * thumb.pixelX / slider.pixelWidth;\r\n }\r\n step = minStep + step;\r\n var zoomLevel = Math.pow(2, step);\r\n chart.zoomToGeoPoint(undefined, zoomLevel, false, 0);\r\n };\r\n Object.defineProperty(ZoomControl.prototype, \"stepCount\", {\r\n /**\r\n * Returns the step countfor the slider grid according to map's min and max\r\n * zoom level settings.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Step count\r\n */\r\n get: function () {\r\n return Math.log(this.chart.maxZoomLevel) / Math.LN2 - Math.log(this.chart.minZoomLevel) / Math.LN2;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a background element for slider control.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background\r\n */\r\n ZoomControl.prototype.createBackground = function () {\r\n return new RoundedRectangle();\r\n };\r\n return ZoomControl;\r\n}(Container));\r\nexport { ZoomControl };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ZoomControl\"] = ZoomControl;\r\n//# sourceMappingURL=ZoomControl.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Mercator projection.\r\n */\r\nvar Mercator = /** @class */ (function (_super) {\r\n __extends(Mercator, _super);\r\n function Mercator() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoMercator();\r\n return _this;\r\n }\r\n return Mercator;\r\n}(Projection));\r\nexport { Mercator };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Mercator\"] = Mercator;\r\n//# sourceMappingURL=Mercator.js.map","/**\r\n * Functionality for Miller projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\n// @ts-ignore\r\nimport * as d3geoprojection from \"d3-geo-projection\";\r\n/**\r\n * Miller projection.\r\n */\r\nvar Miller = /** @class */ (function (_super) {\r\n __extends(Miller, _super);\r\n function Miller() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geoprojection.geoMiller();\r\n return _this;\r\n }\r\n return Miller;\r\n}(Projection));\r\nexport { Miller };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Miller\"] = Miller;\r\n//# sourceMappingURL=Miller.js.map","/**\r\n * Functionality for Eckert6 projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\n// @ts-ignore\r\nimport * as d3geoprojection from \"d3-geo-projection\";\r\n/**\r\n * Eckert6 projection.\r\n */\r\nvar Eckert6 = /** @class */ (function (_super) {\r\n __extends(Eckert6, _super);\r\n function Eckert6() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geoprojection.geoEckert6();\r\n return _this;\r\n }\r\n return Eckert6;\r\n}(Projection));\r\nexport { Eckert6 };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Eckert6\"] = Eckert6;\r\n//# sourceMappingURL=Eckert6.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar Orthographic = /** @class */ (function (_super) {\r\n __extends(Orthographic, _super);\r\n function Orthographic() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoOrthographic();\r\n return _this;\r\n }\r\n return Orthographic;\r\n}(Projection));\r\nexport { Orthographic };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Orthographic\"] = Orthographic;\r\n//# sourceMappingURL=Orthographic.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar Stereographic = /** @class */ (function (_super) {\r\n __extends(Stereographic, _super);\r\n function Stereographic() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoStereographic();\r\n return _this;\r\n }\r\n return Stereographic;\r\n}(Projection));\r\nexport { Stereographic };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Stereographic\"] = Stereographic;\r\n//# sourceMappingURL=Stereographic.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar Albers = /** @class */ (function (_super) {\r\n __extends(Albers, _super);\r\n function Albers() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoAlbers();\r\n return _this;\r\n }\r\n return Albers;\r\n}(Projection));\r\nexport { Albers };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Albers\"] = Albers;\r\n//# sourceMappingURL=Albers.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar AlbersUsa = /** @class */ (function (_super) {\r\n __extends(AlbersUsa, _super);\r\n function AlbersUsa() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoAlbersUsa();\r\n return _this;\r\n }\r\n return AlbersUsa;\r\n}(Projection));\r\nexport { AlbersUsa };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AlbersUsa\"] = AlbersUsa;\r\n//# sourceMappingURL=AlbersUSA.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar NaturalEarth1 = /** @class */ (function (_super) {\r\n __extends(NaturalEarth1, _super);\r\n function NaturalEarth1() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoNaturalEarth1();\r\n return _this;\r\n }\r\n return NaturalEarth1;\r\n}(Projection));\r\nexport { NaturalEarth1 };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"NaturalEarth1\"] = NaturalEarth1;\r\n//# sourceMappingURL=NaturalEarth1.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar AzimuthalEqualArea = /** @class */ (function (_super) {\r\n __extends(AzimuthalEqualArea, _super);\r\n function AzimuthalEqualArea() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoAzimuthalEqualArea();\r\n return _this;\r\n }\r\n return AzimuthalEqualArea;\r\n}(Projection));\r\nexport { AzimuthalEqualArea };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AzimuthalEqualArea\"] = AzimuthalEqualArea;\r\n//# sourceMappingURL=AzimuthalEqualArea.js.map","/**\r\n * Functionality for Mercator projection\r\n *\r\n * The function(s) below are from D3.js library (https://d3js.org/)\r\n *\r\n * ```\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ```\r\n */\r\nimport { __extends } from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Projection } from \"./Projection\";\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * Orthographic projection.\r\n */\r\nvar EqualEarth = /** @class */ (function (_super) {\r\n __extends(EqualEarth, _super);\r\n function EqualEarth() {\r\n var _this = _super.call(this) || this;\r\n _this.d3Projection = d3geo.geoEqualEarth();\r\n return _this;\r\n }\r\n return EqualEarth;\r\n}(Projection));\r\nexport { EqualEarth };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"EqualEarth\"] = EqualEarth;\r\n//# sourceMappingURL=EqualEarth.js.map","/**\r\n * This module contains funcitonality related to geographical projections\r\n */\r\nimport { registry } from \"../../../core/Registry\";\r\nimport * as $math from \"../../../core/utils/Math\";\r\nimport * as d3geo from \"d3-geo\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * This is a base class for a geographical projection.\r\n */\r\nvar Projection = /** @class */ (function () {\r\n function Projection() {\r\n this.d3Projection = d3geo.geoEquirectangular();\r\n }\r\n Object.defineProperty(Projection.prototype, \"d3Projection\", {\r\n /**\r\n * d3 projection\r\n */\r\n get: function () {\r\n return this._d3Projection;\r\n },\r\n /**\r\n * d3 projection\r\n */\r\n set: function (projection) {\r\n this._d3Projection = projection;\r\n projection.precision(0.1);\r\n this._d3Path = d3geo.geoPath().projection(projection);\r\n if (this.chart) {\r\n this.chart.invalidateProjection();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Projection.prototype, \"d3Path\", {\r\n /**\r\n * d3 path generator method\r\n * @ignore\r\n */\r\n get: function () {\r\n return this._d3Path;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Projection.prototype, \"scale\", {\r\n /**\r\n * @ignore\r\n */\r\n get: function () {\r\n return this.d3Projection.scale() / 100;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Converts a geographical point (lat/long) to a screen point (x/y)\r\n * @param geoPoint Geo point (lat/long)\r\n * @return Screen point (x/y)\r\n */\r\n Projection.prototype.convert = function (geoPoint) {\r\n /*\r\n geoPoint = $geo.normalizePoint(geoPoint);\r\n geoPoint = this.rotate(geoPoint, this.deltaLongitude, this.deltaLatitude, this.deltaGama);\r\n let pointInRadians: IPoint = this.project(geoPoint.longitude * $math.RADIANS, geoPoint.latitude * $math.RADIANS);\r\n return {\r\n x: $math.round(pointInRadians.x * $math.DEGREES - this.centerPoint.x, 4) * this.scale,\r\n y: $math.round(-pointInRadians.y * $math.DEGREES - this.centerPoint.y, 4) * this.scale\r\n };*/\r\n var p = this.d3Projection([geoPoint.longitude, geoPoint.latitude]);\r\n if (p) {\r\n return { x: p[0], y: p[1] };\r\n }\r\n };\r\n /**\r\n * Converts a screen point (x/y) to a geographical point (lat/long)\r\n * @param point Screen point (x/y)\r\n * @return Geo point (lat/long)\r\n */\r\n Projection.prototype.invert = function (point) {\r\n /*\r\n let pointInRadians: IGeoPoint = this.unproject((point.x / this.scale + this.centerPoint.x) * $math.RADIANS, (-point.y / this.scale - this.centerPoint.y) * $math.RADIANS);\r\n\r\n let geoPoint = { longitude: pointInRadians.longitude * $math.DEGREES, latitude: pointInRadians.latitude * $math.DEGREES };\r\n\r\n geoPoint = this.unrotate(geoPoint, this.deltaLongitude, this.deltaLatitude, this.deltaGama);\r\n */\r\n var p = this.d3Projection.invert([point.x, point.y]);\r\n if (p) {\r\n return { longitude: p[0], latitude: p[1] };\r\n }\r\n };\r\n /**\r\n * Returns X/Y coordinates.\r\n * Individual projections will override this method to apply their own\r\n * projection logic.\r\n * @deprecated\r\n * @param lambda [description]\r\n * @param phi [description]\r\n * @return X/Y coordinates\r\n * @todo Needs description\r\n */\r\n Projection.prototype.project = function (lambda, phi) {\r\n return this.convert({ longitude: lambda * $math.DEGREES, latitude: phi * $math.DEGREES });\r\n };\r\n /**\r\n * Returns geographical coordinates (lat/long).\r\n * Individual projections will override this method to apply their own\r\n * projection logic.\r\n * @deprecated\r\n * @param x X coordinate\r\n * @param y Y coordinate\r\n * @return Geographical point\r\n * @todo Needs description\r\n */\r\n Projection.prototype.unproject = function (x, y) {\r\n return this.invert({ x: x, y: y });\r\n };\r\n /**\r\n * @ignore\r\n * @deprecated\r\n */\r\n Projection.prototype.rotate = function (geoPoint, deltaLongitude, deltaLatitude, deltaGamma) {\r\n var deltaLambda = deltaLongitude * $math.RADIANS;\r\n var deltaPhi = deltaLatitude * $math.RADIANS;\r\n deltaGamma = deltaGamma * $math.RADIANS;\r\n var lambda = geoPoint.longitude * $math.RADIANS + deltaLambda;\r\n var phi = geoPoint.latitude * $math.RADIANS;\r\n var cosDeltaPhi = Math.cos(deltaPhi);\r\n var sinDeltaPhi = Math.sin(deltaPhi);\r\n var cosDeltaGamma = Math.cos(deltaGamma);\r\n var sinDeltaGamma = Math.sin(deltaGamma);\r\n var cosPhi = Math.cos(phi);\r\n var x = Math.cos(lambda) * cosPhi;\r\n var y = Math.sin(lambda) * cosPhi;\r\n var z = Math.sin(phi);\r\n var k = z * cosDeltaPhi + x * sinDeltaPhi;\r\n return { longitude: $math.DEGREES * Math.atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), latitude: $math.DEGREES * Math.asin(k * cosDeltaGamma + y * sinDeltaGamma) };\r\n };\r\n /**\r\n * @ignore\r\n * @deprecated\r\n */\r\n Projection.prototype.unrotate = function (geoPoint, deltaLongitude, deltaLatitude, deltaGamma) {\r\n var deltaLambda = deltaLongitude * $math.RADIANS;\r\n var deltaPhi = deltaLatitude * $math.RADIANS;\r\n deltaGamma = deltaGamma * $math.RADIANS;\r\n var lambda = geoPoint.longitude * $math.RADIANS - deltaLambda;\r\n var phi = geoPoint.latitude * $math.RADIANS;\r\n var cosDeltaPhi = Math.cos(deltaPhi);\r\n var sinDeltaPhi = Math.sin(deltaPhi);\r\n var cosDeltaGamma = Math.cos(deltaGamma);\r\n var sinDeltaGamma = Math.sin(deltaGamma);\r\n var cosPhi = Math.cos(phi);\r\n var x = Math.cos(lambda) * cosPhi;\r\n var y = Math.sin(lambda) * cosPhi;\r\n var z = Math.sin(phi);\r\n var k = z * cosDeltaGamma - y * sinDeltaGamma;\r\n return { longitude: $math.DEGREES * Math.atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), latitude: $math.DEGREES * Math.asin(k * cosDeltaPhi - x * sinDeltaPhi) };\r\n };\r\n //@todo: move to some utils?\r\n //@todo: add credits to: https://www.movable-type.co.uk/scripts/latlong.html\r\n Projection.prototype.intermediatePoint = function (pointA, pointB, position) {\r\n var p = d3geo.geoInterpolate([pointA.longitude, pointA.latitude], [pointB.longitude, pointB.latitude])(position);\r\n return { longitude: p[0], latitude: p[1] };\r\n };\r\n ;\r\n // returns radians\r\n Projection.prototype.multiDistance = function (multiGeoLine) {\r\n var distance = 0;\r\n for (var s = 0; s < multiGeoLine.length; s++) {\r\n var points = multiGeoLine[s];\r\n if (points.length > 1) {\r\n for (var p = 1; p < points.length; p++) {\r\n var pointA = points[p - 1];\r\n var pointB = points[p];\r\n distance += this.distance(pointA, pointB);\r\n }\r\n }\r\n }\r\n return distance;\r\n };\r\n // returns radians\r\n Projection.prototype.distance = function (pointA, pointB) {\r\n return d3geo.geoDistance([pointA.longitude, pointA.latitude], [pointB.longitude, pointB.latitude]);\r\n };\r\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n Projection.prototype.positionToPoint = function (multiGeoLine, position) {\r\n if (multiGeoLine) {\r\n var intermediatePoint = this.positionToGeoPoint(multiGeoLine, position);\r\n var intermediatePointA = this.positionToGeoPoint(multiGeoLine, position - 0.01);\r\n var intermediatePointB = this.positionToGeoPoint(multiGeoLine, position + 0.01);\r\n if (intermediatePointA && intermediatePointB) {\r\n var point = this.convert(intermediatePoint);\r\n var pa = this.convert(intermediatePointA);\r\n var pb = this.convert(intermediatePointB);\r\n return { x: point.x, y: point.y, angle: $math.getAngle(pa, pb) };\r\n }\r\n }\r\n return { x: 0, y: 0, angle: 0 };\r\n };\r\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\r\n Projection.prototype.positionToGeoPoint = function (multiGeoLine, position) {\r\n if (multiGeoLine) {\r\n var totalDistance = this.multiDistance(multiGeoLine);\r\n var currentDistance = 0;\r\n var distanceAB = void 0;\r\n var positionA = 0;\r\n var positionB = 0;\r\n var pointA = void 0;\r\n var pointB = void 0;\r\n for (var s = 0; s < multiGeoLine.length; s++) {\r\n var points = multiGeoLine[s];\r\n if (points.length > 1) {\r\n for (var p = 1; p < points.length; p++) {\r\n pointA = points[p - 1];\r\n pointB = points[p];\r\n positionA = currentDistance / totalDistance;\r\n distanceAB = this.distance(pointA, pointB);\r\n currentDistance += distanceAB;\r\n positionB = currentDistance / totalDistance;\r\n if (positionA <= position && positionB > position) {\r\n s = multiGeoLine.length;\r\n break;\r\n }\r\n }\r\n }\r\n else if (points.length == 1) {\r\n pointA = points[0];\r\n pointB = points[0];\r\n positionA = 0;\r\n positionB = 1;\r\n }\r\n }\r\n if (pointA && pointB) {\r\n var positionAB = (position - positionA) / (positionB - positionA);\r\n return this.intermediatePoint(pointA, pointB, positionAB);\r\n }\r\n }\r\n return { longitude: 0, latitude: 0 };\r\n };\r\n return Projection;\r\n}());\r\nexport { Projection };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Projection\"] = Projection;\r\n//# sourceMappingURL=Projection.js.map"],"names":["normalizePoint","geoPoint","longitude","wrapAngleTo180","latitude","Math","asin","sin","latitude180","abs","normalizeMultiline","multiline","segment","point","angle","Graticule","_super","_this","call","this","className","applyTheme","shortestDistance","GraticuleSeriesDataItem","GraticuleSeries","longitudeStep","latitudeStep","north","south","east","west","fitExtent","singleSprite","events","disableType","mapLines","template","line","strokeOpacity","ignoreBounds","hiddenInLegend","prototype","createDataItem","validateData","clear","graticule","stepMinor","stepMajor","chart","extent","mapLine","create","multiLine","coordinates","lineStrings","lines","lineString","createLine","Object","defineProperty","get","getPropertyValue","set","value","setPropertyValue","invalidateData","enumerable","configurable","MapArc","MapArcSeriesDataItem","MapArcSeries","MapImage","dataItem","updateExtremes","validatePosition","p","series","projection","d3Projection","visible","d3Path","type","__disabled","moveTo","x","y","getFeature","geometry","MapImageSeriesDataItem","_mapImage","mapImage_1","component","mapImages","addSprite","_disposers","push","removeValue","mapObject","_point","_geoPoint","multiPoint","MapImageSeries","dataFields","multiGeoPoint","data","length","_parseDataFrom","useGeodata","geodata","geoJSON","features","indexOf","console","log","_loop_1","i","len","feature","id_1","id","this_1","checkInclude","include","exclude","dataObject","madeFromGeoData","properties","dataItems","iterator","mapImage","isDisposed","moveValue","_mapImages","focusable","on","handleObjectAdded","_mapObjects","validateDataElement","invalidate","validate","copyFrom","source","getFeatures","each","_dataItem","getImageById","dataContext","MapLine","_imageListeners","stroke","parent","interfaceColors","getFor","positionToPoint","position","multiGeoLine","images","handleImagesToConnect","isReady","e_1","_a","imagesToConnect","image","img","uid","disposer","event","property","_b","_c","next","done","e_1_1","error","return","precision","path","convertedPoints","convertedSegmentPoints","s","slen","convert","segments","_arrow","lineObjects","handleGlobalScale","measureElement","_lineObjects","handleLineObjectAdded","mapLineObject","newValue","shouldClone","arrow","createChild","width","height","triangle","fillOpacity","rotation","horizontalCenter","verticalCenter","clone","getTooltipX","getTooltipY","MapLineObject","adjustRotation","isMeasured","layout","scale","positionToGeoPoint","MapLineSeriesDataItem","_mapLine","mapLine_1","_line","_multiLine","_multiGeoLine","_geoLine","geoLine","MapLineSeries","_mapLines","lineTemplate","getLineById","MapObject","clickable","itemReaderText","readerTitle","bounds","changed","_north","_south","_east","_west","dispatch","invalidateDataItems","showTooltip","res","showTooltipOn","has","handleTooltipMove","addDisposer","ev","tooltip","isHidden","setDataItem","applyAccessibility","MapPolygon","polygon","applyOnClones","fill","tooltipPosition","nonScalingStroke","multiPolygon","multiGeoPolygon","pathGenerator","calculateVisualCenter","biggestArea","biggestPolygon","area","center","_visualLongitude","_visualLatitude","_adapterO","apply","pixelWidth","pixelHeight","visualLongitude","visualLatitude","MapPolygonSeriesDataItem","_mapPolygon","mapPolygon_1","mapPolygons","_polygon","_multiPolygon","_geoPolygon","geoPolygon","_multiGeoPolygon","MapPolygonSeries","processIncExc","_dataSources","undefined","geodataNames","name","mapPolygon","sortPolygonsBy","sortBy_1","reversed_1","sortPolygonsReversed","sort","a","b","valA","valB","dirA","dirB","boxArea","index","zIndex","propertyFields","_mapPolygons","polygonTemplate","getPolygonById","MapSeriesDataItem","values","setValue","setProperty","MapSeries","showInViewport","includes","excludes","strokeWidth","_geodata","reverseGeodata","processReverseGeodata","splice","disposeData","getDataSource","removeDispose","loadData","setDataSourceEvents","validateDataItems","_northDefined","_southDefined","_westDefined","_eastDefined","processConfig","config","name_1","window","JSON","parse","e","Error","asIs","field","updateTooltipBounds","topParent","setBounds","maxWidth","maxHeight","MapSpline","tensionX","tensionY","MapSplineSeriesDataItem","MapSplineSeries","multiLineToGeo","multiPointToGeo","points","pointToGeo","multiGeoToPoint","geoPoints","geoToPoint","multiGeoLineToMultiLine","multiGeoPolygonToMultipolygon","surface","hole","getBackground","stepLong","min","ceil","stepLat","ln","ll","lt","SmallMap","_chart","align","valign","percentHeight","percentWidth","margin","background","moveToPosition","updateMapSize","seriesContainer","rectangle","_series","handleSeriesAdded","handleSeriesRemoved","contains","newSeries","dataUsers","interactionsEnabled","hidden","rectPoint","spritePoint","seriesPointToGeo","zoomToGeoPoint","zoomLevel","updateRectangle","pixelX","pixelY","scaleRatio","bbox","group","node","getBBox","err","afterDraw","maskRectangle","map","hasKey","getKey","ZoomControl","padding","plusButton","label","text","slider","handleBackgroundClick","updateThumbSize","thumb","draggable","handleThumbDrag","minusButton","role","readerLive","language","translate","fixLayout","marginTop","marginBottom","toFront","toBack","minX","maxX","minY","maxY","sprite","target","maxPower","maxZoomLevel","LN2","minPower","minZoomLevel","power","pow","zoomGeoPoint","updateThumb","zoomOut","body","hasFocused","zoomIn","minHeight","stepCount","minWidth","isDown","step","minStep","createBackground","Mercator","Projection","Miller","Eckert6","Orthographic","Stereographic","Albers","AlbersUsa","NaturalEarth1","AzimuthalEqualArea","EqualEarth","_d3Projection","_d3Path","invalidateProjection","invert","project","lambda","phi","unproject","rotate","deltaLongitude","deltaLatitude","deltaGamma","deltaLambda","deltaPhi","cosDeltaPhi","cos","sinDeltaPhi","cosDeltaGamma","sinDeltaGamma","cosPhi","z","k","atan2","unrotate","intermediatePoint","pointA","pointB","multiDistance","distance","intermediatePointA","intermediatePointB","pa","pb","totalDistance","currentDistance","distanceAB","positionA","positionB","positionAB"],"sourceRoot":""}