Conjunto f4e2775 en sapic
- Fecha y hora:
- 14/11/2018 14:41:18 (hace 6 años)
- Branches:
- master
- Children:
- 8a5777f
- Parents:
- ce65723
- Ubicación:
- static
- Ficheros:
-
- 4 añadidos
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
static/explicacion_situacional/explicacion_situacional_map.js
rce65723 rf4e2775 107 107 axios.get('/cargar-geometria?comunidad_id='+data_selected) 108 108 .then(function (response) { 109 //console.log(document.getElementById('id_coordenadas_div_map'))109 $("#id_coordenadas").text(response.data.coordenadas); 110 110 var geojsonObject = { 111 111 'type': 'FeatureCollection', … … 125 125 }; 126 126 //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 131 136 }), 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 }) 143 140 }) 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); 162 144 }) 163 145 .catch(function (error) {
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.