diff --git a/CHANGELOG b/CHANGELOG
index c753726..c3e77e9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@
*
### Bugfixes
* Implement #13 fixing issue with port when using proxy
+* Implement #14 show description on map in tooltip on area
### Changes
*
diff --git a/Lora-Map/resources/js/map.js b/Lora-Map/resources/js/map.js
index 226b4f0..d3bcf38 100644
--- a/Lora-Map/resources/js/map.js
+++ b/Lora-Map/resources/js/map.js
@@ -69,7 +69,11 @@ function GetGeoLayer() {
},
onEachFeature: function (feature, layer) {
if (feature.geometry.type === "Polygon" || (feature.geometry.type === "Point" && feature.properties.hasOwnProperty("icon"))) {
- layer.bindPopup(feature.properties.name);
+ var text = ""+feature.properties.name+"";
+ if (feature.properties.hasOwnProperty("description")) {
+ text = text + "
" + feature.properties.description;
+ }
+ layer.bindPopup(text);
}
},
pointToLayer: function (geoJsonPoint, latlng) {