Commit fc440aceb7ff3cf1b46961b30e11f587247de49a

Authored by Edmar Moretti
1 parent d7bdaf16

--no commit message

ferramentas/editorol/editorol.js
... ... @@ -1260,7 +1260,7 @@ i3GEO.editorOL =
1260 1260 i3GEO.editorOL.interacoes.push(sel);
1261 1261 i3GEO.Interface.openlayers.interacoes[0].setActive(false);
1262 1262 sel.on("select", function(evt) {
1263   - var i, n, id, f;
  1263 + var s,i, n, id, f;
1264 1264 n = evt.selected.length;
1265 1265 for(i=0; i<n; i++){
1266 1266 f = evt.selected[i];
... ... @@ -1272,12 +1272,35 @@ i3GEO.editorOL =
1272 1272 id = i3GEO.util.uid();
1273 1273 i3GEO.editorOL.idsSelecionados.push(id);
1274 1274 f.setId(id);
1275   - f.setProperties({
1276   - fillColor: f.getStyle().getFill().getColor(),
1277   - strokeColor: f.getStyle().getStroke().getColor()
1278   - });
1279   - f.getStyle().getFill().setColor('rgba(255, 255, 255, 0.5)');
1280   - f.getStyle().getStroke().setColor('blue');
  1275 + s = f.getStyle();
  1276 + if(s.getImage()){
  1277 + f.setProperties({
  1278 + fillColor: s.getImage().getFill().getColor(),
  1279 + strokeColor: s.getImage().getStroke().getColor()
  1280 + });
  1281 + f.setStyle(
  1282 + new ol.style.Style({
  1283 + image: new ol.style.Circle({
  1284 + radius: i3GEO.editorOL.simbologia.pointRadius,
  1285 + fill: new ol.style.Fill({
  1286 + color: 'rgba(255, 255, 255, 0.5)'
  1287 + }),
  1288 + stroke: new ol.style.Stroke({
  1289 + color: 'blue',
  1290 + width: i3GEO.editorOL.simbologia.pointRadius / 3
  1291 + })
  1292 + })
  1293 + })
  1294 + );
  1295 + }
  1296 + else{
  1297 + f.setProperties({
  1298 + fillColor: s.getFill().getColor(),
  1299 + strokeColor: s.getStroke().getColor()
  1300 + });
  1301 + s.getFill().setColor('rgba(255, 255, 255, 0.5)');
  1302 + s.getStroke().setColor('blue');
  1303 + }
1281 1304 }
1282 1305 }
1283 1306 if (n === 0){
... ... @@ -1428,14 +1451,14 @@ i3GEO.editorOL =
1428 1451 };
1429 1452 i3GEOpanelEditor.appendChild(temp);
1430 1453 }
1431   - //TODO abrir em uma janela flutuante interna
1432 1454 if (botoes.ajuda === true) {
1433 1455 temp = document.createElement("div");
1434 1456 temp.className = "editorOLajudaItemInactive olButton";
1435 1457 temp.title = $trad("s1");
1436 1458 temp.onclick = function(){
1437 1459 if(i3GEO.configura && i3GEO.configura.locaplic){
1438   - window.open(i3GEO.configura.locaplic + "/mashups/openlayers_ajuda.php");
  1460 + i3GEO.janela.cria("400px", "200px", i3GEO.configura.locaplic
  1461 + + "/mashups/openlayers_ajuda.php?completo=none", "", "", $trad("s1"), "editorOlAjuda");
1439 1462 }
1440 1463 else{
1441 1464 window.open("openlayers_ajuda.php");
... ... @@ -2104,7 +2127,7 @@ i3GEO.editorOL =
2104 2127 },
2105 2128 selTodos : function() {
2106 2129 i3GEO.editorOL.unselTodos();
2107   - var features, n, f, i, id;
  2130 + var features, n, f, i, id, st;
2108 2131 features = i3GEO.desenho.layergrafico.getSource().getFeatures();
2109 2132 n = features.length;
2110 2133 for (i = 0; i < n; i++) {
... ... @@ -2115,24 +2138,68 @@ i3GEO.editorOL =
2115 2138 f.setId(id);
2116 2139 }
2117 2140 i3GEO.editorOL.idsSelecionados.push(id);
2118   - f.setProperties({
2119   - fillColor: f.getStyle().getFill().getColor(),
2120   - strokeColor: f.getStyle().getStroke().getColor()
2121   - });
2122   - f.getStyle().getFill().setColor('rgba(255, 255, 255, 0.5)');
2123   - f.getStyle().getStroke().setColor('blue');
  2141 + st = f.getStyle();
  2142 + //para o caso de pontos
  2143 + if(st.getImage()){
  2144 + f.setStyle(
  2145 + new ol.style.Style({
  2146 + image: new ol.style.Circle({
  2147 + radius: i3GEO.editorOL.simbologia.pointRadius,
  2148 + fill: new ol.style.Fill({
  2149 + color: 'rgba(255, 255, 255, 0.5)'
  2150 + }),
  2151 + stroke: new ol.style.Stroke({
  2152 + color: 'blue',
  2153 + width: i3GEO.editorOL.simbologia.pointRadius / 3
  2154 + })
  2155 + })
  2156 + })
  2157 + );
  2158 + f.setProperties({
  2159 + fillColor: st.getImage().getFill().getColor(),
  2160 + strokeColor: st.getImage().getStroke().getColor()
  2161 + });
  2162 + }
  2163 + else{
  2164 + f.setProperties({
  2165 + fillColor: st.getFill().getColor(),
  2166 + strokeColor: st.getStroke().getColor()
  2167 + });
  2168 + st.getFill().setColor('rgba(255, 255, 255, 0.5)');
  2169 + st.getStroke().setColor('blue');
  2170 + }
2124 2171 }
2125 2172 i3GEO.desenho.layergrafico.getSource().changed();
2126 2173 },
2127 2174 unselTodos : function() {
2128   - var i, n, f, s;
  2175 + var i, n, f, s, st;
2129 2176 s = i3GEO.desenho.layergrafico.getSource();
2130 2177 n = i3GEO.editorOL.idsSelecionados.length;
2131 2178 for(i=0; i<n; i++){
2132 2179 f = s.getFeatureById(i3GEO.editorOL.idsSelecionados[i]);
2133 2180 if(f){
2134   - f.getStyle().getFill().setColor(f.getProperties().fillColor);
2135   - f.getStyle().getStroke().setColor(f.getProperties().strokeColor);
  2181 + st = f.getStyle();
  2182 + //caso de ponto
  2183 + if(st.getImage()){
  2184 + f.setStyle(
  2185 + new ol.style.Style({
  2186 + image: new ol.style.Circle({
  2187 + radius: i3GEO.editorOL.simbologia.pointRadius,
  2188 + fill: new ol.style.Fill({
  2189 + color: f.getProperties().fillColor
  2190 + }),
  2191 + stroke: new ol.style.Stroke({
  2192 + color: f.getProperties().strokeColor,
  2193 + width: i3GEO.editorOL.simbologia.pointRadius / 3
  2194 + })
  2195 + })
  2196 + })
  2197 + );
  2198 + }
  2199 + else{
  2200 + st.getFill().setColor(f.getProperties().fillColor);
  2201 + st.getStroke().setColor(f.getProperties().strokeColor);
  2202 + }
2136 2203 }
2137 2204 }
2138 2205 i3GEO.editorOL.idsSelecionados = [];
... ...
mashups/openlayers_ajuda.php
1 1 <?php
2 2 include(dirname(__FILE__)."/../versao.php");
  3 +$completo = "block";
  4 +if(!empty($_GET["completo"]) && $_GET["completo"] == "none"){
  5 + $completo = "none";
  6 +}
3 7 ?>
4 8 <html>
5 9 <head>
... ... @@ -17,28 +21,26 @@ p,td
17 21 padding:2px;
18 22 }
19 23 .olControlEditingToolbar1 {
20   - height: 20px;
21   - left: 20px;
22   - position: relative;
23   - width: 100%;
  24 + height: 20px;
  25 + left: 20px;
  26 + position: relative;
  27 + width: 90%;
24 28 float: left;
25 29 }
26 30  
27 31 </style>
28 32  
29 33 </head>
30   -<body >
31   -<div style=text-align:left >
  34 +<body>
  35 +<div style="text-align:left;display:<?php echo $completo;?>" >
32 36 <p><img src="../imagens/i3geo1.jpg" /></p>
33 37 <p><?php echo $mensagemInicia;?></p>
34 38 <p style='font-size:16px'>Documenta&ccedil;&atilde;o do editor</p>
  39 +<p>Para ver os par&acirc;metros que podem ser utilizados na URL para abrir o mapa, <a href='openlayers.php?ajuda' target='_blank'>clique aqui</a></p>
  40 +
35 41 </div>
36 42 <table class="olControlEditingToolbar1" >
37 43 <tr>
38   - <td style=width:20px ></td>
39   - <td>Para ver os par&acirc;metros que podem ser utilizados na URL para abrir o mapa, <a href='openlayers.php?ajuda' target='_blank'>clique aqui</a></td>
40   - </tr>
41   - <tr>
42 44 <td style=width:20px ><div class="editorOLprocuraItemInactive"></div></td>
43 45 <td>Procure um elemento no tema que estiver ativo</td>
44 46 </tr>
... ...