aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2015-11-27 18:02:52 -0200
committerSilvio <silvio@socioambiental.org>2015-11-27 18:02:52 -0200
commit3bcf7d30f78f88f701cf70ced77917534a3f613a (patch)
tree20a6bea120c836d4091b6910bbd6470108f6de08
parenta02b0977d7096d989266d2b65ac633bf81cd1e8b (diff)
downloadgmap_arcgis_js-3bcf7d30f78f88f701cf70ced77917534a3f613a.tar.gz
gmap_arcgis_js-3bcf7d30f78f88f701cf70ced77917534a3f613a.tar.bz2
Abort if empty resultset on addMarkers
-rw-r--r--gmap_arcgis.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index 9e59f15..e695e9c 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -365,6 +365,12 @@ function gmapArcgis(config) {
function processResultSet(fset) {
var fs = fset.features;
var title;
+
+ // Abort if empty resultset
+ if (fs == undefined) {
+ return;
+ }
+
for (var i = 0, c = fs.length; i < c; i++) {
var feature = fs[i];