JamieH79


Hi,

I have just started migrating my code to use VEShape (instead of VEPushpins) as this seems the right thing to do moving forward. The one thing I have noticed is that when I zoom in and out a PushPin remains drawn at all times, but the VEShape seems to flicker (it looks like it is removed from the map and re-added). This visual effect is not very desirable and looks a bit odd in my application. Is there any way to resolve this or is this just a "feature" of VEShapes

Thanks for any help,

Jamie




Re: VEPushpin vs VEShape

RobertoRaimondo


Hi Jamie,

I haven't noticed that this was happening on zoom in/zoom out as well, but if you try to move the pushpin on the map visible border, you will notice that the pushpin image disappear just after the hook point is over the border, because the image is actually removed. Maybe the same is happening not only on pan, but on zoom as well.

Moreover when you drag the map, a pushpin that was outside the boundary and that now gets back visible, will be drawn only "on mouse up", which is something I don't really like...

There is another interesting thing. Suppose you use a custom icon, and you want to modify it by directly accessing the HTML element that represents it. When the shape goes out of the map and then comes back visible, you will see the original shape, and not the modified one. The only way would be to call SetCustomIcon again. This should confirm that VE saves icon information somewhere, and use it to redraw it when needed, after removing it. If you simply modify the HTML element you will see the changes, but VE will not save them, and so they will get lost after the first redraw is necessary.

Unfortunately I cannot suggest you how to fix this
Roberto.





Re: VEPushpin vs VEShape

JamieH79

Hi Roberto,

Thanks for your feedback. I have experimented a bit more and I don't know if it's my imagination or not but the map seems to get slower when adding 100 VEShapes vs 100 VEPushPins. I think I might just stick to using Pushpins for the time being as they work ok and seem to give better performance.

Regards,

Jamie






Re: VEPushpin vs VEShape

RobertoRaimondo

Sure you can, Jamie, but keep an eye open on the new way to create shapes, and try to make your code "flexible" so you can easily switch to the new version later on. The new shape system is extremely powerful, and I am sure that this will soon be improved even more, so you'll have to be ready for that moment, to make a painless transition to V6+!
However for what I recall, my V5 tests showed that the new shapes were faster than in V4, but I am not really sure about that, so I may be wrong...

Roberto.