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

287
Vistas
HERE map.getcenter() returns 0

I'm using the geocoder platform to get the lat/lng of an address. I then set the map center to those coordinates.

However, when I call map.getCenter() afterwards, I only get 0 for lat, lng and alt. What could be the problem?

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

0

If you ask for map's center right after setting new center, you'll get the old (or better said current) one.

You should wait till the map's center is really updated or use mapviewchangeend event listener:

map.setCenter({lat:15,lng:16});

map.addEventListener('mapviewchangeend', (e) => {
  console.log(map.getCenter());
})
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