diff --git a/public/marker-icon.png b/public/marker-icon.png new file mode 100644 index 0000000..95b8422 Binary files /dev/null and b/public/marker-icon.png differ diff --git a/public/marker-shadow.png b/public/marker-shadow.png new file mode 100644 index 0000000..9fd2979 Binary files /dev/null and b/public/marker-shadow.png differ diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php index c8e0f69..e4ec75c 100644 --- a/resources/views/tracker.blade.php +++ b/resources/views/tracker.blade.php @@ -88,9 +88,20 @@ */ var checkinMarkers = []; var marker = null, popupMarkup = null; - L.Icon.Default.imagePath = "https://track.bengoldsworthy.net/images/"; + var markerIcon = L.icon({ + iconAnchor: [12, 41], + iconSize: [25, 41], + iconUrl: "images/marker-icon.png", + popupAnchor: [1, -34], + shadowSize: [41, 41], + shadowUrl: "images/marker-shadow.png", + tooltipAnchor: [16, -28] + }); @foreach($trip->checkins as $checkin) - marker = L.marker([{{ $checkin->location->latitude }}, {{ $checkin->location->longitude }}]).addTo(map); + marker = L.marker([{{ $checkin->location->latitude }}, {{ $checkin->location->longitude }}], + { + icon: markerIcon + }).addTo(map); popupMarkup = `
{!! $checkin->note !!}
`;