aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2014-06-18 17:05:17 -0300
committerSilvio <silvio@socioambiental.org>2014-06-18 17:05:17 -0300
commit0a2e0d1defe569dd5ab986ab1a4527279f653946 (patch)
tree37b3a9e40ba169583679ea97e940fe7605796078
parent6f393e84f23c6627f3f0e080f9f84509c2fa3d18 (diff)
downloadgmap_arcgis_js-0a2e0d1defe569dd5ab986ab1a4527279f653946.tar.gz
gmap_arcgis_js-0a2e0d1defe569dd5ab986ab1a4527279f653946.tar.bz2
Removing trailing spaces
-rw-r--r--gmap_arcgis.js38
1 files changed, 19 insertions, 19 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index 469a04d..e27808d 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -272,7 +272,7 @@ function gmapArcgis(config) {
this.unblockUI('layers_' + element);
return;
}
-
+
this.showOverlayIf('layers', element);
this.config['layers'][element].overlay = this.showPolygon(this.config['layers'][element], 'layers_' + element);
},
@@ -291,20 +291,20 @@ function gmapArcgis(config) {
this.config['sliders'][slider].overlays[layer] = this.showPolygon(this.config['sliders'][slider], 'sliders_' + slider);
this.sliderUpdateOpacity(layer, slider);
},
-
+
// Add makers to the map
addMarkers: function(element) {
var self = this;
-
+
if (this.config['markers'][element].overlay != undefined) {
this.toggleMarkers(element);
return;
} else {
this.config['markers'][element].overlay = [];
}
-
+
this.showOverlayIf('markers', element);
-
+
// Query parameters
var query = {
returnGeometry: true,
@@ -312,14 +312,14 @@ function gmapArcgis(config) {
where: (this.config['markers'][element].where != undefined) ? this.config['markers'][element].where : '1=1',
outFields: this.config['markers'][element].fields,
};
-
+
var layer = new gmaps.ags.Layer(this.config['markers'][element].uri);
-
+
// Configure infoWindow
this.config['markers'][element].infowindow = new google.maps.InfoWindow({
content: '',
});
-
+
// Execute query
if (this.config['markers'][element].resultSetCallback != undefined) {
layer.query(query, this.config['markers'][element].resultSetCallback);
@@ -341,7 +341,7 @@ function gmapArcgis(config) {
else {
title = feature.attributes.nome;
}
-
+
self.config['markers'][element].overlay[i] = {};
self.config['markers'][element].overlay[i].marker = new google.maps.Marker({
title: title,
@@ -349,25 +349,25 @@ function gmapArcgis(config) {
position: feature.geometry[0].getPosition(),
map: self.map,
});
-
+
// Use a closure so marker data remains available to the listeners
self.config['markers'][element].overlay[i].addListener = function() {
var marker = self.config['markers'][element].overlay[i].marker;
var infowindow = self.config['markers'][element].infowindow;
var content = self.config['markers'][element].content;
var attributes = feature.attributes;
-
+
google.maps.event.addListener(marker, 'click', function() {
self.closeInfoWindows();
infowindow.setContent(content(attributes));
infowindow.open(self.map, marker);
});
};
-
+
// Execute
self.config['markers'][element].overlay[i].addListener();
}
-
+
self.unblockUI('markers_' + element);
}
},
@@ -384,7 +384,7 @@ function gmapArcgis(config) {
this.config['kmls'][element].overlay.setMap(this.map);
}
},
-
+
// Toggle layer visibility
toggleLayers: function(element) {
if (this.config['layers'][element].overlay.setVisible != undefined) {
@@ -414,12 +414,12 @@ function gmapArcgis(config) {
google.maps.event.removeListener(this.config['layers'][element].identifyListener);
}
},
-
+
// Toggle marker visibility
toggleMarkers: function(element, raw) {
var markers = (raw == true) ? element : this.config['markers'][element].overlay;
var closeInfoWindow = false;
-
+
for (i=0; i < markers.length; i++) {
if (markers[i].marker.getVisible()) {
closeInfoWindow = true;
@@ -442,12 +442,12 @@ function gmapArcgis(config) {
if (this.config[type][element] == undefined || this.config[type][element]['showOn'] == undefined) {
return;
}
-
+
if (jQuery.inArray(this.config.mapName, this.config[type][element]['showOn']) != -1) {
this[callback](element);
}
},
-
+
// Display slider
sliderUpdate: function(layer, slider) {
if (this.config['sliders'][slider].overlays == undefined) {
@@ -471,7 +471,7 @@ function gmapArcgis(config) {
this.config['sliders'][slider].overlays[i].setOpacity(0);
}
}
-
+
// The second and all subsequent layers shall be intialized without opacity.
this.sliderOpacity = 0;
},