Fixed cover bug. Renamed mapdata to mapprojection.

This commit is contained in:
2019-12-11 16:45:26 +01:00
parent a85569e54d
commit 1e80845aa6
82 changed files with 5473 additions and 5059 deletions
+4 -4
View File
@@ -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.