Browse Source

Add check to render thumbs to only parliaments that have photo

producao
Sesostris Vieira 10 years ago
parent
commit
a8fc30ca2f
  1. 14
      sigiStatic/js/metas/mapa.js

14
sigiStatic/js/metas/mapa.js

@ -43,12 +43,16 @@
icon: '/static/img/mapmarker.png' icon: '/static/img/mapmarker.png'
} }
var mark = new google.maps.Marker(markData); var mark = new google.maps.Marker(markData);
var infoWin = new google.maps.InfoWindow({content: var iwcontent = '<strong>' + municipio.nome + '</strong><br/><br/>' +
'<strong>' + municipio.nome + '</strong><br/><br/>' + municipio.info;
municipio.info + '<br/><br/>' +
if (municipio.thumb != '') {
iwcontent = iwcontent + '<br/><br/>' +
'<a href="' + municipio.foto + '" target="_blank">' + '<a href="' + municipio.foto + '" target="_blank">' +
'<img src="' + municipio.thumb + '">' + '<img src="' + municipio.thumb + '"></a>';
'</a>' }); }
var infoWin = new google.maps.InfoWindow({content: iwcontent });
linkMarkMessage(mark, infoWin, map); linkMarkMessage(mark, infoWin, map);
municipio['mapmark'] = mark; municipio['mapmark'] = mark;
municipio['infowindow'] = infoWin; municipio['infowindow'] = infoWin;

Loading…
Cancel
Save