aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gmap_arcgis.js10
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,