Fixed cover bug. Renamed mapdata to mapprojection.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user