ThinkGeo.com    |     Documentation    |     Premium Support

How to splay pushpins and labels to prevent overlap

What's the best way to splay both pushpins and labels to prevent overlap? If I have two points that are adjacent, positioning the symbols (such as a pushpin) and the labels for the symbols, can often overlay each other. I would like to detect when symbols and labels overlap, and offset the overlap. Any thoughts?



Gregory,


This is a bit complicated. Generally we need to get the distance between the points and if it is smaller than a threshold, we then offset the pushpins and if not, we just show it as normal. Here we create a simple sample for you showing you the idea how to do it, hope this is helpful.



Thanks,


Ben



1999-SplayPushPins.zip (12.7 KB)

Thanks! I will give it a try!



You are welcome. Let us know if we can be of any additional assistance.