Skip to content

fix: add new optimized centering and zoom for countries data prop to …#780

Merged
mcstover merged 2 commits intomainfrom
fix-cit-kv-map-zoom-optimization-option
Feb 27, 2026
Merged

fix: add new optimized centering and zoom for countries data prop to …#780
mcstover merged 2 commits intomainfrom
fix-cit-kv-map-zoom-optimization-option

Conversation

@mcstover
Copy link
Collaborator

…KvMap. Does what it says in the prop description and adds tested utility methods that can probably be used independently

  • Automatically compute optimal map center and zoom level based on countriesData distribution.
  • This is an alternative to setting lat/long/zoomLevel directly.
  • Requires: countriesData prop must contain data with lat/long coordinates.
  • Note: Explicit lat/long props will override the computed center when provided.
  • When enabled, zoomLevel prop is ignored in favor of the computed optimal zoom.

Single Country:
image

Countries Close to one another:
image

@mcstover mcstover requested review from a team and eddieferrer February 27, 2026 00:23
@mcstover mcstover merged commit a1fa048 into main Feb 27, 2026
5 checks passed
@mcstover mcstover deleted the fix-cit-kv-map-zoom-optimization-option branch February 27, 2026 16:24
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.

3 participants