Skip to content

Commit ee2b957

Browse files
committed
feat: add "groupPlayers" to config
As per request in #32. Defaults to true so, people who don't care will automatically have grouping enabled. closes #32
1 parent 46e42b3 commit ee2b957

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

config.example.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"tileDirectory": "images/tiles",
55
"iconDirectory": "images/icons",
66
"showIdentifiers" : false,
7+
"groupPlayers": true, // Wether the map should group players together into "clusters" or not.
78

89
"defaults": { // If a server doesn't have the key-value set, it will fallback to these values
910
"ip": "127.0.0.1", // Make sure this is the PUBLIC IP of the FIVEM server

dist/first-bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/src/init.1.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ function globalInit() {
105105
debug: false,
106106
tileDirectory: "images/tiles",
107107
iconDirectory: "images/icons",
108-
showIdentifiers: false
108+
showIdentifiers: false,
109+
groupPlayers: true
109110
}, p);
110111

111112
for (const serverName in config.servers) {

js/src/map.1.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function createMarker(animated, draggable, objectRef, title) {
9191
var image = L.icon(markerType);
9292

9393
var where = window.Map;
94-
if(objectRef.data && objectRef.data.isPlayer){
94+
if(objectRef.data && objectRef.data.isPlayer && window.config.groupPlayers){
9595
// Add to the cluster layer
9696
where = window.PlayerMarkers;
9797
}

0 commit comments

Comments
 (0)