#13849·cesium

SCENE2D mouse-wheel zoom targets wrong location across wrapped map boundary

Author: willpaceCreated Sep 23, 2026Updated Sep 23, 2026
Labelstype - bugneeds triage

What happened?

In SceneMode.SCENE2D, mouse-wheel zoom can target the wrong location when interacting across the ±180° longitude wrap.

Instead of zooming toward the location under the cursor, the camera moves toward a different location on the horizontally wrapped map. Once the camera reaches the corresponding map copy, zoom-to-cursor begins working normally again.

I have created a sandcastle of which I have included the shared link, but if for some reason it doesn't work or has been purged from the system, the following is the minimal reproducible sandcastle:

const viewer = new Cesium.Viewer("cesiumContainer",
{
  sceneMode: Cesium.SceneMode.SCENE2D
}
);

viewer.entities.add({
  name: "180° Longitude",
  polyline: {
    positions: Cesium.Cartesian3.fromDegreesArray([
      180, -89,
      180, 89,
    ]),
    width: 3,
    material: Cesium.Color.RED,
    arcType: Cesium.ArcType.NONE,
  },
});

viewer.entities.add({
  name: "0° Longitude",
  polyline: {
    positions: Cesium.Cartesian3.fromDegreesArray([
      0, -89,
      0, 89,
    ]),
    width: 3,
    material: Cesium.Color.YELLOW,
    arcType: Cesium.ArcType.NONE,
  },
});

Zoom-to-cursor works normally on either side of the prime meridian when the interaction does not cross the ±180° wrap.

Expected behavior

Mouse-wheel zoom should zoom toward the geographic location under the cursor regardless of which horizontally wrapped copy of the map is visible.

Additional observations Camera.pickEllipsoid() returns the expected geographic position under the cursor even when the incorrect zoom occurs. The behavior appears specific to horizontal map wrapping in SCENE2D.

Reproduction steps

  1. Pan horizontally so the map wraps across ±180°.
  2. Position the viewport and cursor on opposite sides of the wrapped boundary.
  3. Mouse-wheel zoom toward the cursor.
  4. Observe that the camera moves toward a different map location instead of consistently zooming toward the cursor.

Sandcastle example

https://sandcastle.cesium.com/#c=tVJNT+MwFPwrTzkVFBy6XEpJK1CbW2klugIhzMHEj/ZpnefKdloF1P/Eb+CXrZK0fInDrlZ784xmPJrRo2JlXYBDUB5G6Kks4NHZAmSUN0hGZ5Il55Z9gDXhBh0MgHGzU4vrhuvs9SPLQRGjk1Es+VkygM+R8dJq7O898z0j5qNsmv0YS95KPmiS2gyBHCgQeqG07jTfsCqwDzLq9o5fX2BieUGh1NjkAKysqQwx9qER14SnQJb9W+pIuYCeFJ+IuuIYFw7RXzinqs5dawLo9o5jOOqdxp+IN3x/sHtsSIdlH052sFABHSnzHmaNdeIqG+8EyuU/q9X7BBctFtPZNGsk21jy9g8n+J8DfKn/D+Vvs8lkdvOX/aM4Sn2oDA5r8pza8yyd6QiRBCxWRgX0yUOZ/8Igcu/rydJkb0k1rYH04JtzhNwo7wcyeiyNmdMTymiYJprWn2zGKk28mK3RGVXVkmV3OGlJIUSaLLvfuIK15kG5Dz/+Bg

Environment

Browser: Google Chrome CesiumJS Version: 1.144 and 1.145 Operating System: macOS - Tahoe 26.5.2

AI acknowledgment

  • I used AI to generate this issue report.
  • (If the above is checked) I have reviewed the AI-generated content before submitting.