Fixed cover bug. Renamed mapdata to mapprojection.
This commit is contained in:
@@ -81,11 +81,11 @@
|
||||
|
||||
})
|
||||
|
||||
let osmMapData = new DeepZoomMapData(new Projection.Mercator(), osmConfig.tiles, {
|
||||
let osmMapProjection = new DeepZoomMapProjection(new Projection.Mercator(), osmConfig.tiles, {
|
||||
app: app
|
||||
})
|
||||
|
||||
let deepZoomMap = new DeepZoomMap(osmMapData, Object.assign({}, osmConfig.tiles, { app: app }), { cover: true })
|
||||
let deepZoomMap = new DeepZoomMap(osmMapProjection, Object.assign({}, osmConfig.tiles, { app: app }), { cover: true })
|
||||
|
||||
app.setMap("deepzoom", deepZoomMap)
|
||||
|
||||
@@ -127,11 +127,11 @@
|
||||
|
||||
const app = new MapApp(opts)
|
||||
|
||||
let osmMapData = new DeepZoomMapData(new Projection.Mercator(), osmConfig.tiles, {
|
||||
let osmMapProjection = new DeepZoomMapProjection(new Projection.Mercator(), osmConfig.tiles, {
|
||||
app: app
|
||||
})
|
||||
|
||||
let deepZoomMap = new DeepZoomMap(osmMapData, Object.assign({}, osmConfig.tiles, { app: app }), Object.assign({ cover: false }, mapOptipns))
|
||||
let deepZoomMap = new DeepZoomMap(osmMapProjection, Object.assign({}, osmConfig.tiles, { app: app }), Object.assign({ cover: false }, mapOptipns))
|
||||
|
||||
app.setMap("deepzoom", deepZoomMap)
|
||||
|
||||
@@ -216,8 +216,8 @@
|
||||
// Called when all textures are loaded.
|
||||
let ready = (sprites) => {
|
||||
|
||||
// Define the mapdata for the map.
|
||||
let europeData = new MapData(new Projection.Mercator(), {
|
||||
// Define the map projection for the map.
|
||||
let europeData = new MapProjection(new Projection.Mercator(), {
|
||||
clip: {
|
||||
min: { x: 32.863294, y: -18.58 },
|
||||
max: { x: 57.467973, y: 44.277158 }
|
||||
@@ -225,7 +225,7 @@
|
||||
})
|
||||
|
||||
|
||||
// Create the map using the texture and the mapdata.
|
||||
// Create the map using the texture and the map projection.
|
||||
// Optionally customize the map by supplying secific options.
|
||||
let imageMap = new ImageMap(sprites.get(europe), europeData, {
|
||||
cover: false
|
||||
@@ -270,12 +270,12 @@
|
||||
})
|
||||
|
||||
// Create the deepzoomdata.
|
||||
let osmMapData = new DeepZoomMapData(new Projection.Mercator(), mapConfig.tiles, {
|
||||
let osmMapProjection = new DeepZoomMapProjection(new Projection.Mercator(), mapConfig.tiles, {
|
||||
app
|
||||
})
|
||||
|
||||
// Create the app.
|
||||
let deepZoomMap = new DeepZoomMap(osmMapData, Object.assign({}, mapConfig.tiles, { app }), { cover: false })
|
||||
let deepZoomMap = new DeepZoomMap(osmMapProjection, Object.assign({}, mapConfig.tiles, { app }), { cover: false })
|
||||
|
||||
// Set the map in the app.
|
||||
app.setMap("deepzoom", deepZoomMap)
|
||||
|
||||
Reference in New Issue
Block a user