From a979dd357aa1869b7f19ef4d4c360a6bab818039 Mon Sep 17 00:00:00 2001 From: zakhy Date: Fri, 21 Feb 2025 16:28:16 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A7=D1=82=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=86?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=D0=B0=20=D0=B8=D0=B7=20=D1=84=D0=B8=D1=87?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/main/templates/main_index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/main/templates/main_index.html b/apps/main/templates/main_index.html index 4bb634b..e633145 100644 --- a/apps/main/templates/main_index.html +++ b/apps/main/templates/main_index.html @@ -305,7 +305,7 @@ function polygonBrownStyleFunction(feature, resolution) { return new ol.style.Style({ stroke: new ol.style.Stroke({ - color: 'rgb(199,136,10)', + color: feature.get("color") ? feature.get("color") :'rgb(199,136,10)', width: 2, }), fill: new ol.style.Fill({ @@ -472,7 +472,7 @@ function createLayer(layer) { let newLayer; - + console.log(layer) if (layer.layer_type === 'Tile') { newLayer = new ol.layer.Tile({ source: new ol.source.XYZ({ @@ -487,7 +487,7 @@ format: new ol.format.GeoJSON(), }), visible: layer.is_visible, - style: polygonBrownStyleFunction, + style: polygonBrownStyleFunction }); } newLayer.set('title', layer.name)