aplicaParametrosLegImg> */ case "APLICAPARAMETROSLEGIMG": $m = new Legenda($_SESSION["map_file"]); $retorno = $m->aplicaParametrosLegImg($_GET); $m->salva(); ob_clean(); header("Content-type: application/json"); echo json_encode(array( "errorMsg" => "" )); exit; break; /* Valor: PEGAPARAMETROSLEGIMG Pega os parâmetros da legenda embebida no mapa. pegaParametrosLegImg> */ case "PEGAPARAMETROSLEGIMG": $m = new Legenda($_SESSION["map_file"]); $retorno = $m->pegaParametrosLegImg(); if($retorno["status"] == 0){ $retorno["status"] = 1; } ob_clean(); header("Content-type: application/json"); echo json_encode($retorno); exit; break; /* Valor: TESTALEGENDA Testa os parâmetros de definição da legenda inserida no mapa. aplicaParametrosLegImg> */ case "TESTALEGENDA": $map_file = str_replace(".map","",$_SESSION["map_file"]).".map"; copy($map_file,str_replace(".map","testeleg.map",$map_file)); $m = new Legenda(str_replace(".map","testeleg.map",$map_file)); $m->aplicaParametrosLegImg($_GET); $retorno = $m->legendaGrafica(); ob_clean(); header("Content-type: application/json"); echo json_encode($retorno["imagem"]); exit; break; case "GETLEGENDA": $m = new Legenda($_SESSION["map_file"]); $retorno = $m->legendaGrafica(); ob_end_clean(); header('Content-type: image/png'); readfile($retorno["arq"]); exit; break; }