From bc557ec62ec0f9715c37e4fc7912b1a6f38e8cbb Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 20 Mar 2013 16:48:40 -0300 Subject: Avoid big lines in the code --- gmap_arcgis.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3