Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ markers.on('clusterclick', function (a) {

These methods extract non-group layer children from Layer Group types, even deeply nested. _However_, be noted that:
- `chunkProgress` jumps backward when `addLayers` finds a group (since appending its children to the input array makes the total increase).
- Groups are not actually added into the MarkerClusterGroup, only their non-group child layers. Therfore, `hasLayer` method will return `true` for non-group child layers, but `false` on any (possibly parent) Layer Group types.
- Groups are not actually added into the MarkerClusterGroup, only their non-group child layers. Therefore, `hasLayer` method will return `true` for non-group child layers, but `false` on any (possibly parent) Layer Group types.

If you are removing a lot of markers it will almost definitely be better to call `clearLayers` then call `addLayers` to add the markers you don't want to remove back in. See [#59](https://github.com/Leaflet/Leaflet.markercluster/issues/59#issuecomment-9320628) for details.

Expand Down
2 changes: 1 addition & 1 deletion example/old-bugs/setView-doesnt-remove.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div id="map"></div>
<button id="doit">setView</button><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/63">#63</a>. Zoom down on the very left side untill markers are visible. Click the button. Scroll to the left in one go, those markers should be in clusters but the actual markers will still be visible.</span><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/63">#63</a>. Zoom down on the very left side until markers are visible. Click the button. Scroll to the left in one go, those markers should be in clusters but the actual markers will still be visible.</span><br/>
<span id="time"></span>
<script type="text/javascript">

Expand Down
4 changes: 2 additions & 2 deletions example/remove-geoJSON-when-spiderfied.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<div id="map"></div>
<button id="doit">Remove marker #1</button><button id="doit2">Remove marker #2</button><br/>
<span>New Bug. Spiderfy the cluster then click the button #1. All markers disapear, but it should remain marker #2.</span><br/>
<span>New Bug. Spiderfy the cluster then click the button #2. All markers disapear, but it should remain marker #1.</span><br/>
<span>New Bug. Spiderfy the cluster then click the button #1. All markers disappear, but it should remain marker #2.</span><br/>
<span>New Bug. Spiderfy the cluster then click the button #2. All markers disappear, but it should remain marker #1.</span><br/>

<script type="text/javascript">

Expand Down
4 changes: 2 additions & 2 deletions spec/sinon.js
Original file line number Diff line number Diff line change
Expand Up @@ -3460,7 +3460,7 @@ if (typeof module == "object" && typeof require == "function") {
/**
* The Sinon "server" mimics a web server that receives requests from
* sinon.FakeXMLHttpRequest and provides an API to respond to those requests,
* both synchronously and asynchronously. To respond synchronuously, canned
* both synchronously and asynchronously. To respond synchronously, canned
* answers have to be provided upfront.
*
* @author Christian Johansen ([email protected])
Expand Down Expand Up @@ -3674,7 +3674,7 @@ if (typeof module == "object" && typeof require == "function") {
* Add-on for sinon.fakeServer that automatically handles a fake timer along with
* the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery
* 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,
* it polls the object for completion with setInterval. Dispite the direct
* it polls the object for completion with setInterval. Despite the direct
* motivation, there is nothing jQuery-specific in this file, so it can be used
* in any environment where the ajax implementation depends on setInterval or
* setTimeout.
Expand Down
2 changes: 1 addition & 1 deletion src/MarkerCluster.Spiderfier.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ L.MarkerClusterGroup.include({
this._map.getRenderer(this);
//Needs to happen in the pageload, not after, or animations don't work in webkit
// http://stackoverflow.com/questions/8455200/svg-animate-with-dynamically-added-elements
//Disable on touch browsers as the animation messes up on a touch zoom and isn't very noticable
//Disable on touch browsers as the animation messes up on a touch zoom and isn't very noticeable
}
},

Expand Down
4 changes: 2 additions & 2 deletions src/MarkerClusterGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ export var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({
};

if (layer._icon && this._map.getBounds().contains(layer.getLatLng())) {
//Layer is visible ond on screen, immediate return
//Layer is visible and on screen, immediate return
callback();
} else if (layer.__parent._zoom < Math.round(this._map._zoom)) {
//Layer should be visible at this zoom level. It must not be on screen so just pan over to it
Expand Down Expand Up @@ -1393,7 +1393,7 @@ L.MarkerClusterGroup.include({
//Force a browser layout of stuff in the map
// Should apply the current opacity and location to all elements so we can update them again for an animation
_forceLayout: function () {
//In my testing this works, infact offsetWidth of any element seems to work.
//In my testing this works, in fact offsetWidth of any element seems to work.
//Could loop all this._layers and do this for each _icon if it stops working

L.Util.falseFn(document.body.offsetWidth);
Expand Down