diff options
author | Silvio <silvio@socioambiental.org> | 2013-03-12 17:18:55 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2013-03-12 17:18:55 -0300 |
commit | f834929710043c4013eec1cf869446a7bf8c895b (patch) | |
tree | 98e178153be8ec9c6fcb98aa15f205c8c4dd4660 | |
parent | 7b76e1972cde8ddbd6e6ab473726f6df87ee6a06 (diff) | |
download | gmap_arcgis-f834929710043c4013eec1cf869446a7bf8c895b.tar.gz gmap_arcgis-f834929710043c4013eec1cf869446a7bf8c895b.tar.bz2 |
Cleanup
-rw-r--r-- | gmap_arcgis.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 1d32441..2257dff 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -63,7 +63,10 @@ function gmapArcgis(config) { // Add a KML to the map showKML: function(element) { - this.config['kmls'][element].overlay = new google.maps.KmlLayer(this.config['kmls'][element].uri); + if (typeof this.config['kmls'][element].overlay == 'undefined') { + this.config['kmls'][element].overlay = new google.maps.KmlLayer(this.config['kmls'][element].uri); + } + this.config['kmls'][element].overlay.setMap(this.map); this.config['kmls'][element].isVisible = true; }, @@ -71,10 +74,9 @@ function gmapArcgis(config) { // Add a KML layer into the map addKML: function(element) { if (typeof this.config['kmls'][element].overlay != 'undefined') { - this.config['kmls'][element].overlay.setMap(this.map); - this.config['kmls'][element].isVisible = true; + this.showKML(element); this.unblockUI(); - return this.config['kmls'][element].overlay; + return; } if (this.config['kmls'][element].overlayTime != undefined) { |