Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!