Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

155
Vistas
Offsetting Cesium zoom by pixels

In the UI we have a floating panel occupying the 30% - 40% percent of the screen width and we have a Cesium background map. The mock image below has dots. At the moment we can zoom the view, so that all dots are visible on the screen.

Cesium map with UI control mockup and example points

The logic is simple, we just find the top-left and bottom-right corners of the rectangle that covers all points.

const topLeft = Cartographic.fromDegrees(
  flyTo.minLongitude,
  flyTo.minLatitude,
  0,
)
const bottomRight = Cartographic.fromDegrees(
  flyTo.maxLongitude,
  flyTo.maxLatitude,
  0,
)
const rectangle = Rectangle.fromCartographicArray([topLeft, bottomRight])
viewer.camera.flyTo({
  destination: rectangle,
  duration: flyTo.duration ? flyTo.duration : 0.1,
})

The problem is that the points are under UI controls. We would like to offset the zoom, so that instead of zooming to the center of the screen it would zoom all points to be visible on the right side.

Consider having only a single point. In the current implementation, it would be under the UI controls, but this is what we try to achieve.

Cesium map with point on the right side of the screen

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda