From a8fc30ca2f83f09a8b1de02e8547cf74d7f5e857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Tue, 21 Oct 2014 22:17:18 -0200 Subject: [PATCH] Add check to render thumbs to only parliaments that have photo --- sigiStatic/js/metas/mapa.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sigiStatic/js/metas/mapa.js b/sigiStatic/js/metas/mapa.js index 91c81b3..33f10cb 100644 --- a/sigiStatic/js/metas/mapa.js +++ b/sigiStatic/js/metas/mapa.js @@ -43,12 +43,16 @@ icon: '/static/img/mapmarker.png' } var mark = new google.maps.Marker(markData); - var infoWin = new google.maps.InfoWindow({content: - '' + municipio.nome + '

' + - municipio.info + '

' + - '' + - '' + - '' }); + var iwcontent = '' + municipio.nome + '

' + + municipio.info; + + if (municipio.thumb != '') { + iwcontent = iwcontent + '

' + + '' + + ''; + } + + var infoWin = new google.maps.InfoWindow({content: iwcontent }); linkMarkMessage(mark, infoWin, map); municipio['mapmark'] = mark; municipio['infowindow'] = infoWin;