aboutsummaryrefslogtreecommitdiff
path: root/gmap_arcgis.js
diff options
context:
space:
mode:
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r--gmap_arcgis.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index dc22f17..aa17af4 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -40,6 +40,20 @@ function gmapArcgis(config) {
jQuery.blockUI();
},
+ // Count object properties
+ countProperties: function(object) {
+ // Doesn't work with IE8
+ //return Object.keys(layers).length;
+
+ var count = 0;
+
+ for (value in object) {
+ count++;
+ }
+
+ return count;
+ },
+
// Set the current map
setMap: function(map) {
this.map = map;
@@ -137,7 +151,7 @@ function gmapArcgis(config) {
}
// Callback only if layers is not empty
- if (Object.keys(layers).length > 0) {
+ if (self.countProperties(layers) > 0) {
params.identify.callback(layers, params.infowindow, err);
}
}