From 984cd6bcc524a516ee98a91fef470bf368b65499 Mon Sep 17 00:00:00 2001 From: bozdoz Date: Wed, 26 May 2021 11:46:27 -0300 Subject: [PATCH] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec89efd..65a59b5 100644 --- a/README.md +++ b/README.md @@ -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];