Changeset 609969a in observatorio
- Timestamp:
- Oct 15, 2014, 5:12:04 PM (10 years ago)
- Branches:
- master
- Children:
- 379e7f7
- Parents:
- 8eb7907
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
procesos/media/geocadena/js/cadena_productiva.js
rb8134aa r609969a 73 73 styleMap: styleMapConex 74 74 }); 75 /*ue_conex.events.on({"loadstart": function() { 76 Ext.onReady(function() { 77 Ext.Msg.wait('Cargando Conexiones de la cadena productiva', 'Espere'); 78 }); 79 80 console.log('Inicio de la consulta sobre las conexiones de la cadena productiva'); 81 }}); 82 ue_conex.events.on({"loadend": function() { 83 Ext.Msg.hide(); 84 console.log('Se han cargado las conexiones de la cadena productiva'); 85 }});*/ 75 86 /// Establece la visibilidad de la capa por defecto 76 87 ue_conex.setVisibility(true); … … 87 98 88 99 var msg = ''; 89 msg += "<b>Empresa: </b>"+feature.attributes['nombre']+"<br/>"; 100 msg += "<h2 style='text-align:center; color:#C00000;'>DATOS DE LA UNIDAD ECONOMICA</h2>"; 101 msg += "<hr><br/>"; 102 msg += "<table style='border:solid 1px;' width='100%'>"; 90 103 if (typeof (feature.attributes['rif']) != "undefined" && feature.attributes['rif'] != null) { 91 msg += "<b>R.I.F.: </b>"+feature.attributes['rif']+"<br/>"; 92 } 93 msg += "<b>Coordenadas: </b>"+OpenLayers.LonLat.fromString(feature.geometry.toShortString())+"<br/>"; 94 if (typeof (feature.attributes['consume']) != "undefined" && feature.attributes['consume'] != null) { 95 msg += "<b>Consume:</b>"+feature.attributes['consume']+"<br/>"; 96 } 97 if (typeof (feature.attributes['produce']) != "undefined" && feature.attributes['produce'] != null) { 98 msg += "<b>Produce:</b>"+feature.attributes['produce']+"<br/>"; 99 } 104 msg += "<tr>"; 105 msg += "<td style='font-weight:bold'>R.I.F.: </td>"; 106 msg += "<td>" + feature.attributes['rif'] + "</td>"; 107 msg += "</tr>"; 108 } 109 msg += "<tr>"; 110 msg += "<td style='font-weight:bold'>Empresa</td>"; 111 msg += "<td>" + feature.attributes['nombre'] + "</td>"; 112 msg += "<tr>"; 113 msg += "<tr>"; 114 msg += "<td style='font-weight:bold'>Coordenadas</td>"; 115 msg += "<td>" + OpenLayers.LonLat.fromString(feature.geometry.toShortString()) + "</td>"; 116 msg += "</tr>"; 117 msg += "</table>"; 118 msg += "<br/><hr><br/>"; 119 msg += "<p style='color:#1C4EB2'>Haga click en el marcador para mayor detalle...</p>"; 100 120 101 121 // Permite mostrar ventana emergente en cada marca dentro del mapa 102 var popup = new OpenLayers.Popup.FramedCloud(" Anchored",122 var popup = new OpenLayers.Popup.FramedCloud("popup", 103 123 OpenLayers.LonLat.fromString(feature.geometry.toShortString()), 104 124 null, 105 125 msg, 106 126 null, 107 true 127 false, // Establece si se muestra o no el botón de cerrar 128 null 108 129 ); 130 popup.autoSize = true; 109 131 feature.popup = popup; 110 132 mapa.addPopup(popup); … … 201 223 var selector = new OpenLayers.Control.SelectFeature(ue_point,{ 202 224 hover:true, 203 autoActivate:true 225 autoActivate:true, 226 callbacks: {'click': function(f) { 227 var detalle = ""; 228 detalle += "<table border='0' width='100%'>"; 229 if (typeof (f.attributes.rif) != "undefined" && f.attributes.rif != null) { 230 detalle += "<tr>"; 231 detalle += "<td style='font-weight:bold'>R.I.F.</td>"; 232 detalle += "<td>" + f.attributes.rif + "</td>"; 233 detalle += "</tr>"; 234 } 235 detalle += "<tr>"; 236 detalle += "<td style='font-weight:bold'>Empresa</td>"; 237 detalle += "<td>" + f.attributes.nombre + "</td>"; 238 detalle += "</tr>"; 239 detalle += "<tr>"; 240 detalle += "<td style='font-weight:bold'>Nivel</td>"; 241 if (typeof (f.attributes.nivel) != "undefined" && f.attributes.nivel != null) { 242 detalle += "<td>" + f.attributes.nivel + "</td>"; 243 } 244 else { 245 detalle += "<td>0</td>"; 246 } 247 detalle += "</tr>"; 248 detalle += "<tr>"; 249 detalle += "<td style='font-weight:bold'>Posición</td>"; 250 if (f.attributes.sentido == "U") { 251 detalle += "<td>AGUAS ABAJO</td>"; 252 } 253 else if (f.attributes.sentido == "D") { 254 detalle += "<td>AGUAS ARRIBA</td>"; 255 } 256 else if (f.attributes.sentido == "C") { 257 detalle += "<td>U.E. Consultada</td>"; 258 } 259 detalle += "</tr>"; 260 detalle += "<tr>"; 261 detalle += "<td style='font-weight:bold'>Estado</td>"; 262 if (typeof (f.attributes.estado) != "undefined" && f.attributes.estado != null) { 263 detalle += "<td>" + f.attributes.estado + "</td>"; 264 } 265 else { 266 detalle += "<td>NO INDICA</td>"; 267 } 268 detalle += "</tr>"; 269 detalle += "<tr>"; 270 detalle += "<td style='font-weight:bold'>Municipio</td>"; 271 if (typeof (f.attributes.municipio) != "undefined" && f.attributes.municipio != null) { 272 detalle += "<td>" + f.attributes.municipio + "</td>"; 273 } 274 else { 275 detalle += "<td>NO INDICA</td>"; 276 } 277 detalle += "</tr>"; 278 detalle += "<tr>"; 279 detalle += "<td style='font-weight:bold'>Parroquia</td>"; 280 if (typeof (f.attributes.parroquia) != "undefined" && f.attributes.parroquia != null) { 281 detalle += "<td>" + f.attributes.parroquia + "</td>"; 282 } 283 else { 284 detalle += "<td>NO INDICA</td>"; 285 } 286 detalle += "</tr>"; 287 if (typeof (f.attributes.consume) != "undefined" && f.attributes.consume != null) { 288 detalle += "<tr>"; 289 detalle += "<td style='font-weight:bold'>Consume</td>"; 290 detalle += "<td>" + f.attributes.consume + "</td>"; 291 detalle += "</tr>"; 292 } 293 if (typeof (f.attributes.produce) != "undefined" && f.attributes.produce != null) { 294 detalle += "<tr>"; 295 detalle += "<td style='font-weight:bold'>Produce</td>"; 296 detalle += "<td>" + f.attributes.produce + "</td>"; 297 detalle += "</tr>"; 298 } 299 detalle += "</table>"; 300 $("#gxInfomarks").html(detalle); 301 }} 204 302 }); 205 303 206 304 mapa.addControl(selector); 207 305 selector.activate(); 306 307 ue_point.events.on({"loadstart": function() { 308 Ext.onReady(function() { 309 Ext.Msg.wait('Cargando datos de la cadena productiva', 'Espere'); 310 }); 311 312 console.log('Inicio de la consulta sobre las Unidades Económicas de la cadena productiva'); 313 }}); 314 ue_point.events.on({"loadend": function() { 315 Ext.Msg.hide(); 316 console.log('Se han cargado las Unidades Económicas de la cadena productiva'); 317 }}); 318 208 319 /// Establece la visibilidad de la capa por defecto 209 320 ue_point.setVisibility(true);
Note: See TracChangeset
for help on using the changeset viewer.