From 615ebfbd3501d5f6ebaea275cc35aad3220b3413 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 30 Oct 2022 02:14:45 +0000 Subject: [PATCH] Fix markers not showing on mobile browsers --- public/marker-icon.png | Bin 0 -> 2142 bytes public/marker-shadow.png | Bin 0 -> 618 bytes resources/views/tracker.blade.php | 15 +++++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 public/marker-icon.png create mode 100644 public/marker-shadow.png diff --git a/public/marker-icon.png b/public/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..95b8422e9452bfab40ad28436e3c8bb5d275321b GIT binary patch literal 2142 zcmV-k2%-0hP)P001cn1^@s6z>|W`0004nX+uL$Nkc;* zaB^>EX>4Tx04R}tkv&MmKpe$iQ>9ue4i*$q$j~}j5EXIMDionYsTEpvFuC+YXws0R zxHt-~1qVMCs}3&Cx;nTDg5U>;qmz@Oi`@MG(X2M>nDpGxgb2Dhbc=bq^n3?_xa5``n+SN6DKE@QK7TOgAjzb>gW_ zOXs{#9A+g+AwDM_HRyuGk6f2se&bwpSm2pqBa@yZ4ik&THkR9%l?;`5k~pHM8s!UF zmle)ioYiubHSft^7|LtQOI)Wpgaj6_h!jM~sA2lA>^e5@H zmKHezdbfd#>y{?(0hc?#z>_W+k|X(P3WWmjen#Jv1Nv@(;HukOb04Py{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2j&VL7Y{il{^afe000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}000IxNklr<;uU_2xMVl zf!w@#^FwRxSXWn<&E;}l5Cou}6Aq0#uXst0nKOadcXIrN-0)XR}qFGq?F*C zBbUper>6%1kR(Zqjg%5|b8|_lRO+Kq6urY3`&oZ~KaZlQC7{+?yn6KtLqkJ2bLI?A zojQd|rGhj~@$A_%1VMmC1~x<~g?v7bdcCezS6BbS2qD8k5I`vfYweama?UY7Kab}W6iaJfdQO8eHx`w36qnPIC$_Nq?B7+r<6hv1khR!6JyN#uImO3kj7w)H3NC{ z=+U+rH8L`SVzG#|wKY&mx7aJC;JR*LjCr3}Yv1)e58FYkwGcw!(4j+coSm!B(9jTs z5O5r)1;q0_SZm*9#+V#{=Hm8D@qK^KgJ_ItvA5PXfCB>HpIMf*{E5~YoO8T*@nTny zmoHy}QVOm07JJ8WkYyRHwcii`e@l`?5<*(&20?(=uV3To)2D3#W@l&d{P}Zqb#=9X z5JC{gv2YycDW39!^%nZiI$I;u{+l*g35Gmyh z9& zo+Q<3)s<3??BBniHx5{*EEX0P5@XD-$H&M2y5;`gZs7a=Cs~%6BuT(I?}&xxc}S83 zLI~-3-e=qQq}wN^r>Dj6@URs^yjLg`_GGg;7Fz4EiHV7?S~{6_hMef>vb@A4%TYqoclkMb&LZNV5 zO1ZHc8`pK4r@N=8=kuNRqB|{2O-<=)wYn~Z_(3~14HipFONq7imp5+Q_{WajjmzE$nWKwOY+Mj`Lx?UQZcg%@);h98gM8uh&z@ zaW1xdE_4j?9h>{cm~Z1ahUaI2<#zsmh1?L=; zQiNfc5khKvvFHfoyN2OU#+ZL6Nz%Oaj4`vfZ{Pm1qi01YN)I1Cw1kja7>1cr3Q-gZ zLP)LS3jHSK{OsAYUlT&UZ;bio&Ye4lJANR&35d0}rnPpgwKe=d<=nY*7vI$8zggX7 Us`v*>M*si-07*qoM6N<$g6=2;c>n+a literal 0 HcmV?d00001 diff --git a/public/marker-shadow.png b/public/marker-shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd2979532a19a15b824ce763c76e04a8dafadfb GIT binary patch literal 618 zcmV-w0+s!VP)ke9$Lam@{1K@O ze*LXqlKQHiv=gx+V^Cbb2?z@ISBQ*3amF;9UJ3SBg(N|710TLamQmYZ&Qjn2LuO<* zCZlB4n%@pc&7NNnY1}x+NWpHlq`OJEo|`aYN9<`RBUB+79g;>dgb6YlfN#kGL?lO_ z!6~M^7sOnbsUkKk<@Ysie&`G>ruxH&Mgy&8;i=A zB9OO!xR{AyODw>DS-q5YM{0ExFEAzt zm>RdS+ssW(-8|?xr0(?$vBVB*%(xDLtq3Hf0I5yFm<_g=W2`QWAax{1rWVH=I!VrP zs(rTFX@W#t$hXNvbgX`gK&^w_YD;CQ!B@e0QbLIWaKAXQe2-kkloo;{iF#6}z!4=W zi$giRj1{ zt;2w`VSCF#WE&*ev7jpsC=6175@(~nTE2;7M-L((0bH@yG}-TB$R~WXd?tA$s3|%y zA`9$sA(>F%J3ioz<-LJl*^o1|w84l>HBR`>3l9c8$5Xr@xCiIQ7{x$fMCzOk_-M=% z+{a_Q#;42`#KfUte@$NT77uaTz?b-fBe)1s5XE$yA79fm?KqM^VgLXD07*qoM6N<$ Ef<_J(9smFU literal 0 HcmV?d00001 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 = ``; popupMarkup += ``;