This page renders the in-world region layout using only data from the OpenSim regions table and the shared site theme. It is designed to be portable (no external APIs, no Google Maps) and to work both in a normal browser and inside in-viewer web tabs.
-
Centering
- By default, the map centers on
MAP_CENTER_X/MAP_CENTER_Yfromconfig.php, or falls back to(1000,1000). - The user can override the center with the query parameters
?cx=<int>&cy=<int>. - If
?region=<Region Name>is provided andcx/cyare not set, the map recenters on the grid coordinates of that region.
- By default, the map centers on
-
Window size
- The view size is controlled by
w×h(tiles) via query parameters or the form on the page. - Defaults are taken from
MAP_TILES_X/MAP_TILES_Yif defined, otherwise32 × 32.
- The view size is controlled by
-
Varregions
- Regions larger than
256×256are treated as variable regions. - Each varregion is expanded into multiple tiles in the occupancy grid so the entire area is shown.
- When a user arrives via
?region=..., the entire varregion is highlighted (all tiles with the same RegionUUID), not just a single 256×256 tile.
- Regions larger than
-
Tile colours
- Colours are theme-aware and can be overridden in
config.php:MAP_COLOR_OPENSPACE/OPENSPACE_COLOR– openspace regionsMAP_COLOR_HOMESTEAD/HOMESTEAD_COLOR– homestead regionsMAP_COLOR_STANDARD/MAP_COLOR_SINGLE– standard regionsMAP_COLOR_VAR/VARREGION_COLOR– varregionsMAP_COLOR_FREE/FREI_COLOR– empty tilesMAP_COLOR_CENTER/CENTER_COLOR/HIGHLIGHT_COLOR– centre / highlight colour
- Colours are theme-aware and can be overridden in
-
Visual polish
- Subtle background grid behind the map tiles to make the layout feel more “map-like”.
- Centre tile is slightly scaled up and outlined for easier orientation.
- When
?region=...is present, all tiles belonging to that region get a highlight border.
-
Hover details panel
- Beneath the legend there is a Region details card.
- Hovering any non-empty tile updates the card with:
- Region name
- Grid coordinates
- Region size (in metres)
- Region type (standard / var / homestead / openspace)
- Teleport link (
secondlife://orhop://), which can be opened in a viewer.
- On first load, the card prefers the centre region (if present), otherwise the first populated tile.
-
Pan and zoom controls
- The numeric inputs for
Center X,Center Y,Width, andHeightstill work as before. - New buttons use lightweight JavaScript to adjust the form values and submit:
- Arrow buttons pan the map by one tile in the chosen direction.
- “Zoom in” and “Zoom out” change both width and height together.
- This is a progressive enhancement; if JavaScript is disabled, the map still works with manual input + “Update view”.
- The numeric inputs for
-
Legend
- The legend card explains all tile colours:
- Openspace, Homestead, Standard, Variable, Free, and Grid Center.
- Colours are derived from the same config constants as the tiles, so theme changes are reflected automatically.
- The legend card explains all tile colours:
-
Teleport-safe behaviour
- Region tiles remain
<a>elements pointing at the appropriatesecondlife://orhop://URL. - JavaScript only listens to hover events for details; clicks are untouched so existing teleport behaviour is preserved.
- Region tiles remain
These are intentionally not implemented yet, but the file is structured so they could be added later without breaking the current design:
worldmap.phpusing a library such as Leaflet to provide a more traditional “slippy” world map, backed by existing map tiles.- Optional filter controls (e.g. show only online regions, only certain types).
- Integration of live user counts or region status if/when APIs are available.
- Optional link-outs from the map to destination listings or classifieds for the selected region.
For now, gridmap.php remains a lightweight, fully self-contained world map that respects the existing theme and configuration while offering a clearer, more informative view of the grid.