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

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

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 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