nickcam / FlareClusterLayer

ArcGIS javascript custom graphics layer. Create clusters...with flares.
https://flareclusterlayer.azurewebsites.net/index_v4.html
MIT License
134 stars 51 forks source link

flareCluster displaced when map is not full body, and after pan #4

Closed tdimanov closed 8 years ago

tdimanov commented 8 years ago

Hi nickcam,

thanks for your cluster extension. I tried to used it in map instance which is not 100% of the body span. I noticed flareCluster has been displaced from the cluster group center on mouseover. I'm attaching screenshot of that. Thanks in advance for your input on that issue.

screen shot 2016-04-14 at 10 07 51 am
tdimanov commented 8 years ago

I actually resolved the problem by modifying FlareClusterLayer.js (lines 909, 910) this way: pt.x = fo.center.x - mapDivLeft; pt.y = fo.center.y - mapDivTop;

where mapDivLeft and mapDivTop were previously defined as: var mapDivLeft = $("#map").offset().left; var mapDivTop = $("#map").offset().top;

I'm sure there is more elegant solution. Thanks for your work!

nickcam commented 8 years ago

Good stuff, glad to hear you sorted it and thanks for the fix. I'll close this issue and incorporate it into a new version at some stage. Thanks, Nick