Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

291
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda