Skip to content

Commit

Permalink
Add marker popups
Browse files Browse the repository at this point in the history
  • Loading branch information
peterprescott committed Oct 14, 2023
1 parent 1bfb5fd commit 9486617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/fullstack_ui/js/maps.js
Expand Up @@ -5,7 +5,7 @@ async function getPostcodeCoords() {
r = await get(API_URL + 'postcode/' + postcode);
churches = await get(API_URL + 'churches/' + postcode);
count_churches = churches.length;
church_msg = 'There are ' + count_churches + ' churches in ' +
church_msg = 'There are ' + count_churches + ' churches in ' +
churches[0].postcode.split(' ')[0] + '.';
msgFooter(church_msg)

Expand All @@ -25,7 +25,7 @@ function centerMap(r) {
if (r.success) {
let marker = L.marker([r.latitude, r.longitude]).addTo(map);
marker.bindPopup(r.postcode).openPopup();

map.setView([r.latitude, r.longitude], 13);
} else {
console.log(r);
Expand Down

0 comments on commit 9486617

Please sign in to comment.