Created
September 16, 2016 12:41
-
-
Save Matheus-de-Souza/833fb9e10139c3db1f01f6d1942bb621 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < this.legend.layerInfos.length; i++) | |
{ | |
var sNomeDiv = ""; | |
var sMensagem = ""; | |
if (this.legend.layerInfos[i].layer.visible) | |
{ | |
sNomeDiv = this.legend.id + "_" + this.legend.layerInfos[i].layer.id; | |
if (this.legend.layerInfos[i].layer.description == "" || | |
this.legend.layerInfos[i].layer.description == "undefined" || | |
this.legend.layerInfos[i].layer.description == "null") | |
{ | |
sMensagem = "Nenhuma informação cadastrada para a camada " + this.legend.layerInfos[i].title; | |
} | |
else | |
{ | |
sMensagem = this.legend.layerInfos[i].layer.description; | |
} | |
setarMensagemAlert (sMensagem,sNomeDiv); | |
} | |
} | |
function setarMensagemAlert (sMensagem, sNomeDiv) { | |
dojo.connect | |
( | |
dojo.byId(sNomeDiv), | |
'onclick', | |
function() | |
{ | |
alert(sMensagem + " --> " + sNomeDiv); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment