Skip to content

Commit

Permalink
Add player marker to map.
Browse files Browse the repository at this point in the history
  • Loading branch information
blujai831 committed Nov 5, 2024
1 parent 6863f90 commit 157426c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ function makeMap() {
return map;
}

function makePlayerMarker(map: leaflet.Map) {
const playerMarker = leaflet.marker(MAP_CENTER);
playerMarker.bindTooltip("You Are Here");
playerMarker.addTo(map);
return playerMarker;
}

// Object constants

const map = makeMap();

// Init

makeMap();
makePlayerMarker(map);

0 comments on commit 157426c

Please sign in to comment.