From 3a941bb4be3f11acf178c3d2bd5bae88aab68f1c Mon Sep 17 00:00:00 2001 From: ptduy14 Date: Thu, 16 May 2024 23:04:56 +0700 Subject: [PATCH] change css style --- pages/ex-four.html | 68 ++++++++++++++++++++++++--------------------- pages/ex-one.html | 44 +++++++++++++++-------------- pages/ex-three.html | 5 ++-- pages/ex-two.html | 45 ++++++++++++++++-------------- style.css | 8 ++++-- 5 files changed, 91 insertions(+), 79 deletions(-) diff --git a/pages/ex-four.html b/pages/ex-four.html index 0d159df..ac3c5cb 100644 --- a/pages/ex-four.html +++ b/pages/ex-four.html @@ -4,7 +4,11 @@ Exemple Four - + -
-
MORE
- +

Made by ptduy14 with love ❤️

@@ -72,20 +76,20 @@ '© OpenStreetMap', }).addTo(map); - var polygonPoints = [] + var polygonPoints = []; var polygon; var marker; - - map.on('click', (e) => { + + map.on("click", (e) => { // kiểm tra nếu độ dài mảng polygonPoints thì vẽ polygon if (polygonPoints.length == 4) { - polygon = L.polygon(polygonPoints, {color: 'red'}).addTo(map); - polygonPoints = [] + polygon = L.polygon(polygonPoints, { color: "red" }).addTo(map); + polygonPoints = []; } else { - polygonPoints.push(e.latlng) - marker = L.marker(e.latlng).addTo(map) + polygonPoints.push(e.latlng); + marker = L.marker(e.latlng).addTo(map); } - }) + }); diff --git a/pages/ex-one.html b/pages/ex-one.html index 43ccfd2..adf01a1 100644 --- a/pages/ex-one.html +++ b/pages/ex-one.html @@ -4,7 +4,11 @@ Exemple One - + -
-
MORE
-