aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-04-03 16:33:21 -0300
committerSilvio <silvio@socioambiental.org>2013-04-03 16:33:21 -0300
commit0b8f1acba94861848c92589831df2bea8d39ac86 (patch)
tree3cce463ebda623f24bef0ddd7c2f18e07d528f35
parent3d2768b6156b593acb1127b6489eb7961a5f25cf (diff)
downloadgmap_arcgis_js-0b8f1acba94861848c92589831df2bea8d39ac86.tar.gz
gmap_arcgis_js-0b8f1acba94861848c92589831df2bea8d39ac86.tar.bz2
Identify: Callback only if layers is not empty
-rw-r--r--gmap_arcgis.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index e58bae4..9a9b4db 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -109,8 +109,10 @@ function gmapArcgis(config) {
}
}
- // Callback
- params.identify.callback(layers, params.infowindow, err);
+ // Callback only if layers is not empty
+ if (layers.toSource() !== "({})") {
+ params.identify.callback(layers, params.infowindow, err);
+ }
}
});
});