I am currently developing a PWA using vueJs and I would like to know how to get the rendering state of a specific layer in HERE Map.
I read a post about a similar issue where a HERE developer suggested a solution. However, the rendering message is triggered more than once as I have multiple things to render (layers, clusters, etc...).
I would like to use the RenderState function that I found in the documentation, which can tell me the rendering state of a specific layer (PENDING, ACTIVE or DONE).
Unfortunately, I don't know how to link it with my map and get the information I need. The only thing I could achieve is by writing H.map.render.RenderState
, but I couldn't link it to any of my layers or my map.
The renderstate API supports Enums values for a layer, like ACTIVE - when the data loading is in progress for a layer, PENDING and ACTIVE likewise.
I am quoting here an example when there is a need to add DOMLAYER and return a response one the rendering completes.
This is one of the way layer can be linked with the state or with the switch cases(what actions need to be taken when the state returned is one of the following)
map.addLayer(new H.map.layer.DomLayer(function(element, renderParams) {
element.innerHTML =
"<div style='position:absolute;top:50px;left:50px;color:red'>" +
"Zoom: " + renderParams.zoom + ", Bounding Box Center: " + renderParams.boundingBox.getCenter() +
"</div>"
return H.map.render.RenderState.DONE;
}));