Mudanças entre as edições de "Widget:MapViewer.js"
Ir para navegação
Ir para pesquisar
| Linha 1: | Linha 1: | ||
<includeonly> | <includeonly><div id="teste-<!--{$id}-->"></div> | ||
<script> | |||
// @noescape | |||
var jsonString = '<!--{$json|escape:'quotes'}-->'; | |||
document.getElementById('teste-<!--{$id}-->').innerHTML = 'JSON Length: ' + jsonString.length; | |||
try { | |||
var obj = JSON.parse(jsonString); | |||
document.getElementById('teste-<!--{$id}-->').innerHTML += '<br>✅ Funcionou! Camadas: ' + obj.layers.length; | |||
} catch(e) { | |||
document.getElementById('teste-<!--{$id}-->').innerHTML += '<br>❌ Erro: ' + e.message; | |||
} | |||
</script></includeonly> | |||