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

310
Vistas
Is there an ArcGis Javascript setting or function to center map around a popup?

The problem I'm encountering is that if an ArcGis map is sufficiently small in height (around 400px or so), when you click on a point near the top the popup does not fit in the view (pictured below):

Image of popup going outside the view

1

I was wondering if there was some way to have the map/view center around the popup, where it would look something like this:

Image of popup if it was centered

2

I tried looking at the documentation first but didn't see anything that looked like it would solve my problem.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

By default, the popup should pop "up" or "down" as appropriate to fit within the view. But if the height isn't very tall and/or the popup is tall, you could still experience it "cut-off".

As an alternative, you can "dock" the popup in a corner or at the bottom/top using the Popup dockOptions. For example, for a typical mobile case, the popup usually ends up "docked" at the bottom of the screen.

You can do something similar when the view is not very tall. In this example, if the map view is less than 400px tall, show the popup in the top right corner.

  const view = new MapView({
    container: "viewDiv",
    map: map,
    popup: {
      dockOptions: {
        position: "top-right",
        breakpoint: {height:400}
      }
    }
  });

Or if you want it to always show in the corner:

  const view = new MapView({
    container: "viewDiv",
    map: map,
    popup: {
      dockEnabled: true,
      dockOptions: {
        position: "top-right",
        breakpoint: false
      }
    }
  });
about 4 years ago · Juan Pablo Isaza Denunciar
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