Repository navigation
Conversation
This allows earth servers in particular to view the whole map on a webpage. Without this large maps cannot be seen in their entirety Changes: Allow the map to zoom out past native zoom 0 so large worlds fit on screen. Default remains 0 (current behaviour). - WorldConfig: map.zoom.extra-out (int, default 0) - Publish zoom.extra_out in world settings JSON - Frontend: setMinZoom / tile layer minZoom from extra_out 2) Add right-click context menu (zoom and copy coordinates) Right-click on the map opens a small menu: - Zoom in / zoom out around the cursor - Copy coordinates as "X Z" (clipboard) - Copy coordinates as "X 150 Z" for easy /tp paste Coordinates use spaces (no commas) so they paste cleanly into Minecraft commands. Menu closes on pan, zoom, click, Escape, or outside click. Many players use the map to get TP Coords 3) Render Minecraft & colour/format codes in marker popups and tooltips Towny and similar plugins often put &-codes in town/nation names. Convert those codes to inline-styled HTML when building marker popup/tooltip content. White (&f) is rendered as black so text stays readable on the light popup background. Codes absent from a string are a no-op.
merge upstream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small, independent frontend/config improvements that are useful on large survival maps and with Towny-style markers, added to the very latest version of squaremaps
1. Extra zoom-out (
map.zoom.extra-out)Native zoom 0 is often not far enough out for a whole world. This adds an optional number of extra zoom-out levels (default
0= no change).Config (per world):
2. Right-click context menu
X ZorX 150 Zto the clipboard (spaces, paste-friendly for/tp)3. Minecraft colour codes in marker popups/tooltips
Parses
&colour/format codes in popup and tooltip HTML (common for Towny town/nation names). White is forced to black for contrast on the default popup background.Notes
Test plan
extra-outunset /0extra-out: 2, confirm zoom out past native 0 and tiles still load&cRed &fWhitein tooltip/popup shows styled text; white readable on popup