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

175
Views
Detect when here map is done rendering

There is an issue with detecting when the map has rendered the markers.

I have added a listener to the 'render' event:

mapEngine.addEventListener('render', onRenderChange)

and wait for the event to return the map engine to know when the rendering is done as I have seen as an answer for a similar question here.

function onRenderChange(evt) {
    if (map.getEngine() === evt.target) {
        //render is done    
    }
}

The result is that the listener returns the map engine multiple times (about 40-45 times for the render of 200 markers and the number of times seems random with every refresh).

Furthermore, sometimes the map pauses the rendering for some time (1-2s) and then continues. This happens when rendering changes in existing markers (such as change a marker's position).

What is an accurate way of knowing when the map is done rendering?

I use the HERE maps API for JavaScript v3.0 in an angular project.

The icon is a single global SVG icon reused for all the markers. I have also tried with a PNG icon with the same results.

A group 'markersGroup' is added to the map when the map is initialized. The markers are being added to the map in bulk using:

    markersGroup.addObjects(markersToAdd);

where markersToAdd is an array of markers (H.map.Marker).

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Map JavaScript API 3.0 is deprecated. I would recommend using 3.1.

Typically, the map is rendered one time while adding a grouped objects. The 40-45 times for the render of a group of 200 markers looks unusual. Not sure if it is caused by Angular. Could you try JavaScript API 3.1? if the issue remains, please share the snippet codes.

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!