Conjunto f4e2775 en sapic


Ignorar:
Fecha y hora:
14/11/2018 14:41:18 (hace 6 años)
Autor:
Ing. Roldan Vargas <roldandvg@…>
Branches:
master
Children:
8a5777f
Parents:
ce65723
Mensaje:

agregado paquete local axios e instrucciones para la carga de capas (aún identificando porque no la muestra)

Ubicación:
static
Ficheros:
4 añadidos
1 editado

Leyenda

No modificado
Añadido
Eliminado
  • static/explicacion_situacional/explicacion_situacional_map.js

    rce65723 rf4e2775  
    107107        axios.get('/cargar-geometria?comunidad_id='+data_selected)
    108108             .then(function (response) {
    109                 //console.log(document.getElementById('id_coordenadas_div_map'))
     109                $("#id_coordenadas").text(response.data.coordenadas);
    110110                var geojsonObject = {
    111111                    'type': 'FeatureCollection',
     
    125125                };
    126126                //console.log(geojsonObject);
    127                 /*var map = new ol.Map({
    128                     layers: [new ol.layer.Vector({
    129                         source: new ol.source.Vector({
    130                             features: (new ol.format.GeoJSON()).readFeatures(geojsonObject)
     127                map.addLayer(new ol.layer.Vector({
     128                    source: new ol.source.Vector({
     129                        features: (new ol.format.GeoJSON()).readFeatures(geojsonObject)
     130                    }),
     131                    style: ol.style.Style({
     132                        stroke: new ol.style.Stroke({
     133                            color: 'blue',
     134                            lineDash: [4],
     135                            width: 3
    131136                        }),
    132                         style: styleFunction
    133                     })],
    134                     target: 'id_coordenadas_div_map',
    135                     controls: ol.control.defaults({
    136                         attributionOptions: {
    137                             collapsible: false
    138                         }
    139                     }),
    140                     view: new ol.View({
    141                         center: [0, 0],
    142                         zoom: 2
     137                        fill: new ol.style.Fill({
     138                            color: 'rgb(0, 0, 255)'
     139                        })
    143140                    })
    144                 });*/
    145                 var map = new ol.Map('id_coordenadas_div_map');
    146                 map.addLayer(new ol.layer.Vector({
    147                         source: new ol.source.Vector({
    148                             features: (new ol.format.GeoJSON()).readFeatures(geojsonObject)
    149                         }),
    150                         style: ol.style.Style({
    151                             stroke: new ol.style.Stroke({
    152                                 color: 'blue',
    153                                 lineDash: [4],
    154                                 width: 3
    155                             }),
    156                             fill: new ol.style.Fill({
    157                                 color: 'rgba(0, 0, 255, 0.1)'
    158                             })
    159                         })
    160                     }));
    161                 //console.log(response.data.coordenadas);
     141                }));
     142
     143                console.log(map);
    162144            })
    163145             .catch(function (error) {
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.