All per-map center points
This commit is contained in:
parent
1481207a12
commit
61b2a59e2a
@ -205,7 +205,7 @@ export default defineComponent({
|
|||||||
store.commit(MutationTypes.CLEAR_PARSED_URL, undefined);
|
store.commit(MutationTypes.CLEAR_PARSED_URL, undefined);
|
||||||
// Otherwise pan to world center
|
// Otherwise pan to world center
|
||||||
} else {
|
} else {
|
||||||
viewTarget.location = newValue.center;
|
viewTarget.location = store.state.currentMap?.center || newValue.center;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(viewTarget.zoom == null) {
|
if(viewTarget.zoom == null) {
|
||||||
|
@ -35,6 +35,7 @@ export interface LiveAtlasMapDefinitionOptions {
|
|||||||
nativeZoomLevels: number;
|
nativeZoomLevels: number;
|
||||||
extraZoomLevels: number;
|
extraZoomLevels: number;
|
||||||
tileUpdateInterval?: number;
|
tileUpdateInterval?: number;
|
||||||
|
center?: Coordinate;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class LiveAtlasMapDefinition {
|
export default class LiveAtlasMapDefinition {
|
||||||
@ -55,6 +56,7 @@ export default class LiveAtlasMapDefinition {
|
|||||||
readonly extraZoomLevels: number;
|
readonly extraZoomLevels: number;
|
||||||
readonly scale: number;
|
readonly scale: number;
|
||||||
readonly tileUpdateInterval?: number;
|
readonly tileUpdateInterval?: number;
|
||||||
|
readonly center?: Coordinate;
|
||||||
|
|
||||||
constructor(options: LiveAtlasMapDefinitionOptions) {
|
constructor(options: LiveAtlasMapDefinitionOptions) {
|
||||||
this.world = options.world;
|
this.world = options.world;
|
||||||
@ -77,6 +79,7 @@ export default class LiveAtlasMapDefinition {
|
|||||||
this.extraZoomLevels = options.extraZoomLevels || 0;
|
this.extraZoomLevels = options.extraZoomLevels || 0;
|
||||||
this.scale = (1 / Math.pow(2, this.nativeZoomLevels));
|
this.scale = (1 / Math.pow(2, this.nativeZoomLevels));
|
||||||
this.tileUpdateInterval = options.tileUpdateInterval || undefined;
|
this.tileUpdateInterval = options.tileUpdateInterval || undefined;
|
||||||
|
this.center = options.center || undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
locationToLatLng(location: Coordinate): LatLng {
|
locationToLatLng(location: Coordinate): LatLng {
|
||||||
|
@ -132,6 +132,11 @@ export default class OverviewerMapProvider extends MapProvider {
|
|||||||
nativeZoomLevels,
|
nativeZoomLevels,
|
||||||
tileSize,
|
tileSize,
|
||||||
}),
|
}),
|
||||||
|
center: {
|
||||||
|
x: tileset?.center[0] || 0,
|
||||||
|
y: tileset?.center[1] || 0,
|
||||||
|
z: tileset?.center[2] || 0,
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.mapMarkerSets.set(tileset.path, new Map());
|
this.mapMarkerSets.set(tileset.path, new Map());
|
||||||
|
Loading…
Reference in New Issue
Block a user