Closed ghost closed 6 years ago
I found soluton:
var lotes = { name: 'lotes', source: { type: 'GeoJSON', url: 'json/rosana/lotes.geo.json' , }, style: function(feature , resolution){ var style = new ol.style.Style({ fill: new ol.style.Fill({ color: 'transparent' , width : 1 }) , stroke: new ol.style.Stroke({ color: 'blue', width: 2 }) , text : new ol.style.Text({ offsetY: -10, font: '12px Calibri,sans-serif', text: feature.get('lote'), //Get attribute and insert with label fill: new ol.style.Fill({ color: '#ec971f' }) }) }); } };
How to get the GeoJSON properties and insert it as text?
` function () { angular .module('gerenciamentoMunicipalADM').controller('FiscalizacaoController', FiscalizacaoController); FiscalizacaoController.$inject = ["$window" , "$scope" , "$http" , "olData"];
function FiscalizacaoController($window , $scope , $http , olData) { var vm = this;
};
})();
`