Skip to content

Globe: eastern hemisphere stops rendering at the prime meridian for some sources (pole-centred view, zoom 1.0–1.6) #8043

Description

@ragnarwestad

Describe the bug

With the globe projection, a camera centred near a pole (e.g. [0, -75]) at low zoom renders only the western hemisphere for some sources: everything east of the prime meridian is missing for a raster source and for a GeoJSON line layer, while other GeoJSON layers on the same map (and even a sibling layer on the same source) render on both sides. The cut is exactly at the 0° meridian — the tile column boundary.

The artefact appears between roughly zoom 1.0 and 1.6 (any pitch 0–30) and disappears from zoom 2.0. Panning/tilting through the range makes affected layers pop in and out at the meridian.

Reproduced identically on 5.24.0 and 6.0.0 (same scripted camera sweep, same 10-of-24 broken poses), so this appears long-standing rather than a 6.0 regression; the 6.0 coveringTiles improvements don't cover it. Verified in Chrome 138 on macOS (Apple Silicon) and in Chrome on Android 16.

Steps to reproduce

Self-contained page (also breaks with maplibre-gl@5.24.0):

<!doctype html>
<meta charset="utf-8" />
<script type="module">
  import * as maplibregl from "https://cdn.jsdelivr.net/npm/maplibre-gl@6.0.0/dist/maplibre-gl.mjs";
  document.body.innerHTML = '<div id="map" style="position:fixed;inset:0"></div>';
  const circle = [];
  for (let lng = -180; lng <= 180; lng += 1) circle.push([lng, -66.56]);
  const map = new maplibregl.Map({
    container: "map",
    center: [0, -75],
    zoom: 1.3,
    pitch: 15,
    style: {
      version: 8,
      projection: { type: "globe" },
      sources: {
        carto: {
          type: "raster",
          tiles: ["https://basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png"],
          tileSize: 256,
        },
        line: {
          type: "geojson",
          data: { type: "Feature", geometry: { type: "LineString", coordinates: circle } },
        },
      },
      layers: [
        { id: "carto", type: "raster", source: "carto" },
        { id: "circle", type: "line", source: "line",
          paint: { "line-color": "#ef8f3c", "line-width": 3 } },
      ],
    },
  });
</script>

Load it: the raster and the orange latitude circle render only west of 0°. Change zoom to 2.0: both render fully. A pixel count over a screenshot of the page above gives 289 orange samples west of the screen centre and 0 east.

Expected behavior

All sources render on both sides of the prime meridian — the visible hemisphere should not depend on the tile column.

Additional context

  • Scripted sweep: pole-centred poses (centre [0, -75] and [0, -90]) × zoom 1.0/1.3/1.6/2.0 × pitch 0/15/30 — 10 of 24 poses lose one side entirely; every zoom-2.0 pose is fine. Identical results on 5.24.0 and 6.0.0.
  • In a full app the pattern is source-dependent: a CARTO raster source and a filter-driven line layer lose the eastern half, while a fill layer on another GeoJSON source — and even the base line layer on the same source as the broken filtered one — render fine. This suggests per-source tile retention/culling rather than a uniform frustum decision.
  • Possibly related to the symptoms in Globe: Flickering and missing layers when panning/zooming #5025 (closed pre-5.0).

maplibre-gl-js version

5.24.0 and 6.0.0

Browser and OS

Chrome 138 / macOS 15 (Apple Silicon); Chrome / Android 16

Metadata

Metadata

Assignees

No one assigned

    Labels

    need more infoFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions