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);
|
||||
// Otherwise pan to world center
|
||||
} else {
|
||||
viewTarget.location = newValue.center;
|
||||
viewTarget.location = store.state.currentMap?.center || newValue.center;
|
||||
}
|
||||
|
||||
if(viewTarget.zoom == null) {
|
||||
|
@ -35,6 +35,7 @@ export interface LiveAtlasMapDefinitionOptions {
|
||||
nativeZoomLevels: number;
|
||||
extraZoomLevels: number;
|
||||
tileUpdateInterval?: number;
|
||||
center?: Coordinate;
|
||||
}
|
||||
|
||||
export default class LiveAtlasMapDefinition {
|
||||
@ -55,6 +56,7 @@ export default class LiveAtlasMapDefinition {
|
||||
readonly extraZoomLevels: number;
|
||||
readonly scale: number;
|
||||
readonly tileUpdateInterval?: number;
|
||||
readonly center?: Coordinate;
|
||||
|
||||
constructor(options: LiveAtlasMapDefinitionOptions) {
|
||||
this.world = options.world;
|
||||
@ -77,6 +79,7 @@ export default class LiveAtlasMapDefinition {
|
||||
this.extraZoomLevels = options.extraZoomLevels || 0;
|
||||
this.scale = (1 / Math.pow(2, this.nativeZoomLevels));
|
||||
this.tileUpdateInterval = options.tileUpdateInterval || undefined;
|
||||
this.center = options.center || undefined;
|
||||
}
|
||||
|
||||
locationToLatLng(location: Coordinate): LatLng {
|
||||
|
@ -132,6 +132,11 @@ export default class OverviewerMapProvider extends MapProvider {
|
||||
nativeZoomLevels,
|
||||
tileSize,
|
||||
}),
|
||||
center: {
|
||||
x: tileset?.center[0] || 0,
|
||||
y: tileset?.center[1] || 0,
|
||||
z: tileset?.center[2] || 0,
|
||||
}
|
||||
}));
|
||||
|
||||
this.mapMarkerSets.set(tileset.path, new Map());
|
||||
|
Loading…
Reference in New Issue
Block a user