Skip to content

TilingScheme: Add support for variable tiles splitting#1447

Merged
gkjohnson merged 1 commit intomasterfrom
maptiles-update
Jan 16, 2026
Merged

TilingScheme: Add support for variable tiles splitting#1447
gkjohnson merged 1 commit intomasterfrom
maptiles-update

Conversation

@gkjohnson
Copy link
Contributor

@gkjohnson gkjohnson commented Jan 16, 2026

  • Add support for variable tile splitting (variable number of children per child layer)
  • Fix DebugTilesPlugin not respecting an initial "enabled" flag

TODO

  • Consider how this kind of variable tiling can be specified at the user level
    • Possibly a custom-tiled image source? Or allow more flexible parameters to XYZImageSource?

Required for loading this data set which contains a variable number of splits per tile, stored in child kml tiles:

// modifications made to XYZImageSource
tiling.setProjection( new ProjectionScheme( 'EPSG:4326' ) );
tiling.setContentBounds( ...tiling.projection.getBounds() );
tiling.setLevel( 1, {
	tileCountX: 4,
	tileCountY: 2,
	tileSplitX: 3,
	tileSplitY: 3,
} );

tiling.setLevel( 2, {
	tileCountX: 4 * 3,
	tileCountY: 2 * 3,
	tileSplitX: 3,
	tileSplitY: 3,
} );

tiling.setLevel( 3, {
	tileCountX: 4 * 3 * 3,
	tileCountY: 2 * 3 * 3,
	tileSplitX: 5,
	tileSplitY: 5,
} );

tiling.setLevel( 4, {
	tileCountX: 4 * 3 * 3 * 5,
	tileCountY: 2 * 3 * 3 * 5,
	tileSplitX: 2,
	tileSplitY: 2,
} );

tiling.setLevel( 5, {
	tileCountX: 4 * 3 * 3 * 5 * 2,
	tileCountY: 2 * 3 * 3 * 5 * 2,
	tileSplitX: 2,
	tileSplitY: 2,
} );

tiling.setLevel( 6, {
	tileCountX: 4 * 3 * 3 * 5 * 2 * 2,
	tileCountY: 2 * 3 * 3 * 5 * 2 * 2,
	tileSplitX: 2,
	tileSplitY: 2,
} );

@gkjohnson gkjohnson added this to the v0.4.20 milestone Jan 16, 2026
@gkjohnson gkjohnson merged commit 14a533e into master Jan 16, 2026
1 check passed
@gkjohnson gkjohnson deleted the maptiles-update branch January 16, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant