Adding infobubble on shape click, performance with many markers/shapes
Hey, I got a couple of questions.
First up, I need to add a info bubble when a shape is clicked. I noticed that a click on a shape does not register as a map click, but does register as a canvas click. I could probably make a shape click handler out of that, but I thought, there must be a more logical way. All suggestions are welcome!
Secondly, the same project requires a lot of shapes and poi's. I noticed the performance of the maps api did not really deteriorate (at least, not with 600+ shapes and poi's). The only performance problem i noticed was when loading in the shapes. That made the map unresponsive for a while. But back to my question, should I make a function that removes poi's and shapes from the dom and adds them again when they are in view, or does the mh5 framework handle this properly already?
Thanks in advance!
Re: Adding infobubble on shape click, performance with many markers/shapes
Hi,
1) try to use "shapeclick" listener.
2) POis and shapes are not dom elements. They are drawn on the canvas.
Br,
Leo
Re: Adding infobubble on shape click, performance with many markers/shapes
A shapeclick event listener makes a lot more sense. It is not listed in the api reference though ([url]http://developer.here.net/search-results?criteria=shapeclick[/url]). Thanks for the help!