diff options
author | Silvio <silvio@socioambiental.org> | 2013-03-20 16:48:40 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2013-03-20 16:48:40 -0300 |
commit | bc557ec62ec0f9715c37e4fc7912b1a6f38e8cbb (patch) | |
tree | fbe0678d868cef2e9e2ccdeac5ecc332ca9b0e89 /gmap_arcgis.js | |
parent | 14b38ba821de3e19813c50f6b35621ba681d1f9c (diff) | |
download | gmap_arcgis-bc557ec62ec0f9715c37e4fc7912b1a6f38e8cbb.tar.gz gmap_arcgis-bc557ec62ec0f9715c37e4fc7912b1a6f38e8cbb.tar.bz2 |
Avoid big lines in the code
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r-- | gmap_arcgis.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 24cbc04..03539de 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -158,12 +158,20 @@ function gmapArcgis(config) { // Process results function processResultSet(fset) { var fs = fset.features; + var title; for (var i = 0, c = fs.length; i < c; i++) { fset = fs[i]; + + if (self.config['markers'][element].title != undefined) { + title = fset.attributes[self.config['markers'][element].title]; + } + else { + title = fset.attributes.nome; + } self.config['markers'][element].overlay[i] = {}; self.config['markers'][element].overlay[i].marker = new google.maps.Marker({ - title: (self.config['markers'][element].title != undefined) ? fset.attributes[self.config['markers'][element].title] : fset.attributes.nome, + title: title, icon: self.config['markers'][element].icon, position: fset.geometry[0].getPosition(), map: map, |