I'm using Django and Openlayers to add some data from my PostGIS database to the map but can't seem to work out how to style the vector layer that uses the kml.
var layer = new ol.layer.Vector({
title: 'Polygon',
source: new ol.source.Vector({
projection:new ol.proj.get("EPSG:3857"),
url:'http://localhost:8000/layer',
format: new ol.format.KML(),
extractStyles: false,
}),
});
map.addLayer(layer);
I've been through lots of tutorials attempting to use ol.style.Style and styleMaps and more but whatever I do the layer stays as just white. I was wondering if anyone knew if this was just a recent change in the OpenLayers code meaning there aren't any tutorials or if there is a solution anyone may know about.