Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsoltMONOLITE authored Dec 2, 2023
1 parent 4f183cc commit e0ef605
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function addGeoms(data) {
click: function (e) {
// This zooms the map to the clicked geometry
// Uncomment to enable
map.fitBounds(e.target.getBounds());
// map.fitBounds(e.target.getBounds());

// if this isn't added, then map.click is also fired!
L.DomEvent.stopPropagation(e,click);
Expand All @@ -137,6 +137,7 @@ function addGeoms(data) {
*/
function addPoints(data) {
data = data.data;
.bindLabel(data[row].description, { noHide: true })
let pointGroupLayer = L.layerGroup().addTo(map);

// Choose marker type. Options are:
Expand Down Expand Up @@ -167,16 +168,16 @@ function addPoints(data) {
marker.addTo(pointGroupLayer);

// UNCOMMENT THIS LINE TO USE POPUPS
marker.bindPopup('<h2>' + data[row].name + '</h2>There's a ' + data[row].description + ' here');
//marker.bindPopup('<h2>' + data[row].name + '</h2>There's a ' + data[row].description + ' here');

// COMMENT THE NEXT GROUP OF LINES TO DISABLE SIDEBAR FOR THE MARKERS
marker.feature = {
properties: {
name: data[row].name,
description: data[row].description,
Program: data[row].Program,
Client: data[Row].Client,
Dropbox: data[row].Dropbox,
program: data[row].program,
client: data[Row].client,
cropbox: data[row].dropbox,
},
};
marker.on({
Expand Down

0 comments on commit e0ef605

Please sign in to comment.