From 37772c2fbc6aa8886f478e92d0fbde588d086df1 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sun, 12 Apr 2020 14:06:37 +0200 Subject: [PATCH] initializes repository with code base from https://github.com/kriztan/staticmap --- images/marker_shadow.png | Bin 0 -> 374 bytes images/markers/bullseye.png | Bin 0 -> 1250 bytes images/markers/lightblue1.png | Bin 0 -> 317 bytes images/markers/lightblue2.png | Bin 0 -> 417 bytes images/markers/lightblue3.png | Bin 0 -> 435 bytes images/markers/lightblue4.png | Bin 0 -> 387 bytes images/markers/lightblue5.png | Bin 0 -> 434 bytes images/markers/ltblu-pushpin.png | Bin 0 -> 1369 bytes images/markers/marker-icon-2x.png | Bin 0 -> 2586 bytes images/markers/marker-icon.png | Bin 0 -> 1466 bytes images/markers/ol-marker-blue.png | Bin 0 -> 992 bytes images/markers/ol-marker-gold.png | Bin 0 -> 831 bytes images/markers/ol-marker-green.png | Bin 0 -> 967 bytes images/markers/ol-marker.png | Bin 0 -> 606 bytes images/markers/pink-pushpin.png | Bin 0 -> 1424 bytes images/markers/purple-pushpin.png | Bin 0 -> 1418 bytes images/markers/red-pushpin.png | Bin 0 -> 1334 bytes images/markers/ylw-pushpin.png | Bin 0 -> 1233 bytes images/osm_logo.png | Bin 0 -> 1167 bytes index.php | 391 +++++++++++++++++++++++++++++ 20 files changed, 391 insertions(+) create mode 100644 images/marker_shadow.png create mode 100644 images/markers/bullseye.png create mode 100644 images/markers/lightblue1.png create mode 100644 images/markers/lightblue2.png create mode 100644 images/markers/lightblue3.png create mode 100644 images/markers/lightblue4.png create mode 100644 images/markers/lightblue5.png create mode 100644 images/markers/ltblu-pushpin.png create mode 100644 images/markers/marker-icon-2x.png create mode 100644 images/markers/marker-icon.png create mode 100644 images/markers/ol-marker-blue.png create mode 100644 images/markers/ol-marker-gold.png create mode 100644 images/markers/ol-marker-green.png create mode 100644 images/markers/ol-marker.png create mode 100644 images/markers/pink-pushpin.png create mode 100644 images/markers/purple-pushpin.png create mode 100644 images/markers/red-pushpin.png create mode 100644 images/markers/ylw-pushpin.png create mode 100644 images/osm_logo.png create mode 100644 index.php diff --git a/images/marker_shadow.png b/images/marker_shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..a5afa6edd9e4a5a525af486f26d962539412d838 GIT binary patch literal 374 zcmV-+0g3*JP)&00004XF*Lt007q5 z)K6G40000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUz2uVaiRCwBq zk_~TyKny_TD59Gv`u~69;-*eM6l|AwNk?G2CNFR)JlfK1l^#JUlv3F$8%4mPSMJJH z5@Z=KnrH`a%38_E8&9Mn3DuQ|4oc-J49H>#=jJbIj=*F`#OoQE?X} zRf2E?TcJj|AiHoL#I3_SE$^9Wm=Q%;$4;8)i~F9+e`Gm}U9&zV6-LQ`s7KZy`R3Y@ zAN|5cVa-n(dGO&xMvJg@`Cl?Gt@z8qeYtgX$fIO%UCf3!+099OCC~pP(|8Fm0O%HGMjI3I;NF_!J){w_+n1$NPVDjRTJ zji9@*5}S(IlcL`nRA~OG0;LJt*21$jGM`Lk# zWxT{eIri(3`NYFKGO$P(ydiFhh(GqzIbPxh&__q$=g8dF%PE5bOWZ2DAyO8P^@GTR zJNN@jBJ(jR#X*6%DI$FF-SCfP+^{!GYhOm@g^+a9g3}}C@~#H++*r`Xk-&<`Jg1vk z%}rbpISylUBM0;_Tb92rkR{p=vAj6^snkSZbINmQ9LG5#zDe*|WSpBfT4&a&wc?-Hm-2UD zVH;mJAh0D`??_VKi;U;L#EE$$wrADIIcZktzF+=X9yqt1H}b|=%}KKUWe_RbniICB zL%D^%tlWPgZ}9Ssad%#RH59l3O_BNS06lz#Gb$Xrr*KxaCT2X)l{INQ4NdA_6ge}2 zz{Y6LoN|NnpI|ySN8+Seg)>+Wu0db4@5xn1zgZuKRZI;$6`B7@=p7W;!M>Dr5$WU! zbdRUFlu*coOp9DS?R-Bd5Sn;cxlyUWg0(CiFM&NQ3BxO%UkY?p=*sXW2j{aVa7`sU zFmFDG-Wr~cMvas(g9k&_sKsq(Ya81u&L4`ktf(=M+0sX6xrZ1vRxx!#_Bvfz#r;f? z#g&FyqmP$m^OP7r1(r@`eWNL;D@!GNBhC0$b5en8 zaj)9N>!vBR<{BPVh)ho98QfRr{3C&nO6&+((J@dNO-h*=vU~kJ6@5k(0nfIvIDT>? z3LHRBHso2Yf%`cpeoeW(at>1sBNnX1Y^v2F6B#G-(clnP7HAns91RZ9Ut;V!Z M07*qoM6N<$f*l1;7bJU literal 0 HcmV?d00001 diff --git a/images/markers/lightblue2.png b/images/markers/lightblue2.png new file mode 100644 index 0000000000000000000000000000000000000000..47ab258013887c6b829f5c433146484a4575b1d4 GIT binary patch literal 417 zcmV;S0bc%zP)EQ zOC*O0vbQ=S7#KP?qZ&-KAs_=lfeVV6iWRuk5saPpUm;-w;^PWfMsSKnOKdJW3=F#~ zv4@juJ7!|TY6x{w?6T=V;v5j)BEl3^EQTzzVz99If5OPf2xy89K_l4MjD9gdy#v7v z0snP$bS{7R@PY3?kPE_p{`_HrvC%P14q*sG%6}0N(bsqG+))Bal7hj8FxqeW&&J00 z^U$F~Hpn)^6rr=x`4E>di2k29Z(agEClmBeNl8gJE``KkfB*vk*RLLeOaB_h00000 LNkvXXu0mjf!5ge> literal 0 HcmV?d00001 diff --git a/images/markers/lightblue3.png b/images/markers/lightblue3.png new file mode 100644 index 0000000000000000000000000000000000000000..21f5912e34a103f056777c93ea04605c13780a51 GIT binary patch literal 435 zcmV;k0ZjghP)^%wz@zL2d>H z7aazM-IWkFNrr$x#R>)nlNttwut^XDj1}>P2^KJGAA~OVg}4gj6_ULJ104|z3`$~< zaKQx#8p0UOz>q!{5-uPEi8cgeGsqht8s@b{C6FX37;Ffm{igqHYM3M7RI|002ovPDHLkV1fv3obmtw literal 0 HcmV?d00001 diff --git a/images/markers/lightblue4.png b/images/markers/lightblue4.png new file mode 100644 index 0000000000000000000000000000000000000000..aff25c37c070d1a0e07310540049ca5681ab1f67 GIT binary patch literal 387 zcmV-}0et?6P)$>yDJ$Oj1}>@1P>78W?-0^452|78zAVCRe88I z6J{C6FX37;Ffm{igqHY2>zZcWEcW+ z$?B5~3}KV-`-lmb1jrkL+z?#u%fO%{My4S!*K|ZMFq~;Y4IiQm0r|gT1p|X}Ap?U+ z4I+$iM==&~?-c_>=Vk=|?0wu`!fFUe@!fuiMvy@uKFC`jmtg~p;1r7`v4NZp3JXxc zf&eI%(&s|b3VLG0X$S~_3;+ctNF&HqxKb>3LzYbk66b*U77^+GIhHV4X2oD(@&AO8 zkrB`o9fC%%u^IhhfVu>N83O+6=;&Pj@ZkgBe;^lx|NQyG1Y@IPm>j|ohLryzBBHPF z+_|F!k|YI#4Pmt3^q-B5@8_XIhis5-hABd4qw^syVG#X4Z{EBFd`>3losyE0Zd?k9 c!2kgU0HLfQ<&ons+yDRo07*qoM6N<$f?^D>>Hq)$ literal 0 HcmV?d00001 diff --git a/images/markers/ltblu-pushpin.png b/images/markers/ltblu-pushpin.png new file mode 100644 index 0000000000000000000000000000000000000000..64fb973047bddf701196d0306298c1b38b064061 GIT binary patch literal 1369 zcmV-f1*ZCmP)Px#AY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF* zm;eA5Z<1fdMgRZ+32;bRa{vGf6951U69E94oEQKA1j0!~K~z}7y;p5aQ&$*npk!U*J(!!kG z+*)Lwo~_dP^IOFt(YF{21>E1Za7J7IlYoOvp=j41K1}A87K%D>fL0b3PJC!E3}d_z z@ACl9*(Bh)I6VAC+Q0zij*XE8lfMQw0cp>llm5sNT9%abr;}V>gSmRZPG|y-3YF@2 zb9XoCPMn~)>(?ps)hnI=L#`FcPo7Y4em==OJlffj2}yu8qbfdrLW?7aJbIKq+p~wb zQ>Q5T@ngz)^M-Qpfv*7Oo%CnV=%duszp>^=KrR#k(SijF>SEymZDS)vpE*MjAfn#4 zk3!4Ki9>(=jT@9QILLctGq55rkL<!?|-5 zfjCfCR#Mo(gQPijj3VmlXo*h82owrMz#LgzOqpq&@$$izTF|0{u0VxOp2M33u4Og#H($lB>j`b%`lHu%G{+azoBOanaV3D8SAf^`p zDj|c=*=zaoKe9(h$$aMyZ=4y7K7D!;#!HtdbnjlWx3epr4ITI-cMp1FRS`(rL&<^#`K9|VzNozl;*C$XxEw)FQ?PEQYg2?8wrW^#WF#y`+#MzPLE z2m+xWYqeuL;O=}3Zo#>yL1L4DnDgiVyL*hSL6LHn$$k~07%g%4@oC%k@F9JVfjn!` z$%5{$>*yfu@#B21PbFZuaDhH8Dc|LfKygVzETo|H zCPV8JQGnv_-6Qku+mvwsJ|#YSM6tJSk#}U|OW0d%%Mk>4`}=o(4z=4jK2Bfs_0f9l zju~3l*-2|rhFKt*u3aM&o=wPo4g#cSv4G#;k`k5)-`N_3nx$s*cwBEUB|LaQCK%){ zUL*swpXomfLY4_E7I;`yF{Z7JFVhmKv`C0F)Wqfy?V%7qj{kW33(~^^6EzLePfkx!EeRy8;!=1D#)@-Ci{6xop7~6 z4mi!`{{l;CX({F5euw7-(K|Go2q+Ya+Un|R3JeVFMb~An2`u6`ZnzS6KB-h%CVIza z3xQ1~P&bRk!d`N7P5`2^BR4mfe0_bp(49Bu1jJ%-hEk~{i9})&+0bk`0uOj0W2Sqa btpxr7j27EJF$e`;00000NkvXXu0mjfqPlIz literal 0 HcmV?d00001 diff --git a/images/markers/marker-icon-2x.png b/images/markers/marker-icon-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e4abba3b511d14752426e8cbadae03c1e5fe15fb GIT binary patch literal 2586 zcmY+F2{e@Z8^=d(p&CX}#B^hnvdqF*GGuA230LC!lc?y*GDh~o80#=n_I())O7`vI zB1@JTX6#9*+_BV^ixA0s->Luqp7Vds@BKcX=lOk~^Pb;%&wG9p3o}FL;Zuhp5D3)R z2yY2yCGfH2=LJmOkQw^9n>daF6?Fz>oOD64$CM+_T`j0x%{zb|G zWolt{H|diO#S`|$6RM$ zYQuE4RW{2yZ`>fAt>jzyYyOB?)~HrQBlbbLT5yF%Xq8FEu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z1Y3GdqxI|$iyh%qoeNX UQO-*oc+)|Q_08}VdXD6O0C*xx%>V!Z literal 0 HcmV?d00001 diff --git a/images/markers/marker-icon.png b/images/markers/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..950edf24677ded147df13b26f91baa2b0fa70513 GIT binary patch literal 1466 zcmV;r1x5OaP)P001cn1^@s6z>|W`000GnNklGNuHDcIX17Zdjl&3`L?0sTjIws<{((Dh&g-s0<@jYQyl?D*X^?%13;ml^gy> ziMrY_^1WI=(g@LMizu=zCoA>C`6|QEq1eV92k*7m>G65*&@&6)aC&e}G zI)pf-Za|N`DT&Cn1J|o`19mumxW~hiKiKyc-P`S@q)rdTo84@QI@;0yXrG%9uhI>A zG5QHb6s4=<6xy{1 z@NMxEkryp{LS44%z$3lP^cX!9+2-;CTt3wM4(k*#C{aiIiLuB>jJj;KPhPzIC00bL zU3a#;aJld94lCW=`4&aAy8M7PY=HQ>O%$YEP4c4UY#CRxfgbE~(|uiI=YS8q;O9y6 zmIkXzR`}p7ti|PrM3a}WMnR=3NVnWdAAR>b9X@)DKL6=YsvmH%?I24wdq?Gh54_;# z$?_LvgjEdspdQlft#4CQ z`2Zyvy?*)N1Ftw|{_hakhG9WjS?Az@I@+IZ8JbWewR!XUK4&6346+d#~gsE0SY(LX8&JfY>Aj)RxGy96nwhs2rv zzW6pTnMpFkDSkT*a*6Dx|u@ds6ISVn0@^RmIsKZ5Y;bazbc;tTSq(kg(=481ODrPyNB6n z-$+U}(w$m6U6H$w17Bw+wDaFIe~GvNMYvnw31MpY0eQKT9l>SU``8k7w4)z!GZKMI z#_cEKq7k~i%nlK@6c-K?+R;B#5$?T#YpKD`t_4bAs^#E+@5QW$@OX3*`;(#{U^d-vY)&xEE>n5lYl&T?AmX1^@s6-qmI800004b3#c}2nYxW zd>{!xLrWaJ zX<&2cGVi$Fn;O%iVYe{MyHLDr%-V2_xvjO8>z;f5pY!~B(I&gQXWOOv!Sm+#{eC~^ zJUq`iKM)b-TL3BqpV$ImaY6q141yr;lH{Pea?K`7_J_s*Z1~qu0LA{m!uFEVGNt}R znvO>`+EI6&0->-b`9mK7@XeNGlYpFJj6Eg$Ll>UdxOLG>)yD#&C_m6L_eXI0#8z!& zu1$!F8;$qHqacvFaI5b6@xO_~hUwT#g>XhkGhuXc*9~3CGgmyh8KM+`BnLs9qpZ9#&tn=Y;?3`BhMuV=B3A$aB1&=YwtpKxV$BS! zEZ>Nl!{6bBEe$x(m_{HJ&VzmvJ8ZeGeTj&!1G!h~VMz}5)_wGIXvwliJ-6spzuoIW zW8_)IHnkN*G!6j5lt@Iw#QD)gORZKg5kOnhPL(@${S+_<3IL8{9=qG~W45;|SrG8% zwJ7~QbZ5|Y?WXDd94HYPmZ`oIJGo2c+?^9>Xc;70_UeYNR1*=O6*>uyXEWnH*E^c| zOl^8yjvg{Och3`1=S(dR3IL|AyxIQ6K~q;JJb}XlX{3^8EK^r%y>w3~5#0tTcBQSs z^w4nb)3;Q|vGx+tp9Mn!z%;V^QpwZK=+G}Y{mx`7{V{sCpSasRTXt3`5sh)zZHRwX zqfYg-?0sB3vtKv=IULW=dQK<+xUSte*ne}P=hoK%fUnNJXK-@Q5z(!=a)nINs^TTf zv%BBFN|GF$08sp&rzsI35G=a3AY5XAvF-oMh@O1g$9EK2H literal 0 HcmV?d00001 diff --git a/images/markers/ol-marker-gold.png b/images/markers/ol-marker-gold.png new file mode 100644 index 0000000000000000000000000000000000000000..2ff9ec52813915962a1f15d9b481cb769b102d18 GIT binary patch literal 831 zcmV-F1Hk-=P)X1^@s6-qmI800004b3#c}2nYxW zdR7i=X zm0L(uQ51&1J>KS=IZl?TU6ANPJtT>sX4w@Xirx%_Uc%}vgDw!1LJ*};FA<>_71o1g zqy>seJ(OK2%Y>whsZl`}1fy)6GdeRms|Ot!ouf{=;D6cs-{1Kci?cT(!gK=GL`PEv z%#FxDogq4kBHfOemxE8&=mj>+7z!lBJ7`?Bl>V+JL^_a$3S^FfN4HZ7MEw^O$Z=@& z9N5i(w|xW{)X&FAZU&~)pbbc!77D1iSc;tnW_`tYSg3~IBc+G&>vsBq{7IoeveUuS z%ryGHH%|@>RZ9)BAPFNMK{8wfWIY zSic*J&%??c;Bs60_U5BjuRwq#8*sU&moHU!5i4`u0~qvzXAo=(9=2FRYwtt%SAO`1 zC<_iLJHd(RdL2HDhu09@J|aU${Cokgj`>7X^7XWHBDN3nDS{&W)8qk-eTDNFbA3i}=0sWooOO6^*n z%Jt4B98pn|16^)dl82|y#TF514c)U%G>b@G?;koY-6Akm$`j}D28OAf2n<53ZmINm z2cADKt^fHqcM;u=3z%nhJ}l|zhuTHBU2*|$_#PA%V|slY6_MYTZA@`VCuwoGI~vEQ zyjn`YY4DcOdHnZt5*x#@%~`mEz~3#1)4&8WX8cA0F^10f#>x@s{#^_hI#*`>@Buqh z7vO$=1JUgC0SU8)iU>}FXUT~SDn(%={)nJJdTb2UQw=9n{{ZUlb)-Lb_=Nxf002ov JPDHLkV1l45bA|u_ literal 0 HcmV?d00001 diff --git a/images/markers/ol-marker-green.png b/images/markers/ol-marker-green.png new file mode 100644 index 0000000000000000000000000000000000000000..17168f1b91a857283440eb923328ff7743c276d8 GIT binary patch literal 967 zcmV;&133JNP)X1^@s6-qmI800004b3#c}2nYxW zdd3EAu<8`J~$<(~h1 z_s%`%%mERh(gN_DqAEWE*tR8oC4u5oj%j|)+WGR%f*#N_0ABppPynH->Z+gX8|!o7 z+hK}4j?j_5BV;^j*t%cu0pQyxmMsHHj4`%P59skd2lmvo_p}?TuCDqP=N8fXZm<1t z^5I>cy6g#M zjMW=KW1z0FuDRnvM|Eg>$P>8MW`3W+`M1y8!V*!jB;F&U{3?_&_KF_Rqx+BUf1aP&HHF>Z$?c+ zji)AICMebw6VjC@71wby!MdQ_@xl&I@zjkeL|%(v=zAa!=jfxAwAzXB!AW zodV$d?4#_1QFFAs3;>J|j-$wnaPkhA!jQa?^n{N6G=|J{CgnQrmkJS)$cc{lC-FSb zmEWT2%_gXZ3eB&9Bw^P}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oZC*?Lbn{Ze)ZWLVECFcub9ig{7dJF9OM_q17l)A4I;o6*-iF%&;R! z4cUjp!0kv0-UGe7fwHn65wk1trbAFa&C#<3$qNB%E32v%iI=e~zLQ%q8;tF9m1n7M zqAh8JF7zZ^-tf9l!`BjK@>zuArnz|E+Mw+t9k@xs8!6zamtas{zW34^SGHred-?#44d9=EfLT)#a}2AJ{^Zg2DmC{%=T{D5qZL0WY=!dO7 zPk9b0L3=SyEZxJ08BKGU?0(^s1;1cNF{v4u&L&c{b=tqMIPwZIWk)$Lc!_}GJYxN7 zA+nKtP4g|xB48u3-kq(k!mc84j>k&sI_)!*XAGh&?JT$8y!%uq7X;&<;@0Cs>u-LoRm@%Mv=VGVu>GpDrxb{ECv84irV- zAW}cj^UqkQx{evnsy>S6X3iG)x=-=BzC89G1@A}c{5yCr_9wF6n^+Qc4GSYKqd?t8 z{kI$n)a_K57rDAHC@&()cQbnu-Z!@h)wA7`pPHiYz!>u*3L@Ibb}t}Xar!wZ7<&@* zv<=VEz`e^;ws1CWWoc8z$1&76PxN_`7IF}a)Yp(Vw`J(;|5pQE97Q6T5b!yKLSY$S zLKGmj8Qf^Nk2+8C z=yG!m>6z)Qe&FU9+-Gm=`n^EFEa&8V6mG@NadB}E>+0$tl}fk1@Cmvh4PgR7JevOt zj5ReiFqus3fHdYcnpp%K92^eS*Vn_}-~V@d96#0sCTldB-km#lLL?G>%)DkZhrp8R z>S`E`M)sp-%n6XFd{|gm2v1MX8}w*1<^%)+fx*Sa1(ueU@r)VGoGoyoEEq<*=b203 YA9@CK7|n9e!vFvP07*qoM6N<$g7*l79{>OV literal 0 HcmV?d00001 diff --git a/images/markers/red-pushpin.png b/images/markers/red-pushpin.png new file mode 100644 index 0000000000000000000000000000000000000000..203512d5cdf92a3ccddbd69e84e239272c9b4ed3 GIT binary patch literal 1334 zcmV-61Px#AY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF* zm;eA5Z<1fdMgRZ+32;bRa{vGf6951U69E94oEQKA1fNMnK~z}7#aC@iQ&$*np;U{E z*4he7Mwv2|j}QwOhA}E)#eP@?K|X>A2tg50G^m7RA=$!~Y)I&aKW1s?m3sswh%NK_v%javgE#X@#5~#g$u8GDU~(&JqHK|++K8eMqB@pKw9~#RYWBvL>w&EBq}JFyzbvmWBK`XDKU}Kf`cDJ zna{A_C^Z3pv%mk)FEHL607&<+EY@fH!Y3E5uWnZtJzB(QW41fA}NXYlH0V2 zPQd$vAag&wbHP{(zzm;3 zIG75bgUmUQISQ}yLqq8;wYnY0BBaUzOW)N zUS4h39|fqStOBb8Wk^uq+LkRm0VeYl7?~fCoK@%**jp%hADF999O=r-DZ0 zo9*dS$lvxH`P;W{rPAjW!*w*Z0Dn_pAxXWwNqnOflyD2s|FzzMbylxd#Ss!(az$of*Cb zu;)(T$N2ckM8x&I$VjF_f|wl8Ez@c{dg0|G5V#40?8V=q#ZI+cmV`|DMge?V23oPF z9^t@uK&99+3|ypEcQs(h^gz~DWcgIRH$4YVp&CwMB)iGw?@G~#eCH?>b$KBn+Wh>6OCloZ!>B0w1k4aXTx+r|2Oa4_H z?{GM%y1JTe*u@9|aX>nd3nU9)!R{~R{{pR6Tg!1A*=)8)c=VIaVu>LzABOu|T3QH1 z&d6rD#1P=+uc)YCf6RL21avyxahJ-v4+3l*1qx&$*G#tl0#IU@)NF*~umAu607*qoM6N<$g45SsZvX%Q literal 0 HcmV?d00001 diff --git a/images/markers/ylw-pushpin.png b/images/markers/ylw-pushpin.png new file mode 100644 index 0000000000000000000000000000000000000000..c33c52034842326d224841d0ba5a9b14275f4086 GIT binary patch literal 1233 zcmV;?1TOoDP)Px#AY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF* zm;eA5Z<1fdMgRZ+32;bRa{vGf6951U69E94oEQKA1UgAXK~z}7#g}hL)OQ@m-@oto z_md>2Qxsf8#>V1qtv%>L4+g&o_kMjp-_M`l4EY5=bR(A3Ygqz@<6N)DiIfV^G1vA_5*mw5`ers z*${~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lcmV>;4Bv@o;d;n4CBjO*wY**l|KgF1&dsKlzqQ|bHLB= zKh6!4%{u{l=-pqzAs|QQ#cL{Bxm+$13fs_-N8JT4XOnP`8`)&w9H0r z;_epR;yo_szJc`{bht{YzP`REySuy75coa9cV}B$+mYVh-e6Z(mwSGGUUF~)Uq8&8 zm4(`vU$O}=)58rEa~F7#i%ik;x6osSwvnH2axU@eEYLHj4NQl6@H#i|%C43WyLY44 z+J8rrK^;D2QYni^?f+)-lUy!4>vFlaL2!e~WYQ9eMAq;3pPQSTlgj%xmy zhP~CRTN{mPA*xfUWxbmGIg<4+WU3gRVm0(&kbM$P@+G%lr=wMlt%<@BSE?}meJq(x z+8$r8Wp%3qVk4SbO6pW-NmH?eF3fQS!EsVB3CFJMc$b)_=(0>>81LTbwXA7%nEn!* z(nG9H9h!+Qh8LGR8ICK$N_yC0(sm4ct!pHVFGT+#HcGJpbpx59x=Oph$!_>Fd_` + * + * USAGE: + * + * staticmap.php?center=40.714728,-73.998672&zoom=14&size=512x512&maptype=mapnik&markers=40.702147,-74.015794,blues|40.711614,-74.012318,greeng|40.718217,-73.998284,redc + * + */ + +error_reporting(0); +ini_set('display_errors', 'off'); + +Class staticMapLite +{ + + protected $maxWidth = 500; + protected $maxHeight = 500; + + protected $tileSize = 256; + protected $tileSrcUrl = array('mapnik' => 'https://a.tile.openstreetmap.org/{Z}/{X}/{Y}.png', + 'osmarenderer' => 'https://otile1.mqcdn.com/tiles/1.0.0/osm/{Z}/{X}/{Y}.png', + 'cycle' => 'https://a.tile.opencyclemap.org/cycle/{Z}/{X}/{Y}.png', + ); + + protected $tileDefaultSrc = 'mapnik'; + protected $markerBaseDir = 'images/markers'; + protected $osmLogo = 'images/osm_logo.png'; + + protected $markerPrototypes = array( + 'default' => array('regex' => '/^marker-icon$/', + 'extension' => '.png', + 'shadow' => false, + 'offsetImage' => '-12,-40', + 'offsetShadow' => false + ) + ); + + + protected $useTileCache = true; + protected $tileCacheBaseDir = '.cache/tiles'; + + protected $useMapCache = true; + protected $mapCacheBaseDir = '.cache/maps'; + protected $mapCacheID = ''; + protected $mapCacheFile = ''; + protected $mapCacheExtension = 'png'; + + protected $zoom, $lat, $lon, $width, $height, $markers, $image, $maptype; + protected $centerX, $centerY, $offsetX, $offsetY; + + public function __construct() + { + $this->zoom = 0; + $this->lat = 0; + $this->lon = 0; + $this->width = 500; + $this->height = 500; + $this->markers = array(); + $this->maptype = $this->tileDefaultSrc; + } + + public function parseParams() + { + global $_GET; + + if (!empty($_GET['show'])) { + $this->parseOjwParams(); + } + else { + $this->parseLiteParams(); + } + } + + public function parseLiteParams() + { + // get zoom from GET paramter + $this->zoom = $_GET['zoom'] ? intval($_GET['zoom']) : 0; + if ($this->zoom > 18) $this->zoom = 18; + + // get lat and lon from GET paramter + list($this->lat, $this->lon) = explode(',', $_GET['center']); + $this->lat = floatval($this->lat); + $this->lon = floatval($this->lon); + + // get size from GET paramter + if ($_GET['size']) { + list($this->width, $this->height) = explode('x', $_GET['size']); + $this->width = intval($this->width); + if ($this->width > $this->maxWidth) $this->width = $this->maxWidth; + $this->height = intval($this->height); + if ($this->height > $this->maxHeight) $this->height = $this->maxHeight; + } + if (!empty($_GET['markers'])) { + $markers = explode('|', $_GET['markers']); + foreach ($markers as $marker) { + list($markerLat, $markerLon, $markerType) = explode(',', $marker); + $markerLat = floatval($markerLat); + $markerLon = floatval($markerLon); + $markerType = 'ol-marker';//basename($markerType); + $this->markers[] = array('lat' => $markerLat, 'lon' => $markerLon, 'type' => $markerType); + } + + } + if ($_GET['maptype']) { + if (array_key_exists($_GET['maptype'], $this->tileSrcUrl)) $this->maptype = $_GET['maptype']; + } + } + + public function parseOjwParams() + { + $this->lat = floatval($_GET['lat']); + $this->lon = floatval($_GET['lon']); + $this->zoom = intval($_GET['z']); + + $this->width = intval($_GET['w']); + if ($this->width > $this->maxWidth) $this->width = $this->maxWidth; + $this->height = intval($_GET['h']); + if ($this->height > $this->maxHeight) $this->height = $this->maxHeight; + + + if (!empty($_GET['mlat0'])) { + $markerLat = floatval($_GET['mlat0']); + if (!empty($_GET['mlon0'])) { + $markerLon = floatval($_GET['mlon0']); + $this->markers[] = array('lat' => $markerLat, 'lon' => $markerLon, 'type' => "ol-marker"); + } + } + } + + public function lonToTile($long, $zoom) + { + return (($long + 180) / 360) * pow(2, $zoom); + } + + public function latToTile($lat, $zoom) + { + return (1 - log(tan($lat * pi() / 180) + 1 / cos($lat * pi() / 180)) / pi()) / 2 * pow(2, $zoom); + } + + public function initCoords() + { + $this->centerX = $this->lonToTile($this->lon, $this->zoom); + $this->centerY = $this->latToTile($this->lat, $this->zoom); + $this->offsetX = floor((floor($this->centerX) - $this->centerX) * $this->tileSize); + $this->offsetY = floor((floor($this->centerY) - $this->centerY) * $this->tileSize); + } + + public function createBaseMap() + { + $this->image = imagecreatetruecolor($this->width, $this->height); + $startX = floor($this->centerX - ($this->width / $this->tileSize) / 2); + $startY = floor($this->centerY - ($this->height / $this->tileSize) / 2); + $endX = ceil($this->centerX + ($this->width / $this->tileSize) / 2); + $endY = ceil($this->centerY + ($this->height / $this->tileSize) / 2); + $this->offsetX = -floor(($this->centerX - floor($this->centerX)) * $this->tileSize); + $this->offsetY = -floor(($this->centerY - floor($this->centerY)) * $this->tileSize); + $this->offsetX += floor($this->width / 2); + $this->offsetY += floor($this->height / 2); + $this->offsetX += floor($startX - floor($this->centerX)) * $this->tileSize; + $this->offsetY += floor($startY - floor($this->centerY)) * $this->tileSize; + + for ($x = $startX; $x <= $endX; $x++) { + for ($y = $startY; $y <= $endY; $y++) { + $url = str_replace(array('{Z}', '{X}', '{Y}'), array($this->zoom, $x, $y), $this->tileSrcUrl[$this->maptype]); + $tileData = $this->fetchTile($url); + if ($tileData) { + $tileImage = imagecreatefromstring($tileData); + } else { + $tileImage = imagecreate($this->tileSize, $this->tileSize); + $color = imagecolorallocate($tileImage, 255, 255, 255); + @imagestring($tileImage, 1, 127, 127, 'err', $color); + } + $destX = ($x - $startX) * $this->tileSize + $this->offsetX; + $destY = ($y - $startY) * $this->tileSize + $this->offsetY; + imagecopy($this->image, $tileImage, $destX, $destY, 0, 0, $this->tileSize, $this->tileSize); + } + } + } + + + public function placeMarkers() + { + // loop thru marker array + foreach ($this->markers as $marker) { + // set some local variables + $markerLat = $marker['lat']; + $markerLon = $marker['lon']; + $markerType = $marker['type']; + // clear variables from previous loops + $markerFilename = ''; + $markerShadow = ''; + $matches = false; + // check for marker type, get settings from markerPrototypes + if ($markerType) { + foreach ($this->markerPrototypes as $markerPrototype) { + if (preg_match($markerPrototype['regex'], $markerType, $matches)) { + $markerFilename = $matches[0] . $markerPrototype['extension']; + if ($markerPrototype['offsetImage']) { + list($markerImageOffsetX, $markerImageOffsetY) = explode(",", $markerPrototype['offsetImage']); + } + $markerShadow = $markerPrototype['shadow']; + if ($markerShadow) { + list($markerShadowOffsetX, $markerShadowOffsetY) = explode(",", $markerPrototype['offsetShadow']); + } + } + + } + } + + // check required files or set default + if ($markerFilename == '' || !file_exists($this->markerBaseDir . '/' . $markerFilename)) { + $markerIndex++; + $markerFilename = 'marker-icon' . $markerIndex . '.png'; + $markerImageOffsetX = -12; + $markerImageOffsetY = -40; + } + + // create img resource + if (file_exists($this->markerBaseDir . '/' . $markerFilename)) { + $markerImg = imagecreatefrompng($this->markerBaseDir . '/' . $markerFilename); + } else { + $markerImg = imagecreatefrompng($this->markerBaseDir . '/marker-icon.png'); + } + + // check for shadow + create shadow recource + if ($markerShadow && file_exists($this->markerBaseDir . '/' . $markerShadow)) { + $markerShadowImg = imagecreatefrompng($this->markerBaseDir . '/' . $markerShadow); + } + + // calc position + $destX = floor(($this->width / 2) - $this->tileSize * ($this->centerX - $this->lonToTile($markerLon, $this->zoom))); + $destY = floor(($this->height / 2) - $this->tileSize * ($this->centerY - $this->latToTile($markerLat, $this->zoom))); + + // copy shadow on basemap + if ($markerShadow && $markerShadowImg) { + imagecopy($this->image, $markerShadowImg, $destX + intval($markerShadowOffsetX), $destY + intval($markerShadowOffsetY), + 0, 0, imagesx($markerShadowImg), imagesy($markerShadowImg)); + } + + // copy marker on basemap above shadow + imagecopy($this->image, $markerImg, $destX + intval($markerImageOffsetX), $destY + intval($markerImageOffsetY), + 0, 0, imagesx($markerImg), imagesy($markerImg)); + + }; + } + + + public function tileUrlToFilename($url) + { + return $this->tileCacheBaseDir . "/" . str_replace(array('http://','https://'), '', $url); + } + + public function checkTileCache($url) + { + $filename = $this->tileUrlToFilename($url); + if (file_exists($filename)) { + return file_get_contents($filename); + } + } + + public function checkMapCache() + { + $this->mapCacheID = md5($this->serializeParams()); + $filename = $this->mapCacheIDToFilename(); + if (file_exists($filename)) return true; + } + + public function serializeParams() + { + return join("&", array($this->zoom, $this->lat, $this->lon, $this->width, $this->height, serialize($this->markers), $this->maptype)); + } + + public function mapCacheIDToFilename() + { + if (!$this->mapCacheFile) { + $this->mapCacheFile = $this->mapCacheBaseDir . "/" . $this->maptype . "/" . $this->zoom . "/cache_" . substr($this->mapCacheID, 0, 2) . "/" . substr($this->mapCacheID, 2, 2) . "/" . substr($this->mapCacheID, 4); + } + return $this->mapCacheFile . "." . $this->mapCacheExtension; + } + + + public function mkdir_recursive($pathname, $mode) + { + is_dir(dirname($pathname)) || $this->mkdir_recursive(dirname($pathname), $mode); + return is_dir($pathname) || @mkdir($pathname, $mode); + } + + public function writeTileToCache($url, $data) + { + $filename = $this->tileUrlToFilename($url); + $this->mkdir_recursive(dirname($filename), 0777); + file_put_contents($filename, $data); + } + + public function fetchTile($url) + { + if ($this->useTileCache && ($cached = $this->checkTileCache($url))) return $cached; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + if (!empty($_SERVER['HTTP_USER_AGENT'])) { + curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); + } else { + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13'); + } + curl_setopt($ch, CURLOPT_URL, $url); + $tile = curl_exec($ch); + curl_close($ch); + if ($tile && $this->useTileCache) { + $this->writeTileToCache($url, $tile); + } + return $tile; + + } + + public function copyrightNotice() + { + $logoImg = imagecreatefrompng($this->osmLogo); + imagecopy($this->image, $logoImg, imagesx($this->image) - imagesx($logoImg), imagesy($this->image) - imagesy($logoImg), 0, 0, imagesx($logoImg), imagesy($logoImg)); + + } + + public function sendHeader() + { + header('Content-Type: image/png'); + $expires = 60 * 60 * 24 * 14; + header("Pragma: public"); + header("Cache-Control: maxage=" . $expires); + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT'); + } + + public function makeMap() + { + $this->initCoords(); + $this->createBaseMap(); + if (count($this->markers)) $this->placeMarkers(); + //if ($this->osmLogo) $this->copyrightNotice(); + } + + public function showMap() + { + $this->parseParams(); + if ($this->useMapCache) { + // use map cache, so check cache for map + if (!$this->checkMapCache()) { + // map is not in cache, needs to be build + $this->makeMap(); + $this->mkdir_recursive(dirname($this->mapCacheIDToFilename()), 0777); + imagepng($this->image, $this->mapCacheIDToFilename(), 9); + $this->sendHeader(); + if (file_exists($this->mapCacheIDToFilename())) { + return file_get_contents($this->mapCacheIDToFilename()); + } else { + return imagepng($this->image); + } + } else { + // map is in cache + $this->sendHeader(); + return file_get_contents($this->mapCacheIDToFilename()); + } + + } else { + // no cache, make map, send headers and deliver png + $this->makeMap(); + $this->sendHeader(); + return imagepng($this->image); + + } + } + +} + +$map = new staticMapLite(); +print $map->showMap(); \ No newline at end of file