From 1e80845aa68f265375d90ad4a8fd614fd8cc8308 Mon Sep 17 00:00:00 2001
From: Severin Opel
Date: Wed, 11 Dec 2019 16:45:26 +0100
Subject: [PATCH] Fixed cover bug. Renamed mapdata to mapprojection.
---
dist/iwmlib.pixi.js | 945 +++++++++++++-----
doc/conf.json | 2 +-
doc/out/AbstractPopup.html | 142 +--
doc/out/Badge.html | 142 +--
doc/out/BlurFilter.html | 142 +--
doc/out/Button.html | 142 +--
doc/out/ButtonGroup.html | 142 +--
doc/out/DeepZoomImage.html | 142 +--
doc/out/DeepZoomInfo.html | 142 +--
doc/out/Flippable.html | 142 +--
doc/out/FontInfo.html | 142 +--
doc/out/Hypenate.html | 142 +--
doc/out/InteractivePopup.html | 142 +--
...beledGraphics.exports.LabeledGraphics.html | 142 +--
doc/out/LabeledGraphics.html | 142 +--
doc/out/List.html | 142 +--
doc/out/Message.html | 142 +--
doc/out/MessageInteractivePopup.html | 142 +--
doc/out/MessageMessageInteractivePopup.html | 142 +--
doc/out/Modal.html | 142 +--
doc/out/ModalInteractivePopup.html | 142 +--
doc/out/ModalModalInteractivePopup.html | 142 +--
doc/out/PIXIApp.html | 142 +--
doc/out/Popup.html | 142 +--
doc/out/PopupInteractivePopup.html | 142 +--
doc/out/PopupMenu.html | 142 +--
doc/out/PopupMenuPopupInteractivePopup.html | 142 +--
...pupMenuPopupMenuPopupInteractivePopup.html | 142 +--
...nuPopupMenuPopupPopupInteractivePopup.html | 142 +--
.../PopupMenuPopupPopupInteractivePopup.html | 142 +--
doc/out/PopupPopupInteractivePopup.html | 142 +--
doc/out/Progress.html | 142 +--
doc/out/Scrollview.html | 142 +--
doc/out/Slider.html | 142 +--
doc/out/Switch.html | 142 +--
doc/out/TextLabel.TextLabel.html | 142 +--
doc/out/Theme.html | 142 +--
doc/out/ThemeDark.html | 142 +--
doc/out/ThemeLight.html | 142 +--
doc/out/ThemeRed.html | 142 +--
doc/out/TileQuadNode.html | 142 +--
doc/out/Tooltip.html | 142 +--
doc/out/UITest.html | 142 +--
doc/out/Volatile.html | 142 +--
doc/out/global.html | 142 +--
doc/out/index.html | 142 +--
doc/out/pixi_abstractpopup.js.html | 142 +--
doc/out/pixi_app.js.html | 142 +--
doc/out/pixi_badge.js.html | 142 +--
doc/out/pixi_blurfilter.js.html | 142 +--
doc/out/pixi_button.js.html | 142 +--
doc/out/pixi_buttongroup.js.html | 142 +--
doc/out/pixi_deepzoom_image.js.html | 142 +--
doc/out/pixi_flippable.js.html | 142 +--
doc/out/pixi_labeledgraphics.js.html | 142 +--
doc/out/pixi_list.js.html | 142 +--
doc/out/pixi_message.js.html | 142 +--
doc/out/pixi_modal.js.html | 142 +--
doc/out/pixi_popup.js.html | 142 +--
doc/out/pixi_popupmenu.js.html | 142 +--
doc/out/pixi_progress.js.html | 142 +--
doc/out/pixi_scrollview.js.html | 142 +--
doc/out/pixi_slider.js.html | 142 +--
doc/out/pixi_switch.js.html | 142 +--
doc/out/pixi_theme.js.html | 142 +--
doc/out/pixi_tooltip.js.html | 142 +--
doc/out/pixi_volatile.js.html | 142 +--
doc/out/uitest.js.html | 142 +--
lib/pixi/bundle.js | 6 +-
lib/pixi/maps/geographics.html | 8 +-
lib/pixi/maps/geojson.html | 4 +-
lib/pixi/maps/index.html | 2 +-
lib/pixi/maps/map.html | 8 +-
lib/pixi/maps/map.js | 85 +-
lib/pixi/maps/mapapp.html | 10 +-
.../maps/{mapdata.html => mapprojection.html} | 24 +-
.../maps/{mapdata.js => mapprojection.js} | 30 +-
lib/pixi/maps/maps.html | 18 +-
lib/pixi/maps/mapviewport.html | 12 +-
lib/pixi/maps/mapviewport.js | 2 +-
lib/pixi/maps/overlay.html | 2 +-
lib/pixi/maps/projections/projections.html | 2 +-
82 files changed, 5473 insertions(+), 5059 deletions(-)
rename lib/pixi/maps/{mapdata.html => mapprojection.html} (88%)
rename lib/pixi/maps/{mapdata.js => mapprojection.js} (89%)
diff --git a/dist/iwmlib.pixi.js b/dist/iwmlib.pixi.js
index 1b81d9b..6c868f1 100644
--- a/dist/iwmlib.pixi.js
+++ b/dist/iwmlib.pixi.js
@@ -17429,17 +17429,17 @@
}
/**
- * MapData contains the informations about how
+ * MapProjection contains the informations about how
* a Map has to be interpreted. What are the bounds of the
* map and how to translate coordinates into
* image positions.
*
* @class
- * @see {@link mapdata.html}
+ * @see {@link mapprojection.html}
*/
- class MapData {
+ class MapProjection {
/**
- * Creates instance of MapData
+ * Creates instance of MapProjection
*
* @constructor
* @param {Projection}[projection] - Specifies the projection of the map (e.g. Mercator Projection).
@@ -17455,7 +17455,7 @@
opts
);
- this.projection = projection;
+ this._projection = projection;
if (this.opts.clip) {
let _cmin = this.projection.forward(this.opts.clip.min);
@@ -17479,13 +17479,24 @@
}
}
+ /**
+ * The projection used by the map projection.
+ *
+ * @member {Projection}
+ * @readonly
+ * @memberof MapProjection
+ */
+ get projection() {
+ return this._projection
+ }
+
/**
* Transforms a pixel point on the map to a geographical coordinate.
*
* @public
- * @param {{x,y} | PIXI.Point} point - A pixel position on the map.
- * @returns {{x,y} | PIXI.Point} - A geographical coordinate.
- * @memberof MapData
+ * @param {Point} point - A pixel position on the map.
+ * @returns {CoordinatePoint} A geographical coordinate.
+ * @memberof MapProjection
*/
toCoordinates(point) {
if (this.opts.clip) {
@@ -17516,9 +17527,9 @@
* Transform a geographical coordinate to a pixel point on the map.
*
* @public
- * @param {{x,y} | PIXI.Point} coordinates - A point in the form of {x:lat,y:lng}.
- * @returns {{x,y} | PIXI.Point} point - A pixel position on the map.
- * @memberof MapData
+ * @param {CoordinatePoint} coordinates - A point in the form of {x:lat,y:lng}.
+ * @returns {Point} A pixel position on the map.
+ * @memberof MapProjection
*/
toPixel(coordinates) {
let coords = { x: coordinates.x, y: coordinates.y };
@@ -17548,17 +17559,18 @@
return point
}
-
/**
- * Get's the clipping of the map data. Clipping describes the
- * piece of the map that is shown. E.g. if we just show a map of
+ * Clipping describes the
+ * piece of the map that is shown. The returned object contains a min and max value of the clipping in form of: {min: {x,y}, max:{x,y}}. Where x and y are in between 0 and 1.
+ *
+ * E.g. if we just show a map of
* europe, then we have to set the clipping properly, otherwise
* the preojection would produce the wrong results when transforming
* from a point to coordinates or the other way around.
*
* @readonly
- * @memberof MapData
- * @returns {object} - Object that contains a min and max value of the clipping in form of: {min: {x,y}, max:{x,y}}. Where x and y are in between 0 and 1.
+ * @member {object}
+ * @memberof MapProjection
*/
get clip() {
let unclipped = {
@@ -17569,31 +17581,29 @@
return this.opts.clip ? this.opts.clip : unclipped
}
-
/**
- * Returns the biggest viewport the mapdata allows.
+ * Returns the biggest viewport the map projection allows.
* This is determined by the projecton or the clipping on the mapapp.
*
* @readonly
- * @memberof MapData
+ * @memberof MapProjection
*/
get maxViewport() {
return this.opts.clip ? this.opts.clip : this.projection.maxViewport
}
}
-
/**
- * Special mapdata for DeepZoomMap objects.
- *
+ * Special map projection for DeepZoomMap objects.
+ *
* Note: It just transform the clipping parameter of the tiles config
* to the clipping of the mapapp.
*
* @export
- * @class DeepZoomMapData
- * @extends {MapData}
+ * @class DeepZoomMapProjection
+ * @extends {MapProjection}
*/
- class DeepZoomMapData extends MapData {
+ class DeepZoomMapProjection extends MapProjection {
constructor(projection, tilesConfig, opts = {}) {
if (tilesConfig.clip) {
opts.clip = {
@@ -17700,7 +17710,7 @@
}
/**
- * The GeoMap class displays a map, that it gets from MapData object.
+ * The GeoMap class displays a map, that it gets from MapProjection object.
* It handles the current location on the map, the zoom factor, interactions and
* the viewport, the area of the map, the user can see and navigate to.
*
@@ -17715,17 +17725,17 @@
* @see {@link maps.html}
*/
- class GeoMap {
+ class GeoMap$1 {
/**
* Creates instance of GeoMap
*
* @constructor
- * @param {MapData}[mapdata={}] - The mapdata describes how the map has to be interpreted by the Map class. E.g. what are the boundaries of the map?
+ * @param {MapProjection}[mapProjection={}] - The map projection describes how the map has to be interpreted by the Map class. E.g. what are the boundaries of the map?
* @param {object}[opts={}] - With the opts, the created MapObjectScatter can be adjusted.
* @param {boolean}[opts.cover=false] - Enables covering behaviour of a map object. Normally maps should cover the whole app.
*/
constructor(
- mapdata = {},
+ mapProjection = {},
{
debug = true,
cover = true,
@@ -17737,18 +17747,18 @@
translatable = true,
scalable = true,
rotatable = false, // Many functionalities are not supported when rotating the map. Mainly the cover mechanism.
- viewport = mapdata.maxViewport,
+ viewport = mapProjection.maxViewport,
// Events
onLoad = null,
onTransform = null
} = {}
) {
- this._id = GeoMap.counter++;
+ this._id = GeoMap$1.counter++;
this.onLoad = new EventHandler('loaded', { listeners: onLoad });
this.onTransform = new EventHandler('transform', { listeners: onTransform });
this._alpha = alpha;
- this.cover = cover;
+ this._cover = cover;
this.debug = debug;
//TODO discuss if this is required here.
@@ -17762,15 +17772,15 @@
this.scalable = scalable;
this.viewport = viewport;
- this.mapdata = mapdata;
+ this._mapProjection = mapProjection;
this.overlays = {};
/**
- * Adjust the viewport depending on the mapdata clipping.
+ * Adjust the viewport depending on the mapProjection clipping.
*/
- if (this.mapdata.clip) {
+ if (this.mapProjection.clip) {
const vp = this.viewport;
- const cp = this.mapdata.clip;
+ const cp = this.mapProjection.clip;
let bounds = {
min: {
x: vp.min.x > cp.min.x ? vp.min.x : cp.min.x,
@@ -17786,6 +17796,44 @@
}
}
+
+
+ /**
+ * Determines if the scatter covers the container.
+ * @member {boolean}
+ * @readonly
+ * @memberof GeoMap
+ */
+ get cover() {
+ return this._cover
+ }
+
+ /**
+ * Returns the image object used by the GeoMap.
+ *
+ * @readonly
+ * @memberof GeoMap
+ */
+ get image() {
+ return this._image
+ }
+
+ /**
+ * The mapProjection of the map.
+ *
+ * @member {MapProjection}
+ * @readonly
+ * @memberof GeoMap
+ */
+ get mapProjection() {
+ return this._mapProjection
+ }
+
+ /**
+ * Clears all EventHandlers.
+ *
+ * @memberof GeoMap
+ */
flushHandlers() {
this.onLoad.empty();
this.onTransform.empty();
@@ -17868,6 +17916,7 @@
/**
* Wrapps the display object around a scatter object.
+ * creates the image.
*
* @private
* @param {DisplayObject} displayObject - Defines the display object that will be wrapped inside the scatter object.
@@ -17876,7 +17925,7 @@
load(image, renderer, frame = null, scatter = null) {
if (this.debug) console.log('Load image: ', image, frame);
- this.image = image;
+ this._image = image;
if (frame) this.setFrame(frame);
let scatterOpts = Object.assign({
@@ -17947,7 +17996,7 @@
* @returns {object} - Coordinates on the map in form of {x: latitude, y: longitude}.
*/
coordinatesFromPoint(point) {
- let coords = this.mapdata.toCoordinates(this.toRelativePosition(point));
+ let coords = this.mapProjection.toCoordinates(this.toRelativePosition(point));
return coords
}
@@ -17958,7 +18007,7 @@
* @return {Point} - Returns a image position in form of {x: x, y: y}.
*/
coordinatesToPoint(coordinates) {
- return this.toAbsolutePixelCoordinates(this.mapdata.toPixel(coordinates))
+ return this.toAbsolutePixelCoordinates(this.mapProjection.toPixel(coordinates))
}
toRelativePosition(point) {
@@ -18025,15 +18074,41 @@
this.frame = null;
}
+ /**
+ * The complete Triforce, or one or more components of the Triforce.
+ * @typedef {Object} Frame
+ * @property {number} x - X position of the frame.
+ * @property {number} y - Y position of the frame.
+ * @property {number} width - Width of the frame.
+ * @property {number} height - Height od the frame.
+ * @property {Point} localCenter - Local center of the map.
+ * @property {Point} center - Global center of the map.
+
+ */
+
+ /**
+ * Sets the frame if the map.
+ *
+ * Frame is the display in which the map is shown.
+ * Normally it's the app, but it can be another element,
+ * for example when in a submap.
+ *
+ * @param {Frame} frame
+ * @memberof GeoMap
+ */
setFrame(frame) {
- if (this.debug) console.log('Set Frame: ', frame);
this.frame = frame;
}
/**
+ * Gets the frame if the map.
+ *
* Frame is the display in which the map is shown.
* Normally it's the app, but it can be another element,
* for example when in a submap.
+ *
+ * @returns {Frame} - Returns the frame of the map.
+ * @memberof GeoMap
*/
getFrame() {
let frame = {
@@ -18084,10 +18159,10 @@
static allFromJson(json, root = './') {
let error = { message: '' };
let maps = {};
- if (GeoMap._validateJson(json, error)) {
+ if (GeoMap$1._validateJson(json, error)) {
for (let [mapname, data] of Object.entries(json)) {
data.tiles.path = root + data.tiles.path;
- maps[mapname] = GeoMap._createMap(data);
+ maps[mapname] = GeoMap$1._createMap(data);
maps[mapname].name = mapname;
}
} else console.error('Could not validate JSON: ' + error.message);
@@ -18107,7 +18182,7 @@
static mapFromJson(map, json) {
if (json[map]) {
const data = json[map];
- if (this._validJsonMap(data)) return GeoMap._createMap(data)
+ if (this._validJsonMap(data)) return GeoMap$1._createMap(data)
else console.error('Map was not in a valid format.');
} else console.error('Map was not in data.');
@@ -18119,6 +18194,7 @@
* for creating the maps.
*
* @static
+ * @private
* @param {object} json - The object containing multiple map data sets.
* @param {error-object} error - An object that contains an parameter message: {message = ""}. This is faking a call by reference.
* @returns {boolean} - True if all sets were valid. False otherwise.
@@ -18132,7 +18208,7 @@
error.message += 'The provided JSON object did not contain any items.';
}
for (let [name, data] of Object.entries(json)) {
- if (!GeoMap._validJsonMap(data)) {
+ if (!GeoMap$1._validJsonMap(data)) {
error.message += `${name} was not valid. `;
isValid = false;
}
@@ -18154,6 +18230,7 @@
*Validates of a single data set contains the valid data for creating a map.
*
* @static
+ * @private
* @param {object} json - The object containing a single set of map data.
* @returns {boolean} - True if valid, otherwise false.
* @memberof GeoMap
@@ -18178,19 +18255,19 @@
static _createMap(data) {
switch (data.type.toLowerCase()) {
case 'deepzoom':
- return GeoMap._createDeepZoomMap(data)
+ return GeoMap$1._createDeepZoomMap(data)
default:
console.error(`Datatype is invalid or not implemented yet: ${data.type}`);
}
}
static _createDeepZoomMap(data) {
- const projection = GeoMap._getProjectionByName(data.projection);
+ const projection = GeoMap$1._getProjectionByName(data.projection);
const tilesConfig = data.tiles;
const options = data.options;
- const mapdata = new DeepZoomMapData(projection, tilesConfig);
- return new DeepZoomMap(mapdata, tilesConfig, options)
+ const mapProjection = new DeepZoomMapProjection(projection, tilesConfig);
+ return new DeepZoomMap(mapProjection, tilesConfig, options)
}
static _getProjectionByName(projection) {
@@ -18204,46 +18281,45 @@
}
}
- GeoMap.counter = 0;
+ GeoMap$1.counter = 0;
/**
- * The DeepZoomMap class extends the GeoMap to create
+ * The DeepZoomMap class extends the GeoMap to create
* maps as deepzoom images from maptiles.
*
- * @extends GeoMap
- * @class
- * @see {@link maps.html}
+ * @export
+ * @class DeepZoomMap
+ * @extends {GeoMap}
*/
-
- class DeepZoomMap extends GeoMap {
+ class DeepZoomMap extends GeoMap$1 {
/**
* @constructor
* @param {object} tilesConfig - The tiles config object, that defines at what path and in which format the tiles are.
- * @param {MapData} mapdata - A MapData object, that contains informations of how the given map has to be interpreted.
+ * @param {MapProjection} mapProjection - A MapProjection object, that contains informations of how the given map has to be interpreted.
* @param {object} opts - Additional options to specify the behaviour of the deep zoom image.
*/
- constructor(mapdata, tilesConfig, opts = {}) {
+ constructor(mapProjection, tilesConfig, opts = {}) {
opts = Object.assign(
{
maxScale: Math.min(tilesConfig.width, tilesConfig.height) / tilesConfig.tileSize,
- minScale: mapdata.getMinScale,
+ minScale: mapProjection.getMinScale,
highResolution: true,
debug: false
},
opts
);
- super(mapdata, opts);
+ super(mapProjection, opts);
this.tilesConfig = tilesConfig;
- this._verifyMapdata();
+ this._verifyMapProjection();
}
- _verifyMapdata() {
- if (!(this.mapdata instanceof MapData)) {
- console.error('Use the MapData object for creating maps!');
+ _verifyMapProjection() {
+ if (!(this.mapProjection instanceof MapProjection)) {
+ console.error('Use the MapProjection object for creating maps!');
} else {
- if (!(this.mapdata instanceof DeepZoomMapData)) {
- console.error('Use the DeepZoomMapData object.');
+ if (!(this.mapProjection instanceof DeepZoomMapProjection)) {
+ console.error('Use the DeepZoomMapProjection object.');
}
}
}
@@ -18254,10 +18330,10 @@
* @private
*/
load(container = null, scatter = null) {
- if (!this.mapdata.app) console.error('App was not set in the mapdata.');
+ if (!this.mapProjection.app) console.error('App was not set in the mapProjection.');
this.info = new DeepZoomInfo(this.tilesConfig);
let image = new DeepZoomImage(this.info, {
- app: this.mapdata.app,
+ app: this.mapProjection.app,
alpha: this.alpha,
debug: this.debug,
world: scatter == null ? scatter : scatter.getWorldScatter()
@@ -18375,9 +18451,9 @@
}
clone(container, scatter = null) {
- const map = new DeepZoomMap(this.mapdata, this.tilesConfig, {
+ const map = new DeepZoomMap(this.mapProjection, this.tilesConfig, {
alpha: this.alpha,
- cover: this.cover,
+ cover: this.image.scatter.cover,
debug: this.debug,
startScale: this.startScale,
minScale: this.minScale,
@@ -18435,15 +18511,17 @@
DeepZoomMap.tintcolor = 0;
/**
- *
* ImageMap extends GeoMap to display simple images
* as maps.
+ *
+ * @export
+ * @class ImageMap
+ * @extends {GeoMap}
*/
-
- class ImageMap extends GeoMap {
- constructor(sprite, mapdata, opts = {}) {
- super(mapdata, opts);
- if (this.debug) console.log('Construct Image Map', sprite, mapdata, opts);
+ class ImageMap extends GeoMap$1 {
+ constructor(sprite, mapProjection, opts = {}) {
+ super(mapProjection, opts);
+ if (this.debug) console.log('Construct Image Map', sprite, mapProjection, opts);
this.sprite = sprite;
@@ -18457,9 +18535,9 @@
}
clone(container = null, scatter = null) {
- const map = new ImageMap(new PIXI.Sprite(this.sprite.texture), this.mapdata, {
+ const map = new ImageMap(new PIXI.Sprite(this.sprite.texture), this.mapProjection, {
alpha: this.alpha,
- cover: this.cover,
+ cover: this.image.cover,
debug: this.debug,
startScale: this.startScale,
minScale: this.minScale,
@@ -18555,123 +18633,6 @@
}
}
- /**
- * The MapView class is responsible for a consistent map view.
- * It is aware of the current viewposition, the scale and viewport.
- * It ensures, that maps can be changed, without the user noticing it.
- *
- */
- class MapView {
- /**
- *
- * @param {object} [focus = {x:0, y:0}] - Defines the startup focuspoint of the app.
- * @param {number} [zoom = 0] - Defines the startup zoom of the app. Note that this is just a request.
- * The MapView will prioritize a full scale app, than displaying the demanded zoom factor
- */
- constructor({ focus = null, zoom = null, viewport = { min: { x: -85, y: -180 }, max: { x: 85, y: 180 } } } = {}) {
- this.viewport = viewport;
- this._focus = focus;
- this._zoom = zoom;
- this.referenceHeight = 256;
- }
-
- get focus() {
- return this._focus
- }
- get zoom() {
- return this._zoom
- }
-
- apply(map) {
- map.moveTo(this._focus, this._zoom);
- }
-
- transformed(map) {
- this.updateZoom(map);
- this.updateFocusPoint(map);
- }
-
- updatePosition(map) {
- this.updateFocusPoint(map);
- this.updateZoom(map);
- }
-
- updateFocusPoint(map) {
- const frame = map.getFrame();
- this._focus = this.coordinatesFromWindowPoint(map, frame.localCenter);
- }
-
- updateZoom(map) {
- /**
- * TODO: This relies on the fact, that all maps have the same tileSize,
- * if a set would have a smaller tileSize. Improve that.
- */
- if (map instanceof DeepZoomMap) this._zoom = map.floatingLevelForScale(map.image.scatter.scale);
- else {
- this._zoom = map.zoom;
- }
- }
-
- mapPointToWindowPoint(map, point) {
- let windowPoint = { x: 0, y: 0 };
-
- if (map['image'] && map.image['parent']) {
- let container = map.image.parent;
-
- windowPoint = new PIXI.Point(
- map.scatter.position.x + map.scatter.scale * point.x,
- map.scatter.position.y + map.scatter.scale * point.y
- );
-
- windowPoint = container.toGlobal(windowPoint);
- } else {
- console.error(this._noParentError);
- }
-
- return windowPoint
- }
-
- windowPointToMapPoint(map, point) {
- let pointOnMap = { x: 0, y: 0 };
- if (map['image'] && map.image['parent']) {
- let offset = map.image.parent.toGlobal({ x: 0, y: 0 });
- pointOnMap = new PIXI.Point(
- (point.x - map.scatter.position.x - offset.x) / map.scatter.scale,
- (point.y - map.scatter.position.y - offset.y) / map.scatter.scale
- );
- } else console.error(this._noParentError);
-
- return pointOnMap
- }
-
- get _noParentError() {
- return 'Cannot compute map point when map has no parent.'
- }
-
- /**
- * Gets the coordinates of a specific point in the viewport.
- *
- * @param {PIXI.Point | {x,y}} point - Pixel position in the viewport.
- * @returns {{x,y}} Coordinates on the map of the provided position.
- * @memberof MapView
- */
- coordinatesFromWindowPoint(map, point) {
- let position = {
- x: point.x - map.scatter.position.x,
- y: point.y - map.scatter.position.y
- };
-
- let normalized = {
- x: position.x / (map.width * map.scatter.scale),
- y: position.y / (map.height * map.scatter.scale)
- };
-
- let coordinates = map.mapdata.toCoordinates(normalized);
-
- return coordinates
- }
- }
-
/* */
class Robinson extends Projection {
@@ -18827,6 +18788,182 @@
}
}
+ /**
+ * The MapViewport class is responsible for a consistent map view.
+ * It is aware of the current viewposition, the scale and viewport.
+ * It ensures, that maps can be changed, without the user noticing it.
+ *
+ */
+ class MapViewport {
+ /**
+ *
+ * @param {object} [focus = {x:0, y:0}] - Defines the startup focuspoint of the app.
+ * @param {number} [zoom = 0] - Defines the startup zoom of the app. Note that this is just a request.
+ * The MapViewport will prioritize a full scale app, than displaying the demanded zoom factor
+ */
+ constructor({ focus = null, zoom = null, viewport = { min: { x: -85, y: -180 }, max: { x: 85, y: 180 } } } = {}) {
+ this.viewport = viewport;
+ this._focus = focus;
+ this._zoom = zoom;
+ this.referenceHeight = 256;
+ }
+
+ /**
+ * The current focus point as map coordinates.
+ *
+ * @member {CoordinatePoint}
+ * @readonly
+ * @memberof MapViewport
+ */
+ get focus() {
+ return this._focus
+ }
+
+ /**
+ * The current zoom distance.
+ * On DeepZoomMaps this is equal to the zoom level.
+ *
+ * @member {number}
+ * @readonly
+ * @memberof MapViewport
+ */
+ get zoom() {
+ return this._zoom
+ }
+
+ /**
+ * Applies the current view to a map.
+ *
+ *
+ * @param {GeoMap} map - Map the viewport should be applied to.
+ * @memberof MapViewport
+ */
+ apply(map) {
+ map.moveTo(this._focus, this._zoom);
+ }
+
+ /**
+ * Update the focus point and zoom according to the map.
+ * This is commonly called when the map is transformed.
+ *
+ * @param {GeoMap} map - Map to update.
+ * @memberof MapViewport
+ */
+ update(map) {
+ this.updateZoom(map);
+ this.updateFocusPoint(map);
+ }
+
+ /**
+ * Updates the focus point.
+ * This is automatically called when calling update.
+ *
+ * @param {GeoMap} map
+ * @memberof MapViewport
+ */
+ updateFocusPoint(map) {
+ const frame = map.getFrame();
+ this._focus = this.coordinatesFromWindowPoint(map, frame.localCenter);
+ }
+
+ /**
+ * Updates the zoom.
+ * This is automatically called when calling update.
+ *
+ * @param {GeoMap} map
+ * @memberof MapViewport
+ */
+ updateZoom(map) {
+ /**
+ * TODO: This relies on the fact, that all maps have the same tileSize,
+ * if a set would have a smaller tileSize. Improve that.
+ */
+ if (map instanceof DeepZoomMap) this._zoom = map.floatingLevelForScale(map.image.scatter.scale);
+ else {
+ this._zoom = map.zoom;
+ }
+ }
+
+ /**
+ * Transforms a position on the map to a position in the window.
+ *
+ * Inverse of windowPointToMapPoint.
+ *
+ * @param {GeoMap} map - Map to calculate the position on.
+ * @param {Point} point - Position on the map in pixels.
+ * @returns {Point} - Pixel position in the window.
+ * @memberof MapViewport
+ */
+ mapPointToWindowPoint(map, point) {
+ let windowPoint = { x: 0, y: 0 };
+
+ if (map['image'] && map.image['parent']) {
+ let container = map.image.parent;
+
+ windowPoint = new PIXI.Point(
+ map.scatter.position.x + map.scatter.scale * point.x,
+ map.scatter.position.y + map.scatter.scale * point.y
+ );
+
+ windowPoint = container.toGlobal(windowPoint);
+ } else {
+ console.error(this._noParentError);
+ }
+
+ return windowPoint
+ }
+
+ /**
+ * Transforms in the window to a position on the map.
+ *
+ * Inverse of mapPointToWindowPoint(map, point) {.
+ *
+ * @param {GeoMap} map - Map to calculate the position on.
+ * @param {Point} point -Pixel position in the window.
+ * @returns {Point} - Position on the map in pixels.
+ * @memberof MapViewport
+ */
+ windowPointToMapPoint(map, point) {
+ let pointOnMap = { x: 0, y: 0 };
+ if (map['image'] && map.image['parent']) {
+ let offset = map.image.parent.toGlobal({ x: 0, y: 0 });
+ pointOnMap = new PIXI.Point(
+ (point.x - map.scatter.position.x - offset.x) / map.scatter.scale,
+ (point.y - map.scatter.position.y - offset.y) / map.scatter.scale
+ );
+ } else console.error(this._noParentError);
+
+ return pointOnMap
+ }
+
+ get _noParentError() {
+ return 'Cannot compute map point when map has no parent.'
+ }
+
+ /**
+ * Gets the coordinates of a specific point in the viewport.
+ *
+ * @param {PIXI.Point | {x,y}} point - Pixel position in the viewport.
+ * @returns {{x,y}} Coordinates on the map of the provided position.
+ * @memberof MapView
+ */
+ coordinatesFromWindowPoint(map, point) {
+ let position = {
+ x: point.x - map.scatter.position.x,
+ y: point.y - map.scatter.position.y
+ };
+
+ let normalized = {
+ x: position.x / (map.width * map.scatter.scale),
+ y: position.y / (map.height * map.scatter.scale)
+ };
+
+ let coordinates = map.mapProjection.toCoordinates(normalized);
+
+ return coordinates
+ }
+ }
+
/**
* The class CoordinateDisplay shows the coordinates of the center of the sceen
* in the top left of the renderer.
@@ -19141,7 +19278,7 @@
}
/**
- * GeoGraphics are graphical objects, that does not store the graphics information
+ * * GeoGraphics are graphical objects, that does not store the graphics information
* in screen space, but in geographical coordinates. Therefore GeoGraphics must be
* placed on GeoLayers to work properly.
*
@@ -19151,11 +19288,12 @@
* The geolayers forward this 'adaptTo' to all children that are GeoGraphics.
* Which adjust their so called 'point' data to the new map.
*
- * @abstract
+ * @export
+ * @class GeoGraphics
*/
class GeoGraphics {
constructor(coordinates, { scale = 1, onDraw = null, onDrawEnd = null, debug = false } = {}) {
- this.coordinates = coordinates;
+ this._coordinates = coordinates;
this.debug = debug;
this.graphics = new PIXI.Graphics();
this.scale = scale;
@@ -19165,6 +19303,17 @@
this._position = null;
}
+ /**
+ * The coordinates of the geographics.
+ *
+ * @member {array}
+ * @readonly
+ * @memberof GeoGraphics
+ */
+ get coordinates() {
+ return this._coordinates
+ }
+
clone() {
console.error(`Call of abstract method clone(). Overwrite in subclass.`, this);
}
@@ -19270,6 +19419,12 @@
this._layer = layer;
}
+ /**
+ * Map of the containing layer. Null if on no layer.
+ *
+ * @readonly
+ * @memberof GeoGraphics
+ */
get map() {
let map = null;
if (this.mapLayer) {
@@ -19278,6 +19433,13 @@
return map
}
+ /**
+ * MapLayer of the containing layer. Null if on no layer.
+ *
+ * @member {MapLayer}
+ * @readonly
+ * @memberof GeoGraphics
+ */
get mapLayer() {
let mapLayer = null;
if (this.layer) {
@@ -19336,6 +19498,10 @@
*
* This GeoGraphics does not provide any visual representation.
* Draw the desired shape in the onDraw callback.
+ *
+ * @export
+ * @class GeoPoint
+ * @extends {GeoGraphics}
*/
class GeoPoint extends GeoGraphics {
clone() {
@@ -19365,6 +19531,13 @@
_draw() {}
}
+ /**
+ * Represensts a line between two locations.
+ *
+ * @export
+ * @class GeoLine
+ * @extends {GeoGraphics}
+ */
class GeoLine extends GeoGraphics {
/**
* @param {object} opts - Optional values
@@ -19467,6 +19640,13 @@
}
}
+ /**
+ * Represents a shape on a map.
+ *
+ * @export
+ * @class GeoShape
+ * @extends {GeoGraphics}
+ */
class GeoShape extends GeoGraphics {
clone() {
return new GeoShape(this.coordinates, this._cloneOptions)
@@ -19582,7 +19762,7 @@
/**
* a) Draw the hole with a polygon.
- *
+ *
* This may seem redundant to (c), but it's required (in this order(!))
* to make the hole clickable.
*
@@ -19611,6 +19791,13 @@
}
}
+ /**
+ * The GeoMultiShape displays multiple forms.
+ *
+ * @export
+ * @class GeoMultiShape
+ * @extends {GeoShape}
+ */
class GeoMultiShape extends GeoShape {
static _manipulatePoints(points, func) {
points.forEach(shape => {
@@ -19660,8 +19847,8 @@
*/
class MapList {
constructor(active = null, maps = {}) {
- this.maps = maps;
- this.active = active;
+ this._maps = maps;
+ this._active = active;
if (Object.keys(maps).length > 0) this.select(active);
}
@@ -19690,7 +19877,7 @@
}
if (this.active !== active) {
- this.active = active;
+ this._active = active;
map = this.maps[active];
}
} else {
@@ -19728,7 +19915,7 @@
*/
add(key, map) {
if (this.maps[key] != null) consol.warn('Key already in mapList. The existing key was overwritten.');
- if (this.active == null) this.active = key;
+ if (this.active == null) this._active = key;
map.name = key;
this.maps[key] = map;
}
@@ -19739,12 +19926,35 @@
*
*@public
* @readonly
+ * @member {GeoMap}
* @memberof MapList
*/
get map() {
return this.maps && this.maps[this.active] ? this.maps[this.active] : null
}
+ /**
+ * Returns the list of addedd cards.
+ *
+ * @member {object}
+ * @readonly
+ * @memberof MapList
+ */
+ get maps() {
+ return this._maps
+ }
+
+ /**
+ * Returns the active key.
+ *
+ * @member {string}
+ * @readonly
+ * @memberof MapList
+ */
+ get active() {
+ return this._active
+ }
+
/**
* Selects the next map in the map array.
*
@@ -19775,12 +19985,13 @@
}
}
- //import { GeoGraphics } from "../pixi/geographics.js"
-
/**
* The GeoLayer is a special PIXILayer, that recognizes other GeoLayers and
* GeoGraphics. The layer can be adapted to a map and notifies all Geo-Children
* of the Adaption.
+ *
+ * @export
+ * @class GeoLayer
*/
class GeoLayer {
constructor(displayObject, opts = {}) {
@@ -19865,6 +20076,13 @@
return this._visibility
}
+ /**
+ * Alias for geoLayer.displayObject.addChild.
+ *
+ * @public
+ * @param {GeoGraphics | PIXI.DisplayObject} element - Element to add to the displayObject.
+ * @memberof GeoLayer
+ */
addChild(element) {
this.displayObject.addChild(element);
}
@@ -19889,15 +20107,6 @@
} else console.error('There was no map specified.', this);
}
- // place(geographic) {
- // if (geographic.constructor.name.startsWith('Geo') && geographic.graphics) {
- // // Fix to remove the rollupjs circular dependency
- // //if (geographic instanceof GeoGraphics) {
- // this.geographics.push(geographic)
- // super.place(geographic.graphics)
- // } else super.place(geographic)
- // }
-
removeFromParent() {
if (this.parent) {
this.parent.removeLayer(this);
@@ -19937,8 +20146,15 @@
return this._parent
}
+ /**
+ * Adds a GeoLayer as child to the GeoLayer.
+ *
+ * @public
+ * @param {GeoLayer} layer - GeoLayer to add.
+ * @memberof GeoLayer
+ */
addLayer(layer) {
- if (layer instanceof GeoLayer || layer instanceof MapLayer) {
+ if (layer instanceof GeoLayer) {
layer.removeFromParent();
this.layers.push(layer);
@@ -19990,6 +20206,18 @@
// }
}
+ /**
+ * The map layer is responsible for showing certain maps, at a specific position It contains
+ * a list of available maps and can switch between them seamlessly. GeoGraphics placed on the MapLayer itself
+ * or child Geolayers will be adapted to maps and adjusted on map change automatically.
+ *
+ * The map layer is the 'king' of the geo layers. Every geolayer
+ * needs a map layer at it's root. Otherwise they won't work-
+ *
+ * @export
+ * @class MapLayer
+ * @extends {GeoLayer}
+ */
class MapLayer extends GeoLayer {
constructor(
mapList,
@@ -20019,7 +20247,7 @@
listeners: onChange
});
- this.mapview = new MapView({
+ this._mapview = new MapViewport({
zoom,
focus,
viewport
@@ -20039,6 +20267,18 @@
this.changeMap(mapList.active);
}
+ //Todo: rename to mapviewport.
+ /**
+ * Returns the MapViewport of this map layer.
+ *
+ * @readonly
+ * @member {MapViewport}
+ * @memberof MapLayer
+ */
+ get mapview() {
+ return this._mapview
+ }
+
get mapChangeLocked() {
return this._mapChangeLocked
}
@@ -20051,22 +20291,34 @@
this._mapChangeLocked = false;
}
+ /**
+ * Adapts all child layers and their GeoGraphics.
+ *
+ * This is called primarily on a map change.
+ *
+ * @private
+ * @memberof MapLayer
+ */
adapt() {
this.layers.forEach(layer => {
if (layer.adapt) layer.adapt(this.map);
});
}
- focus(coordinates, zoom) {
- this.mapview.updateFocusPoint(this.map);
- }
-
transformed(e) {
- this.mapview.transformed(this.map);
+ this.mapview.update(this.map);
this.layers.forEach(layer => layer.parentMapLayerTransformed(this));
this.transformHandler.call(this);
}
+ /**
+ * Clones the map layer-
+ *
+ * @param {ScatterContainer} scatterContainer - ScatterContainer of the app.
+ * @param {PIXI.DisplayObject} [container=null] - Container of the newly created MapLayer. If null, an empty PIXI.Container will be created.
+ * @returns {MapLayer} - Returns the cloned MapLayer.
+ * @memberof MapLayer
+ */
clone(scatterContainer, container = null) {
let mapList = this.mapList.clone();
container = container == null ? new PIXI.Container() : container;
@@ -20141,23 +20393,46 @@
}
}
+ /**
+ * Applies the mapviews focus to the map.
+ * This may be useful, if the container was modified.
+ *
+ * @memberof MapLayer
+ */
refocus() {
this.mapview.apply(this.map);
}
+ /**
+ * @public
+ * @returns {GeoMap} - Returns the active map.
+ * @readonly
+ * @memberof MapLayer
+ */
get map() {
return this.mapList.map
}
/**
- * This is required for the consistency of georelated layers.
- * The request traverses up to the mapLayer where it then returns
- * the responsible map layer.
+ *
+ * This is required for the geo layers.
+ * MapLayer requests from the geoLayers traverse up to the next MapLayer.
+ *
+ * @public
+ * @returns {MapLayer} - Returns this MapLayer.
+ * @readonly
+ * @memberof MapLayer
*/
get mapLayer() {
return this
}
+ /**
+ * Cleans up the MapLayer.
+ *
+ * @public
+ * @memberof MapLayer
+ */
cleanup() {
this.mapList.cleanup();
}
@@ -20165,12 +20440,35 @@
MapLayer.idx = 0;
+ /**
+ * A PIXI.Point or object in form {x,y}.
+ *
+ * @typedef {Object} Point
+ * @property {number} x - Indicates whether the Courage component is present.
+ * @property {number} y - Indicates whether the Power component is present.
+ */
+
+ /**
+ * A coordinate point is a PIXI.Point or object in form {x,y} that contains map coordinates
+ * instead of pixel values, where x represents the latitude and y the longitude.
+ * @typedef {Object} CoordinatePoint
+ * @property {number} x - Indicates whether the Courage component is present.
+ * @property {number} y - Indicates whether the Power component is present.
+ */
+
/**
* MapApp is responsible for showing fullscreen
* map applications.
*
+ * @export
+ * @class MapApp
+ * @extends {PIXIApp}
*/
class MapApp extends PIXIApp {
+ /**
+ *Creates an instance of MapApp.
+ * @memberof MapApp
+ */
constructor(opts = {}) {
super(opts);
@@ -20185,7 +20483,6 @@
coordsLogging: false,
overlays: {},
keycodes: {},
- showHotkeys: false,
imageMapZoomHeight: 256, //Defines the zoomvalue 1 for all image maps inside the mapapp.
focus: null,
zoom: 1,
@@ -20202,7 +20499,6 @@
this.overlayElements = new Map();
this.debug = opts.debug;
this.fpsLogging = opts.fpsLogging;
- this.showHotkeys = opts.showHotkeys;
this.keycodes = this._extractKeyCodes(opts.keycodes);
this.coordsLogging = opts.coordsLogging;
this.overlays = opts.overlays;
@@ -20264,9 +20560,15 @@
console.log(JSON.stringify(boundaries));
}
+ /**
+ * Creates the MapLayer.
+ *
+ * @private
+ * @memberof MapApp
+ */
_setupMapLayer() {
this.mapContainer = new PIXI.Container();
- this.mapLayer = new MapLayer(this.mapList, this.scene, this.mapContainer, {
+ this._mapLayer = new MapLayer(this.mapList, this.scene, this.mapContainer, {
name: 'Root Map Layer',
focus: this.focus,
zoom: this.zoom,
@@ -20332,12 +20634,27 @@
}
}
+ /**
+ * Relayouts the app. E.g. called when the window is resized.
+ *
+ * @param {number} width - Desired width of the app.
+ * @param {number} height - Desired height of the app.
+ * @memberof MapApp
+ */
layout(width, height) {
this.scene.resize(width, height);
this.mapLayer.mapview.update();
this.onSizeChanged.call(this);
}
+ /**
+ * Overrides the sceneFactory of the PIXIApp to create a RigidScatterContainer instead of
+ * a regular PIXI.Container()
+ *
+ * @private
+ * @returns {RigidScatterContainer} - Returns the newly created RigidScatterContainer.
+ * @memberof MapApp
+ */
sceneFactory() {
return new RigidScatterContainer(this.width, this.height, this.renderer, {
app: this,
@@ -20348,6 +20665,12 @@
})
}
+ /**
+ * Changes the map to the given key.
+ *
+ * @param {string} key - Identifier of the map to change to.
+ * @memberof MapApp
+ */
selectMap(key) {
if (this.debug) console.log('Select map', key, result);
let result = this.mapList.select(key);
@@ -20369,14 +20692,30 @@
this.selectMap(key);
}
+ /**
+ * Adds a map to the maplist.
+ * If no map is set, the added map will be set as default.
+ *
+ * @param {string} key - Identifier for the map.
+ * @param {GeoMap} map - Map object to add.
+ * @memberof MapApp
+ */
addMap(key, map) {
if (this.mapList) this.mapList.add(key, map);
else console.error('Cannot access mapLayer. It was not initialized yet.');
}
+ /**
+ * Adds multiple maps at once.
+ *
+ * @param {object} mapObject
+ * @memberof MapApp
+ */
addMaps(mapObject) {
for (let [key, val] of Object.entries(mapObject)) {
- this.addMap(key, val);
+ if (val instanceof GeoMap) {
+ this.addMap(key, val);
+ } else console.warn('Tried adding maps that are not og Type GeoMap.');
}
}
@@ -20409,6 +20748,16 @@
}
}
+ /**
+ * Returns the mapLayer of the map.
+ *
+ * @member {MapLayer}
+ * @memberof MapApp
+ */
+ get mapLayer() {
+ return this._mapLayer
+ }
+
_doesOverlayElementExist(layer, type, name) {
let layerElements = this.overlayElements.get(layer);
return layerElements != undefined && layerElements[type] != null && layerElements[type][name] != null
@@ -20431,7 +20780,9 @@
}
/**
- * Copies the current coordinates to the clipboard.
+ * Copies the current location to the clipboard.
+ *
+ * @memberof MapApp
*/
locationToClipboard() {
let hidden = document.createElement('input');
@@ -20444,6 +20795,15 @@
document.body.removeChild(hidden);
}
+ /**
+ * Can be used to copy polygons to the clipboard.
+ *
+ * Useful for debugging or to roughly trace a shape in the map.
+ * The generated pointarray can be used as geometry of a geographic
+ * or inside an overlay to draw that shape onto the map.
+ *
+ * @memberof MapApp
+ */
pathToClipboard() {
let hidden = document.createElement('input');
document.body.appendChild(hidden);
@@ -20467,25 +20827,27 @@
document.body.removeChild(hidden);
}
+ /**
+ * Returns the active map.
+ *
+ * @readonly
+ * @memberof MapApp
+ */
get map() {
return this.mapList.map
}
- get activeMapKey() {
- return this.mapLayer.active
- }
-
- getRelativePosition(x, y) {
- return {
- x: x * app.width,
- y: y * app.height
- }
- }
-
clearDrawData() {
this.drawData = [];
}
+ /**
+ * Logs a text field on the map.
+ * The text element is a DOMElement.
+ *
+ * @param {string} msg - Message to log.
+ * @memberof MapApp
+ */
showNotification(msg) {
let notification = document.createElement('div');
notification.classList.add('notification');
@@ -20528,8 +20890,25 @@
});
}
- _currentLocationToString() {}
+ /**
+ * @typedef KeyCode
+ * @type {object}
+ * @property {string} key - an ID.
+ * @property {boolean} altKey - Defines if KeyCode requires the alt key to be pressed.
+ * @property {boolean} shiftKey - Defines if KeyCode requires the shift key to be pressed.
+ * @property {boolean} ctrlKey - Defines if KeyCode requires the ctrl key to be pressed.
+ *
+ */
+ /**
+ * Check's if a key event matches a defined KeyCode.
+ *
+ * @private
+ * @param {KeyboardEvent} event - Event that is fired on keydown, -pressed or -up.
+ * @param {KeyCode} keyCode - KeyCode is an object in the form of : {key:number, altKey:boolean,shiftKey:boolean,ctrlKey:boolean }
+ * @returns {boolean} - True, when the event matches the keycode, false otherwise.
+ * @memberof MapApp
+ */
_matchKeyCode(event, keyCode) {
// If keycode does not exist or is invalid - return.
if (!keyCode || keyCode.key == null) return false
@@ -20551,6 +20930,13 @@
});
}
+ /**
+ * Checks on every key down if it matches a keycode.
+ *
+ * @private
+ * @param {KeyboardEvent} event
+ * @memberof MapApp
+ */
_checkForKeyCode(event) {
if (this._matchKeyCode(event, this.keycodes.copyCoordinate)) {
event.preventDefault();
@@ -20609,10 +20995,28 @@
this.drawMode = this.DRAW_MODES.PIXI_POINT;
}
- _extractKeyCodes(keycodeText) {
+ /**
+ * @typedef KeyCodePairs
+ * @type {object}
+ * @property {string} name - Name of the KeyCode.
+ * @property {KeyCode} keyCode - KeyCode
+ *
+ */
+
+ /**
+ * Extracts keycodes from a string.
+ *
+ * KeycodeStrings may look like this 'ctrl+shift+b'
+ *
+ * @private
+ * @param {KeyCodePairs} nameKeyCodePairs
+ * @returns {array} - Returns an array of KeyCode objects.
+ * @memberof MapApp
+ */
+ _extractKeyCodes(nameKeyCodePairs) {
let out = {};
- for (let [name, combinationString] of Object.entries(keycodeText)) {
+ for (let [name, combinationString] of Object.entries(nameKeyCodePairs)) {
let keys = combinationString.split('+');
out[name] = {
key: null,
@@ -20684,29 +21088,6 @@
const radius = submap.container.width / 2;
const distance = Points.distance(center, event.data.global) / submap.scatter.scale;
}
-
- // for (const submap of this.submaps) {
- // const center = submap.center
- // const radius = submap.container.width / 2
- // const distance = Points.distance(center, event.data.global) / submap.scatter.scale
- // const inside = distance < radius + 10
-
- // console.log(distance, radius)
-
- // if (inside) {
- // // (this.width + 80) / 2 * this.scatter.scale
- // //const width = (submap.width + 80) / 2 * submap.scatter.scale
- // //console.log(width)
-
- // if (distance > radius) {
- // submap.resize((distance) * 2, .2)
- // }
- // } else {
- // if (distance < radius + 20) {
- // //submap.resize((distance - 30) * 2, .2)
- // }
- // }
- // }
}
}
@@ -20755,6 +21136,15 @@
return ['Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon']
}
+ /**
+ * Takes a JSON object that contains a FeatureCollection and returns an array
+ * of GeoJson objects.
+ *
+ * @static
+ * @param {array} featureCollection - Array of GeoJSON objects that were contained in the feature collection.
+ * @returns {array} Returns an array of geo json objects.
+ * @memberof GeoJson
+ */
static unwrapFeatureCollection(featureCollection) {
if (featureCollection.features == null) {
console.error(
@@ -20779,12 +21169,22 @@
return list
}
+ /**
+ * Validates and converts one set of coordinates of a specific type.
+ *
+ * @static
+ * @param {string} type - Type of the GeoJson.
+ * @param {array} coordinates - array of points.
+ * @returns {array}
+ * @memberof GeoJson
+ */
static validateAndConvert(type, coordinates) {
+ let converted = null;
+
if (!GeoJson.validateType(type)) throw new GeoJson.InvalidTypeError(type)
else {
if (GeoJson.validateCoordinates(type, coordinates)) {
- let converted = GeoJson.convert(type, coordinates);
- return converted
+ converted = GeoJson.convert(type, coordinates);
} else {
console.error(
`Coordinates are invalid. They must be in format of type '${type} - ${GeoJson._getFormatStringOfType(
@@ -20793,6 +21193,8 @@
);
}
}
+
+ return converted
}
static validateType(type) {
@@ -21655,18 +22057,17 @@
window.FontInfo = FontInfo;
window.Text = Text;
- window.MapData = MapData;
- window.DeepZoomMapData = DeepZoomMapData;
+ window.MapProjection = MapProjection;
+ window.DeepZoomMapProjection = DeepZoomMapProjection;
- window.GeoMap = GeoMap;
+ window.GeoMap = GeoMap$1;
window.ImageMap = ImageMap;
window.DeepZoomMap = DeepZoomMap;
window.Projection = {
Mercator,
Robinson
};
-
- window.MapView = MapView;
+ window.MapViewport = MapViewport;
window.MapApp = MapApp;
diff --git a/doc/conf.json b/doc/conf.json
index 2e89ec4..483862f 100644
--- a/doc/conf.json
+++ b/doc/conf.json
@@ -42,7 +42,7 @@
"./lib/pixi/maps/geographics.js",
"./lib/pixi/maps/geojson.js",
"./lib/pixi/maps/geolayer.js",
- "./lib/pixi/maps/mapdata.js",
+ "./lib/pixi/maps/mapprojection.js",
"./lib/pixi/maps/maplist.js",
"./lib/pixi/maps/overlay.js",
"./lib/pixi/maps/scatter.js",
diff --git a/doc/out/AbstractPopup.html b/doc/out/AbstractPopup.html
index 7da03f7..6771959 100644
--- a/doc/out/AbstractPopup.html
+++ b/doc/out/AbstractPopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -4126,7 +4126,7 @@ a string, a number or a PIXI.Text object.
diff --git a/doc/out/Badge.html b/doc/out/Badge.html
index 89a5ec5..5bd6d2c 100644
--- a/doc/out/Badge.html
+++ b/doc/out/Badge.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3565,7 +3565,7 @@ a string, a number or a PIXI.Text object.
diff --git a/doc/out/BlurFilter.html b/doc/out/BlurFilter.html
index 5c83c58..3b9022d 100644
--- a/doc/out/BlurFilter.html
+++ b/doc/out/BlurFilter.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2990,7 +2990,7 @@ canvas, NOT relative to the PIXI.DisplayObject where the blur effect is assigned
diff --git a/doc/out/Button.html b/doc/out/Button.html
index 45f885d..0786806 100644
--- a/doc/out/Button.html
+++ b/doc/out/Button.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -5089,7 +5089,7 @@ the tint property of the icon sprite.
diff --git a/doc/out/ButtonGroup.html b/doc/out/ButtonGroup.html
index cafacbe..90c64d2 100644
--- a/doc/out/ButtonGroup.html
+++ b/doc/out/ButtonGroup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -4847,7 +4847,7 @@ top, middle and bottom. Only affects the style when the minHeight is bigger than
diff --git a/doc/out/DeepZoomImage.html b/doc/out/DeepZoomImage.html
index ec92ec3..c4db358 100644
--- a/doc/out/DeepZoomImage.html
+++ b/doc/out/DeepZoomImage.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -6304,7 +6304,7 @@ i.e. after loading a single tile
diff --git a/doc/out/DeepZoomInfo.html b/doc/out/DeepZoomInfo.html
index 64897fe..b815a6a 100644
--- a/doc/out/DeepZoomInfo.html
+++ b/doc/out/DeepZoomInfo.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3802,7 +3802,7 @@ on completion.
diff --git a/doc/out/Flippable.html b/doc/out/Flippable.html
index 9faab3a..8c2ca40 100644
--- a/doc/out/Flippable.html
+++ b/doc/out/Flippable.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3712,7 +3712,7 @@
diff --git a/doc/out/FontInfo.html b/doc/out/FontInfo.html
index 8e9014e..a9041db 100644
--- a/doc/out/FontInfo.html
+++ b/doc/out/FontInfo.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2767,7 +2767,7 @@
diff --git a/doc/out/Hypenate.html b/doc/out/Hypenate.html
index 1c193b1..2ea4a94 100644
--- a/doc/out/Hypenate.html
+++ b/doc/out/Hypenate.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2969,7 +2969,7 @@
diff --git a/doc/out/InteractivePopup.html b/doc/out/InteractivePopup.html
index 1ece3c4..63767e2 100644
--- a/doc/out/InteractivePopup.html
+++ b/doc/out/InteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3551,7 +3551,7 @@ a string, a number or a PIXI.Text object.
diff --git a/doc/out/LabeledGraphics.exports.LabeledGraphics.html b/doc/out/LabeledGraphics.exports.LabeledGraphics.html
index 0a3b9e4..3cf00a2 100644
--- a/doc/out/LabeledGraphics.exports.LabeledGraphics.html
+++ b/doc/out/LabeledGraphics.exports.LabeledGraphics.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2769,7 +2769,7 @@
diff --git a/doc/out/LabeledGraphics.html b/doc/out/LabeledGraphics.html
index 2db5150..4267d22 100644
--- a/doc/out/LabeledGraphics.html
+++ b/doc/out/LabeledGraphics.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3834,7 +3834,7 @@ than wanted
diff --git a/doc/out/List.html b/doc/out/List.html
index 4e48b2d..5a360db 100644
--- a/doc/out/List.html
+++ b/doc/out/List.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3787,7 +3787,7 @@ scroll your list.
diff --git a/doc/out/Message.html b/doc/out/Message.html
index 31c6843..09c2ede 100644
--- a/doc/out/Message.html
+++ b/doc/out/Message.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3628,7 +3628,7 @@ a string, a number or a PIXI.Text object.
diff --git a/doc/out/MessageInteractivePopup.html b/doc/out/MessageInteractivePopup.html
index 065cb70..68167f7 100644
--- a/doc/out/MessageInteractivePopup.html
+++ b/doc/out/MessageInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/MessageMessageInteractivePopup.html b/doc/out/MessageMessageInteractivePopup.html
index 61629ae..771904e 100644
--- a/doc/out/MessageMessageInteractivePopup.html
+++ b/doc/out/MessageMessageInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/Modal.html b/doc/out/Modal.html
index 2c65625..3048356 100644
--- a/doc/out/Modal.html
+++ b/doc/out/Modal.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3536,7 +3536,7 @@ a string or a PIXI.Text object.
diff --git a/doc/out/ModalInteractivePopup.html b/doc/out/ModalInteractivePopup.html
index e48edf0..70567d6 100644
--- a/doc/out/ModalInteractivePopup.html
+++ b/doc/out/ModalInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/ModalModalInteractivePopup.html b/doc/out/ModalModalInteractivePopup.html
index 4a172f0..7073ff6 100644
--- a/doc/out/ModalModalInteractivePopup.html
+++ b/doc/out/ModalModalInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/PIXIApp.html b/doc/out/PIXIApp.html
index f16ed92..b313fc6 100644
--- a/doc/out/PIXIApp.html
+++ b/doc/out/PIXIApp.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -6943,7 +6943,7 @@ rejected with an error.
diff --git a/doc/out/Popup.html b/doc/out/Popup.html
index 78e33a4..1f35aa2 100644
--- a/doc/out/Popup.html
+++ b/doc/out/Popup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3537,7 +3537,7 @@ a string, a number or a PIXI.Text object.
diff --git a/doc/out/PopupInteractivePopup.html b/doc/out/PopupInteractivePopup.html
index da161a1..1e01c7d 100644
--- a/doc/out/PopupInteractivePopup.html
+++ b/doc/out/PopupInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/PopupMenu.html b/doc/out/PopupMenu.html
index 34f000f..204ff75 100644
--- a/doc/out/PopupMenu.html
+++ b/doc/out/PopupMenu.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3582,7 +3582,7 @@ a string, a number or a PIXI.Text object.
diff --git a/doc/out/PopupMenuPopupInteractivePopup.html b/doc/out/PopupMenuPopupInteractivePopup.html
index bc977c5..b1124ef 100644
--- a/doc/out/PopupMenuPopupInteractivePopup.html
+++ b/doc/out/PopupMenuPopupInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/PopupMenuPopupMenuPopupInteractivePopup.html b/doc/out/PopupMenuPopupMenuPopupInteractivePopup.html
index ad4fd70..e1a8fdc 100644
--- a/doc/out/PopupMenuPopupMenuPopupInteractivePopup.html
+++ b/doc/out/PopupMenuPopupMenuPopupInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/PopupMenuPopupMenuPopupPopupInteractivePopup.html b/doc/out/PopupMenuPopupMenuPopupPopupInteractivePopup.html
index cf3b2af..edbbe03 100644
--- a/doc/out/PopupMenuPopupMenuPopupPopupInteractivePopup.html
+++ b/doc/out/PopupMenuPopupMenuPopupPopupInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/PopupMenuPopupPopupInteractivePopup.html b/doc/out/PopupMenuPopupPopupInteractivePopup.html
index 1767350..6456056 100644
--- a/doc/out/PopupMenuPopupPopupInteractivePopup.html
+++ b/doc/out/PopupMenuPopupPopupInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/PopupPopupInteractivePopup.html b/doc/out/PopupPopupInteractivePopup.html
index 5ff6c15..762a6d1 100644
--- a/doc/out/PopupPopupInteractivePopup.html
+++ b/doc/out/PopupPopupInteractivePopup.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2997,7 +2997,7 @@ like Popup, Message...
diff --git a/doc/out/Progress.html b/doc/out/Progress.html
index e400593..6db43de 100644
--- a/doc/out/Progress.html
+++ b/doc/out/Progress.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -4077,7 +4077,7 @@ progress is activated. See PIXI.TextStyle for possible options.
diff --git a/doc/out/Scrollview.html b/doc/out/Scrollview.html
index dab88e0..f4ee47f 100644
--- a/doc/out/Scrollview.html
+++ b/doc/out/Scrollview.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2901,7 +2901,7 @@
diff --git a/doc/out/Slider.html b/doc/out/Slider.html
index 617bee6..0fd60d4 100644
--- a/doc/out/Slider.html
+++ b/doc/out/Slider.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -4160,7 +4160,7 @@ to display.
diff --git a/doc/out/Switch.html b/doc/out/Switch.html
index 88fa494..8559194 100644
--- a/doc/out/Switch.html
+++ b/doc/out/Switch.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -4590,7 +4590,7 @@ to display.
diff --git a/doc/out/TextLabel.TextLabel.html b/doc/out/TextLabel.TextLabel.html
index 3ca8ef7..6c6ffb4 100644
--- a/doc/out/TextLabel.TextLabel.html
+++ b/doc/out/TextLabel.TextLabel.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2898,7 +2898,7 @@
diff --git a/doc/out/Theme.html b/doc/out/Theme.html
index 830d7b7..391f8bf 100644
--- a/doc/out/Theme.html
+++ b/doc/out/Theme.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -4422,7 +4422,7 @@ is used for large actived text.
diff --git a/doc/out/ThemeDark.html b/doc/out/ThemeDark.html
index 84c5ce8..46459aa 100644
--- a/doc/out/ThemeDark.html
+++ b/doc/out/ThemeDark.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2788,7 +2788,7 @@
diff --git a/doc/out/ThemeLight.html b/doc/out/ThemeLight.html
index 8fcf50b..269b1e0 100644
--- a/doc/out/ThemeLight.html
+++ b/doc/out/ThemeLight.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2800,7 +2800,7 @@ The color1 is set to 0xf6f6f6, color2 to 0x282828.
diff --git a/doc/out/ThemeRed.html b/doc/out/ThemeRed.html
index 724b689..e3a0cf5 100644
--- a/doc/out/ThemeRed.html
+++ b/doc/out/ThemeRed.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2800,7 +2800,7 @@ The primaryColor is set to 0xd92f31.
diff --git a/doc/out/TileQuadNode.html b/doc/out/TileQuadNode.html
index c54b7cb..1b482b5 100644
--- a/doc/out/TileQuadNode.html
+++ b/doc/out/TileQuadNode.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3258,7 +3258,7 @@ an indicator of tiles to free.
diff --git a/doc/out/Tooltip.html b/doc/out/Tooltip.html
index 9e18447..aed85a8 100644
--- a/doc/out/Tooltip.html
+++ b/doc/out/Tooltip.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3703,7 +3703,7 @@ a string, a number or a PIXI.Text object.
diff --git a/doc/out/UITest.html b/doc/out/UITest.html
index 839d938..61ef57c 100644
--- a/doc/out/UITest.html
+++ b/doc/out/UITest.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -5382,7 +5382,7 @@
diff --git a/doc/out/Volatile.html b/doc/out/Volatile.html
index 31d623b..7c577de 100644
--- a/doc/out/Volatile.html
+++ b/doc/out/Volatile.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3290,7 +3290,7 @@
diff --git a/doc/out/global.html b/doc/out/global.html
index 0263484..6678e07 100644
--- a/doc/out/global.html
+++ b/doc/out/global.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -5340,7 +5340,7 @@ instead of pixel values, where x represents the latitude and y the longitude.
diff --git a/doc/out/index.html b/doc/out/index.html
index 80aa070..3b09294 100644
--- a/doc/out/index.html
+++ b/doc/out/index.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2693,7 +2693,7 @@
diff --git a/doc/out/pixi_abstractpopup.js.html b/doc/out/pixi_abstractpopup.js.html
index a78ba6c..0d00faa 100644
--- a/doc/out/pixi_abstractpopup.js.html
+++ b/doc/out/pixi_abstractpopup.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3016,7 +3016,7 @@ export default class AbstractPopup extends PIXI.Graphics {
diff --git a/doc/out/pixi_app.js.html b/doc/out/pixi_app.js.html
index 1c65db2..5ab220e 100644
--- a/doc/out/pixi_app.js.html
+++ b/doc/out/pixi_app.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3396,7 +3396,7 @@ class FpsDisplay extends PIXI.Graphics {
diff --git a/doc/out/pixi_badge.js.html b/doc/out/pixi_badge.js.html
index 6abeb98..f17a3a3 100644
--- a/doc/out/pixi_badge.js.html
+++ b/doc/out/pixi_badge.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2777,7 +2777,7 @@ export default class Badge extends AbstractPopup {
diff --git a/doc/out/pixi_blurfilter.js.html b/doc/out/pixi_blurfilter.js.html
index 502f622..d6e0501 100644
--- a/doc/out/pixi_blurfilter.js.html
+++ b/doc/out/pixi_blurfilter.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2941,7 +2941,7 @@ class TiltShiftYFilter extends TiltShiftAxisFilter {
diff --git a/doc/out/pixi_button.js.html b/doc/out/pixi_button.js.html
index 57a72e5..4339478 100644
--- a/doc/out/pixi_button.js.html
+++ b/doc/out/pixi_button.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3385,7 +3385,7 @@ export default class Button extends PIXI.Container {
diff --git a/doc/out/pixi_buttongroup.js.html b/doc/out/pixi_buttongroup.js.html
index 97fa9a3..d8120d8 100644
--- a/doc/out/pixi_buttongroup.js.html
+++ b/doc/out/pixi_buttongroup.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3388,7 +3388,7 @@ export default class ButtonGroup extends PIXI.Container {
diff --git a/doc/out/pixi_deepzoom_image.js.html b/doc/out/pixi_deepzoom_image.js.html
index 2572b58..f916944 100644
--- a/doc/out/pixi_deepzoom_image.js.html
+++ b/doc/out/pixi_deepzoom_image.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3720,7 +3720,7 @@ export class DeepZoomImage extends PIXI.Container {
diff --git a/doc/out/pixi_flippable.js.html b/doc/out/pixi_flippable.js.html
index 0a9bb03..c94f77c 100644
--- a/doc/out/pixi_flippable.js.html
+++ b/doc/out/pixi_flippable.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3114,7 +3114,7 @@ export default class Flippable extends PIXI.projection.Camera3d {
diff --git a/doc/out/pixi_labeledgraphics.js.html b/doc/out/pixi_labeledgraphics.js.html
index b3196be..67391cc 100644
--- a/doc/out/pixi_labeledgraphics.js.html
+++ b/doc/out/pixi_labeledgraphics.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3063,7 +3063,7 @@ export class BitmapLabeledGraphics extends LabeledGraphics {
diff --git a/doc/out/pixi_list.js.html b/doc/out/pixi_list.js.html
index 0fa3d34..f9d87bd 100644
--- a/doc/out/pixi_list.js.html
+++ b/doc/out/pixi_list.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3042,7 +3042,7 @@ export default class List extends PIXI.Container {
diff --git a/doc/out/pixi_message.js.html b/doc/out/pixi_message.js.html
index 3237793..4d6cad8 100644
--- a/doc/out/pixi_message.js.html
+++ b/doc/out/pixi_message.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2791,7 +2791,7 @@ export default class Message extends InteractivePopup {
diff --git a/doc/out/pixi_modal.js.html b/doc/out/pixi_modal.js.html
index d7764ec..9170031 100644
--- a/doc/out/pixi_modal.js.html
+++ b/doc/out/pixi_modal.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2872,7 +2872,7 @@ export default class Modal extends PIXI.Container {
diff --git a/doc/out/pixi_popup.js.html b/doc/out/pixi_popup.js.html
index ac1cad2..c783dd0 100644
--- a/doc/out/pixi_popup.js.html
+++ b/doc/out/pixi_popup.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2882,7 +2882,7 @@ export default class Popup extends InteractivePopup {
diff --git a/doc/out/pixi_popupmenu.js.html b/doc/out/pixi_popupmenu.js.html
index e2c465f..f90d4d7 100644
--- a/doc/out/pixi_popupmenu.js.html
+++ b/doc/out/pixi_popupmenu.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2785,7 +2785,7 @@ export default class PopupMenu extends Popup {
diff --git a/doc/out/pixi_progress.js.html b/doc/out/pixi_progress.js.html
index 1d1c28c..bde71f8 100644
--- a/doc/out/pixi_progress.js.html
+++ b/doc/out/pixi_progress.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2967,7 +2967,7 @@ export default class Progress extends PIXI.Container {
diff --git a/doc/out/pixi_scrollview.js.html b/doc/out/pixi_scrollview.js.html
index 76788c1..6682f77 100644
--- a/doc/out/pixi_scrollview.js.html
+++ b/doc/out/pixi_scrollview.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2726,7 +2726,7 @@ export default class Scrollview extends Scrollbox {
diff --git a/doc/out/pixi_slider.js.html b/doc/out/pixi_slider.js.html
index bca37b4..eba20a9 100644
--- a/doc/out/pixi_slider.js.html
+++ b/doc/out/pixi_slider.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3131,7 +3131,7 @@ export default class Slider extends PIXI.Container {
diff --git a/doc/out/pixi_switch.js.html b/doc/out/pixi_switch.js.html
index 86da2af..e4a8957 100644
--- a/doc/out/pixi_switch.js.html
+++ b/doc/out/pixi_switch.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3185,7 +3185,7 @@ export default class Switch extends PIXI.Container {
diff --git a/doc/out/pixi_theme.js.html b/doc/out/pixi_theme.js.html
index f06695b..2da62cc 100644
--- a/doc/out/pixi_theme.js.html
+++ b/doc/out/pixi_theme.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2930,7 +2930,7 @@ export class ThemeRed extends Theme {
diff --git a/doc/out/pixi_tooltip.js.html b/doc/out/pixi_tooltip.js.html
index 5bcd9f6..1d2a4eb 100644
--- a/doc/out/pixi_tooltip.js.html
+++ b/doc/out/pixi_tooltip.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2819,7 +2819,7 @@ export default class Tooltip extends AbstractPopup {
diff --git a/doc/out/pixi_volatile.js.html b/doc/out/pixi_volatile.js.html
index 179d586..942b665 100644
--- a/doc/out/pixi_volatile.js.html
+++ b/doc/out/pixi_volatile.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -2823,7 +2823,7 @@ export default class Volatile {
diff --git a/doc/out/uitest.js.html b/doc/out/uitest.js.html
index 1782b48..c722d3b 100644
--- a/doc/out/uitest.js.html
+++ b/doc/out/uitest.js.html
@@ -500,7 +500,7 @@
image
- mapdata
+ mapProjection
-
+
- DeepZoomMapData
+ DeepZoomMapGeoMap
+
+
+
+
+
+
+
+
+
+
+
+ DeepZoomMapProjection
-
+
- DeepZoomMapDataMapData
-
-
-
-
-
-
-
-
-
-
-
- DeepZoomMapGeoMap
+ DeepZoomMapProjectionMapProjection
-
-
-
- MapData
-
-
-
-
-
-
-
-
@@ -1709,6 +1673,42 @@
+
+
+
+ MapProjection
+
+
+
+
+
+
+
+
@@ -3674,7 +3674,7 @@ class Event {
diff --git a/lib/pixi/bundle.js b/lib/pixi/bundle.js
index e4e05b2..1304736 100755
--- a/lib/pixi/bundle.js
+++ b/lib/pixi/bundle.js
@@ -63,10 +63,10 @@ window.Text = Text
//Maps
import { GeoMap, ImageMap, DeepZoomMap } from './maps/map.js'
-import { MapData, DeepZoomMapData } from './maps/mapdata.js'
+import { MapProjection, DeepZoomMapProjection } from './maps/mapprojection'
-window.MapData = MapData
-window.DeepZoomMapData = DeepZoomMapData
+window.MapProjection = MapProjection
+window.DeepZoomMapProjection = DeepZoomMapProjection
window.GeoMap = GeoMap
window.ImageMap = ImageMap
diff --git a/lib/pixi/maps/geographics.html b/lib/pixi/maps/geographics.html
index c5c5537..3591bd4 100644
--- a/lib/pixi/maps/geographics.html
+++ b/lib/pixi/maps/geographics.html
@@ -131,10 +131,10 @@
const MercatorProjection = new Projection.Mercator()
const RobinsonProjection = new Projection.Robinson(10)
- // In the MapDataOptions specific behaviour can be enforced.
+ // In the MapProjectionOptions specific behaviour can be enforced.
// E.g. Setting cover to false removes the enforcement of the map to cover the
// whole mapLayer.
- const mapDataOptions = { cover: true, debug: true }
+ const mapProjectionOptions = { cover: true, debug: true }
// Specifies a common zoom height for both maps.
@@ -146,8 +146,8 @@
}
// Create the actual map objects.
- let osmMap = new ImageMap(sprites.get(osmworld), new MapData(MercatorProjection, mapDataOptions), mapOptions)
- let wikimediaMap = new ImageMap(sprites.get(wikimedia), new MapData(RobinsonProjection, mapDataOptions), mapOptions)
+ let osmMap = new ImageMap(sprites.get(osmworld), new MapProjection(MercatorProjection, mapProjectionOptions), mapOptions)
+ let wikimediaMap = new ImageMap(sprites.get(wikimedia), new MapProjection(RobinsonProjection, mapProjectionOptions), mapOptions)
// Add the maps to the mapapp.
// An object is used to have a key, that identifies the maps.
diff --git a/lib/pixi/maps/geojson.html b/lib/pixi/maps/geojson.html
index bfc1910..6688a31 100644
--- a/lib/pixi/maps/geojson.html
+++ b/lib/pixi/maps/geojson.html
@@ -156,7 +156,7 @@
// As map an image of europe is used.
let europe = "../../../../var/examples/maps/europe/europe.jpg"
- let europeData = new MapData(MERCATOR, {
+ let europeMapProjection = new MapProjection(MERCATOR, {
clip: {
min: { x: 32.863294, y: -18.58 },
max: { x: 57.467973, y: 44.277158 }
@@ -182,7 +182,7 @@
window.readyHandler = new EventHandler("onReady")
function ready(textures) {
- let europeMap = new ImageMap(new PIXI.Sprite(textures.get(europe)), europeData)
+ let europeMap = new ImageMap(new PIXI.Sprite(textures.get(europe)), europeMapProjection)
app.setMap("germany", europeMap)
app.setup().run()
diff --git a/lib/pixi/maps/index.html b/lib/pixi/maps/index.html
index 5e6e2b5..ea0956e 100644
--- a/lib/pixi/maps/index.html
+++ b/lib/pixi/maps/index.html
@@ -99,7 +99,7 @@
["GeoJson", "geojson.html"],
["GeoMap", "map.html"],
["MapApp", "mapapp.html"],
- ["MapData", "mapdata.html"],
+ ["MapProjection", "mapprojection.html"],
["MapViewport", "mapviewport.html"],
["Overlay", "overlay.html"],
["Scatter", "scatter.html"]
diff --git a/lib/pixi/maps/map.html b/lib/pixi/maps/map.html
index 6944a2d..b83c9e5 100644
--- a/lib/pixi/maps/map.html
+++ b/lib/pixi/maps/map.html
@@ -71,10 +71,10 @@
const projection = new Projection.Mercator()
// Create a map data object.
- const osmDeepZoomMapData = new DeepZoomMapData(projection, tilesConfig, { app })
+ const osmDeepZoomMapProjection = new DeepZoomMapProjection(projection, tilesConfig, { app })
// Create the map
- const osmMap = new DeepZoomMap(osmDeepZoomMapData, tilesConfig)
+ const osmMap = new DeepZoomMap(osmDeepZoomMapProjection, tilesConfig)
// Add the map to the app.
app.addMap("osm", osmMap)
@@ -122,10 +122,10 @@
const projection = new Projection.Robinson(10)
// Create a map data object.
- let mapData = new MapData(projection)
+ let mapProjection = new MapProjection(projection)
// Create the map
- let imageMap = new ImageMap(sprites.get(mapTexture), mapData)
+ let imageMap = new ImageMap(sprites.get(mapTexture), mapProjection)
// Add the map to the app.
diff --git a/lib/pixi/maps/map.js b/lib/pixi/maps/map.js
index aa26af4..464dc06 100644
--- a/lib/pixi/maps/map.js
+++ b/lib/pixi/maps/map.js
@@ -1,12 +1,12 @@
import { MapObjectScatter } from './scatter.js'
import { DeepZoomImage, DeepZoomInfo } from '../deepzoom/image.js'
-import { MapData, DeepZoomMapData } from './mapdata.js'
+import { MapProjection, DeepZoomMapProjection } from './mapprojection.js'
import { Points } from '../../utils.js'
import { EventHandler } from './utils.js'
import Mercator from './projections/mercator.js'
/**
-* The GeoMap class displays a map, that it gets from MapData object.
+* The GeoMap class displays a map, that it gets from MapProjection object.
* It handles the current location on the map, the zoom factor, interactions and
* the viewport, the area of the map, the user can see and navigate to.
*
@@ -26,12 +26,12 @@ export class GeoMap {
* Creates instance of GeoMap
*
* @constructor
- * @param {MapData}[mapdata={}] - The mapdata describes how the map has to be interpreted by the Map class. E.g. what are the boundaries of the map?
+ * @param {MapProjection}[mapProjection={}] - The map projection describes how the map has to be interpreted by the Map class. E.g. what are the boundaries of the map?
* @param {object}[opts={}] - With the opts, the created MapObjectScatter can be adjusted.
* @param {boolean}[opts.cover=false] - Enables covering behaviour of a map object. Normally maps should cover the whole app.
*/
constructor(
- mapdata = {},
+ mapProjection = {},
{
debug = true,
cover = true,
@@ -43,7 +43,7 @@ export class GeoMap {
translatable = true,
scalable = true,
rotatable = false, // Many functionalities are not supported when rotating the map. Mainly the cover mechanism.
- viewport = mapdata.maxViewport,
+ viewport = mapProjection.maxViewport,
// Events
onLoad = null,
onTransform = null
@@ -54,6 +54,7 @@ export class GeoMap {
this.onTransform = new EventHandler('transform', { listeners: onTransform })
this._alpha = alpha
+ this._cover = cover
this.debug = debug
//TODO discuss if this is required here.
@@ -67,15 +68,15 @@ export class GeoMap {
this.scalable = scalable
this.viewport = viewport
- this._mapdata = mapdata
+ this._mapProjection = mapProjection
this.overlays = {}
/**
- * Adjust the viewport depending on the mapdata clipping.
+ * Adjust the viewport depending on the mapProjection clipping.
*/
- if (this.mapdata.clip) {
+ if (this.mapProjection.clip) {
const vp = this.viewport
- const cp = this.mapdata.clip
+ const cp = this.mapProjection.clip
let bounds = {
min: {
x: vp.min.x > cp.min.x ? vp.min.x : cp.min.x,
@@ -91,6 +92,18 @@ export class GeoMap {
}
}
+
+
+ /**
+ * Determines if the scatter covers the container.
+ * @member {boolean}
+ * @readonly
+ * @memberof GeoMap
+ */
+ get cover() {
+ return this._cover
+ }
+
/**
* Returns the image object used by the GeoMap.
*
@@ -102,14 +115,14 @@ export class GeoMap {
}
/**
- * The mapdata of the map.
+ * The mapProjection of the map.
*
- * @member {MapData}
+ * @member {MapProjection}
* @readonly
* @memberof GeoMap
*/
- get mapdata() {
- return this._mapdata
+ get mapProjection() {
+ return this._mapProjection
}
/**
@@ -279,7 +292,7 @@ export class GeoMap {
* @returns {object} - Coordinates on the map in form of {x: latitude, y: longitude}.
*/
coordinatesFromPoint(point) {
- let coords = this.mapdata.toCoordinates(this.toRelativePosition(point))
+ let coords = this.mapProjection.toCoordinates(this.toRelativePosition(point))
return coords
}
@@ -290,7 +303,7 @@ export class GeoMap {
* @return {Point} - Returns a image position in form of {x: x, y: y}.
*/
coordinatesToPoint(coordinates) {
- return this.toAbsolutePixelCoordinates(this.mapdata.toPixel(coordinates))
+ return this.toAbsolutePixelCoordinates(this.mapProjection.toPixel(coordinates))
}
toRelativePosition(point) {
@@ -549,8 +562,8 @@ export class GeoMap {
const tilesConfig = data.tiles
const options = data.options
- const mapdata = new DeepZoomMapData(projection, tilesConfig)
- return new DeepZoomMap(mapdata, tilesConfig, options)
+ const mapProjection = new DeepZoomMapProjection(projection, tilesConfig)
+ return new DeepZoomMap(mapProjection, tilesConfig, options)
}
static _getProjectionByName(projection) {
@@ -578,31 +591,31 @@ export class DeepZoomMap extends GeoMap {
/**
* @constructor
* @param {object} tilesConfig - The tiles config object, that defines at what path and in which format the tiles are.
- * @param {MapData} mapdata - A MapData object, that contains informations of how the given map has to be interpreted.
+ * @param {MapProjection} mapProjection - A MapProjection object, that contains informations of how the given map has to be interpreted.
* @param {object} opts - Additional options to specify the behaviour of the deep zoom image.
*/
- constructor(mapdata, tilesConfig, opts = {}) {
+ constructor(mapProjection, tilesConfig, opts = {}) {
opts = Object.assign(
{
maxScale: Math.min(tilesConfig.width, tilesConfig.height) / tilesConfig.tileSize,
- minScale: mapdata.getMinScale,
+ minScale: mapProjection.getMinScale,
highResolution: true,
debug: false
},
opts
)
- super(mapdata, opts)
+ super(mapProjection, opts)
this.tilesConfig = tilesConfig
- this._verifyMapdata()
+ this._verifyMapProjection()
}
- _verifyMapdata() {
- if (!(this.mapdata instanceof MapData)) {
- console.error('Use the MapData object for creating maps!')
+ _verifyMapProjection() {
+ if (!(this.mapProjection instanceof MapProjection)) {
+ console.error('Use the MapProjection object for creating maps!')
} else {
- if (!(this.mapdata instanceof DeepZoomMapData)) {
- console.error('Use the DeepZoomMapData object.')
+ if (!(this.mapProjection instanceof DeepZoomMapProjection)) {
+ console.error('Use the DeepZoomMapProjection object.')
}
}
}
@@ -613,10 +626,10 @@ export class DeepZoomMap extends GeoMap {
* @private
*/
load(container = null, scatter = null) {
- if (!this.mapdata.app) console.error('App was not set in the mapdata.')
+ if (!this.mapProjection.app) console.error('App was not set in the mapProjection.')
this.info = new DeepZoomInfo(this.tilesConfig)
let image = new DeepZoomImage(this.info, {
- app: this.mapdata.app,
+ app: this.mapProjection.app,
alpha: this.alpha,
debug: this.debug,
world: scatter == null ? scatter : scatter.getWorldScatter()
@@ -734,9 +747,9 @@ export class DeepZoomMap extends GeoMap {
}
clone(container, scatter = null) {
- const map = new DeepZoomMap(this.mapdata, this.tilesConfig, {
+ const map = new DeepZoomMap(this.mapProjection, this.tilesConfig, {
alpha: this.alpha,
- cover: this.cover,
+ cover: this.image.scatter.cover,
debug: this.debug,
startScale: this.startScale,
minScale: this.minScale,
@@ -802,9 +815,9 @@ DeepZoomMap.tintcolor = 0
* @extends {GeoMap}
*/
export class ImageMap extends GeoMap {
- constructor(sprite, mapdata, opts = {}) {
- super(mapdata, opts)
- if (this.debug) console.log('Construct Image Map', sprite, mapdata, opts)
+ constructor(sprite, mapProjection, opts = {}) {
+ super(mapProjection, opts)
+ if (this.debug) console.log('Construct Image Map', sprite, mapProjection, opts)
this.sprite = sprite
@@ -818,9 +831,9 @@ export class ImageMap extends GeoMap {
}
clone(container = null, scatter = null) {
- const map = new ImageMap(new PIXI.Sprite(this.sprite.texture), this.mapdata, {
+ const map = new ImageMap(new PIXI.Sprite(this.sprite.texture), this.mapProjection, {
alpha: this.alpha,
- cover: this.cover,
+ cover: this.image.cover,
debug: this.debug,
startScale: this.startScale,
minScale: this.minScale,
diff --git a/lib/pixi/maps/mapapp.html b/lib/pixi/maps/mapapp.html
index 6cb455f..fa85a08 100644
--- a/lib/pixi/maps/mapapp.html
+++ b/lib/pixi/maps/mapapp.html
@@ -102,7 +102,7 @@
// how the displayed map has to be interpreted.
// e.g. which projection is used or how the
// image is clipped.
- let europeData = new MapData(new Projection.Mercator(), {
+ let europeData = new MapProjection(new Projection.Mercator(), {
clip: {
min: { x: 32.863294, y: -18.58 },
max: { x: 57.467973, y: 44.277158 }
@@ -120,16 +120,16 @@
cover
})
- let testMapData = new DeepZoomMapData(new Projection.Mercator(), testConfig.tiles, {
+ let testMapProjection = new DeepZoomMapProjection(new Projection.Mercator(), testConfig.tiles, {
app
})
- let testMap = new DeepZoomMap(testMapData, Object.assign({}, testConfig.tiles, { app }), { cover })
+ let testMap = new DeepZoomMap(testMapProjection, Object.assign({}, testConfig.tiles, { app }), { cover })
app.addMap("test", testMap)
- let osmMapData = new DeepZoomMapData(new Projection.Mercator(), osmConfig.tiles, {
+ let osmMapProjection = new DeepZoomMapProjection(new Projection.Mercator(), osmConfig.tiles, {
app
})
- let deepZoomMap = new DeepZoomMap(osmMapData, Object.assign({}, osmConfig.tiles, { app }), { cover })
+ let deepZoomMap = new DeepZoomMap(osmMapProjection, Object.assign({}, osmConfig.tiles, { app }), { cover })
app.addMap("osm", deepZoomMap)
// Finally apply the map to the MapApp
diff --git a/lib/pixi/maps/mapdata.html b/lib/pixi/maps/mapprojection.html
similarity index 88%
rename from lib/pixi/maps/mapdata.html
rename to lib/pixi/maps/mapprojection.html
index 473348f..2e477f4 100644
--- a/lib/pixi/maps/mapdata.html
+++ b/lib/pixi/maps/mapprojection.html
@@ -3,7 +3,7 @@
- MapData
+ MapProjection
@@ -37,8 +37,8 @@
- MapData
- Mapdata calculates is responsible for transforming map coordinates to pixel coordinates and backwards.
+ MapProjection
+ The map projection calculates is responsible for transforming map coordinates to pixel coordinates and backwards.
Static Squared World Map
The most simple example is a squared world map, thats projected with mercator transformation. Ranging from
@@ -73,9 +73,9 @@
//Helper function to print the coordinates to a dom element.
- function printCoordinates(element, mapdata, out_dom) {
+ function printCoordinates(element, mapProjection, out_dom) {
element.addEventListener("mousemove", (event) => {
- let coords = mapdata.toCoordinates({ x: event.offsetX / event.target.width, y: event.offsetY / event.target.height })
+ let coords = mapProjection.toCoordinates({ x: event.offsetX / event.target.width, y: event.offsetY / event.target.height })
out_dom.innerHTML = "Lat: " + coords.x.toFixed(4) + " Lng: " + coords.y.toFixed(4)
})
}
@@ -99,8 +99,8 @@
Clipped Map
- Often we don't use the whole map, or our map is a subsection of the world. MapData can clip those cases, using
+
Often we don't use the whole map, or our map is a subsection of the world. MapProjection can clip those cases, using
the a
bounding box of min and max coordinates.
Coordinates:
@@ -127,8 +127,8 @@