Commit Graph
226 Commits
Author SHA1 Message Date
danzel 10b91f8ad4 More tests and more making them work 2013-06-22 10:47:10 +12:00
danzel d032b53fea Fix places we were looping over this._layers to use this._featureGroup.eachLayer instead. Fixes child markers not being added to the map. 2013-06-21 16:55:38 +12:00
danzel cbe92f1468 Support adding random things to the MarkerClusterGroup. Don't try to to cluster them. Refs #195 2013-06-21 16:41:56 +12:00
danzel d47a3140ca Refactor to contain a FeatureGroup rather than sort of being one. Fixes all the _noHas hacks. Now we require leaflet 0.5 however. 2013-06-21 16:14:47 +12:00
danzel 9d9fde91aa More whitespace fixes 2013-06-21 15:15:55 +12:00
danzel 8807a0c3a2 White space formatting and make sure we don't hit null if the parent isn't visible. 2013-06-21 15:15:01 +12:00
Thierry Nicola 4d3c964172 #123 adding getVisibleParent for Marker
(cherry picked from commit da2952d57bdab7af998ab480200c38212cbc662e)
2013-06-21 15:12:32 +12:00
danzel 9f0819706e Another noHas hack, fixes spiderfy in IE 2013-06-19 10:15:58 +12:00
danzel 04b71ed450 Add factory method and use them everywhere. Fixes #21 2013-06-14 17:08:22 +12:00
danzel 9152c2aaba Another _noHas hack to fix removing layers. 2013-06-14 16:22:34 +12:00
danzel 0394227f49 Fix lots of bugs with using CircleMarker/Circle as children. Fixes #189 Fixes #148 2013-06-14 15:49:01 +12:00
danzel 1440b56b4e More _noHas hacks. Will work around this properly at some stage, fixes #60 again. 2013-06-14 14:15:34 +12:00
danzel b11665eb83 Replace all build scripts with latest ones from leaflet. Add a package.json 2013-06-14 10:56:53 +12:00
danzel e0846ced2d Don't break if calling hasLayer with null. Fixes #170. Thanks @l0c0luke 2013-05-10 09:36:15 +12:00
danzel e7e1d5391f Fix #160
If we are added to the map, then removed, then a marker is removed from us. Previously that marker wouldn't be removed, now it is when we get re-added to the map.
2013-04-26 09:58:40 +12:00
danzel dcbaabe234 Remove hasProperty checks from loops. Refs leaflet/leaflet#1606 2013-04-24 10:48:00 +12:00
danzel 890406abd6 Fix clearLayers with spiderfied markers. Refs #162 2013-04-24 10:44:46 +12:00
danzel ef4227dcd2 Make this work on old leaflet too. Thanks @nkovacs 2013-04-24 10:08:20 +12:00
danzel 47c147d9a9 Cludge around our hasLayer implementation to make us work with the latest Leaflet master. Fixes #159
Our hasLayer returns true when we contains a marker. FeatureGroup/LayerGroup (which we inherit from) now check hasLayer when addLayer is called. At this stage our hasLayer will return true, stopping the marker from ending up on the map.
2013-04-22 09:31:10 +12:00
danzel 6276021bd9 Fix some warnings from new uglify 2013-04-15 10:11:49 +12:00
danzel 4883316d19 Add MarkerCluster.getBounds 2013-04-10 09:05:20 +12:00
danzel 1eea835251 Fix whitespace 2013-04-10 09:05:19 +12:00
danzel 828bb3e2d6 Fix not firing animationEnd when we have only one marker in the markerClusterGroup. Fixes #146 2013-04-10 09:05:19 +12:00
danzel 542fc622b6 Reduce all animation timers to 200ms instead of 250ms so that they happen within the space of a leaflet zoom. Fixes #140 more details on there. 2013-03-01 14:15:34 +13:00
Christopher Lakey 17846a97c4 Removed Trailing whitespaces 2013-02-23 21:26:39 -05:00
Wildhoney 604c2e25e1 Removed library files 2013-02-12 09:19:43 +13:00
Wildhoney ed311ad5f4 Added an option (removeOutsideVisibleBounds) to prevent removing clusters that are deemed to be outside of the visible bounds. Fixes #103 2013-02-12 09:19:43 +13:00
danzel 0e92b6622a Don't show the coverage of spiderfied MarkerClusters because it will be wrong. Fixes #95 2013-02-01 10:57:29 +13:00
danzel 1566118ac5 Make us not crash if we have a spidified cluster and it has a marker added to it. Fixes #114 bug 2 2013-01-09 11:21:59 +13:00
danzel 4afda973fc Fix #114 bug 1. 2013-01-09 11:21:58 +13:00
danzel 46ca075ccb Fix map.removeLayers(MCG) not doing anything. Thanks Driklyn. Fixes #108 2012-12-21 15:01:13 +13:00
danzel e86afca04a Fix clearLayers not unsetting __parent of the markers, preventing them from being re-added. Fixes #99 2012-12-06 13:42:27 +13:00
danzel 73ae0e9a9b Redo eachChildLayer, turns out with a bit of love we can override eachLayer, yay :)
Refs #102
2012-12-06 13:16:45 +13:00
danzel 13e71f5a85 Add eachChildLayer, an eachLayer implementation. We cannot override eachLayer as we have different behaviour. Doing so makes us add all makers to the map always which is dumb :(
Fixes #102
2012-12-06 09:47:31 +13:00
danzel bb92b17b20 Add options.spiderfyDistanceMultiplier, allows making spiderfied markers go futher away. Fixes #100 2012-12-05 11:28:54 +13:00
danzel f875421fc4 Fix up some bugs that happen when removing and adding a MarkerClusterGroup from the map.
Was leaving layers in _layers which meant they'd get added again when we were re-added. Wasn't unbinding our events from almost anything.
Fixes #94
2012-11-22 17:05:44 +13:00
danzel 9fb345543a Handle removeLayers([]) where some elements aren't in the MarkerClusterGroup 2012-11-14 09:58:22 +13:00
danzel 17f32ab1f8 When initially adding layers, skip layers that are already added. Fixes adding the same layer multiple times before adding the MarkerClusterGroup to the map. Refs #44 2012-11-09 15:53:21 +13:00
danzel ef2a51235e Unset layer.__parent in removeLayers as well as removeLayer. Refs #44 2012-11-01 09:45:04 +13:00
danzel bef1dbb33e Feature Detect SVG Animation and only use it if available. IE10 does not support it. Fixes #86 2012-11-01 09:32:51 +13:00
danzel 341c607c1b Tidy ups from merged commits 2012-10-19 10:16:39 +13:00
Duncan Parkes 5719cb94ff Fix issue #79.
When a MarkerClusterGroup has been on a map, but isn't any longer,
we still need to clear out its markers.
(cherry picked from commit 2a90a86326aee1afd0392efd019d9cdb3f6dd0d0)

Conflicts:

	dist/leaflet.markercluster.js
2012-10-19 10:14:31 +13:00
Duncan Parkes 1f09009349 Fix addLayers not working with singleMarkerMode.
(cherry picked from commit 02c75f164f1bb85f61329e0f3e89b0dc527301ee)

Conflicts:

	dist/leaflet.markercluster.js
2012-10-19 10:12:51 +13:00
danzel e3ca8eb153 Correct getBounds when not on the map 2012-10-19 10:07:42 +13:00
danzel ae3c859e65 Implement getBounds explicitly so it actually works. Thanks @2803media for reporting. Fixes #84 2012-10-19 09:32:40 +13:00
danzel 89d2236917 Remove __layer property on markers that are removed, otherwise on re-adding them we'll assume they are already added. Woops! 2012-10-17 15:16:27 +13:00
danzel 7eaef8530a Replace _getExpandedVisibleBounds with lat/lng diff implementation as provided by andersarstrand in #74. Should improve behaviour with custom projections 2012-10-17 09:49:35 +13:00
danzel 1cc375d324 Make removeLayers when not on the map a bit less wasteful 2012-10-11 10:45:16 +13:00
danzel 8432f0e7c2 Remove skipDuplicateAddTesting (as hasLayer is now efficient!). Make hasLayer work when we haven't been added to the map yet 2012-10-11 10:23:10 +13:00
danzel d5a7fd003b Comments 2012-10-11 10:06:50 +13:00