Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bozdoz authored May 26, 2021
1 parent d99c6b4 commit 984cd6b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,15 @@ function fs_leaflet_loaded() {
return;
}

// iterate any of these: `maps`, `markers`, `markergroups`, `lines`, `circles`, `geojsons`
// iterate any of these arrays: `maps`, `markers`, `lines`, `circles`, `geojsons`
var maps = window.WPLeafletMapPlugin.maps;

// Note: `markergroups` is an *object*. If you'd like to iterate it, you can do it like this:
// var markergroups = window.WPLeafletMapPlugin.markergroups;
// var keys = Object.keys(markergroups);
// for (var i = 0, len = keys.length; i < len; i++) {
// var markergroup = markergroups[keys[i]];
// }

for (var i = 0, len = maps.length; i < len; i++) {
var map = maps[i];
Expand Down

0 comments on commit 984cd6b

Please sign in to comment.