From bb5588b5eb8d6c292c78ce276774c75dac2386fc Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 18:10:12 -0800 Subject: [PATCH] add openstreetmap --- openstreetmap.tgz | Bin 0 -> 698 bytes openstreetmap/openstreetmap.php | 51 ++++++++++++++++++++++++++++++++ randplace.tgz | Bin 2073 -> 2086 bytes randplace/randplace.php | 5 ++-- 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 openstreetmap.tgz create mode 100755 openstreetmap/openstreetmap.php diff --git a/openstreetmap.tgz b/openstreetmap.tgz new file mode 100644 index 0000000000000000000000000000000000000000..85da07487d2eb6a31c2154b96b0b9a70756d3b63 GIT binary patch literal 698 zcmV;r0!95FiwFR7d^Ar01MQSuZ<{a_hPf@j;s{j*s)~;^gencGChfM{#kAd2Q{{m} zPysVz+HO_<`)nXlXos?kw!7$gM5GuWzvn&2Hmss$EjXp3AeF1V3Z5hk18ova!^vc- zdBJQloBHkh9?kbdKk&k7IF1=kYLGU_uhBUPx96&2boM!wsD@Wq0G?@8kXJ>EW z=?!6n{U3~+YF)iZjy?N73H;fU{SPOhuYva>+4u0y_kVFAcUgCjk99bPPo$u8_$&_r zd}&VsT#`yne57^Evr1&FoWs|e!tkIlp2CW8NV2-h$*-(TA!jjB;kBdIf1|u^*ZPj9 z#vdB7W_%8p*$tIB`p&~*EkreU-R)jDF)Q4PvsIQ;w~)b0wOan<ueX-v(fcY_iA<1N@g!6> zMhV2MDTUQ9v0({*C$iJE{mtk#|Gg7A5l?&3Ik@t=CLHCg9EtGzh~JDAk?#%KwPU2~ zm8$YlSC6b!nvi0>klod(dbnw_-PXN59*(O02M2e#s4G%JoRhkajJl9lMbLX;EUh+m z*C?6NUbrf7sSe!%&1*W;Q*t9hL!BKNX}m9OEs9)L7Qt5VTzy|e!^`%f{O_+hf*=Tj gAP9mW2!bF8f*=TjAP9mW2=ZR}1F4UZC;%t`0FzW--2eap literal 0 HcmV?d00001 diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php new file mode 100755 index 00000000..d76414c4 --- /dev/null +++ b/openstreetmap/openstreetmap.php @@ -0,0 +1,51 @@ + + * + * + */ + + +function openstreetmap_install() { + + register_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location'); + + logger("installed openstreetmap"); +} + + +function openstreetmap_uninstall() { + + unregister_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location'); + + logger("removed openstreetmap"); +} + + + +function openstreetmap_location($a, &$item) { + + $location = ''; + $coord = ''; + + $location = (($item['location']) ? '' . $item['location'] . '' : ''); + + if($item['coord']) { + $coords = explode(' ', $item['coord']); + if(count($coords) > 1) { + $coord = '' . $item['coord'] . '' ; + } + } + if(strlen($coord)) { + if($location) + $location .= '
(' . $coord . ')'; + else + $location = '' . $coord . ''; + } + $item['html'] = $location; + return; +} + diff --git a/randplace.tgz b/randplace.tgz index 937c02d5eeefb1d4c669ce3fd41c7e4235b71af2..98b28a9dc2b10fc991cd80437d707bd1119242dd 100755 GIT binary patch literal 2086 zcmV+>2-)`^iwFR7d^Ar01MOICZyPrf_E-B?O!ow@oRjt9L~&rp4uWg%THNJQ#JTGS zHxQ^@N@BgcT##HlZjt|fGeho+VmZMTZu%i2{IVj4!+Cl5%&d$k(lQf?9PRvJV~pc? zI^8*%J~=)*da^T~K0SK+WWw`d>`W%dlj)e2aeZ=xA9i5+$C=cQ$~s{Hc5;y{mAO{M zJ#yu8`gHQ_*|RTU(-$13$$#@SELY`&p27J)zAyii$zWM5^!a7wR@$7vD|IE|RhS55-6Nl%1=`!});&+!Z`x(E3Gl;$ClY#$#G>|SC#;0NTPvo_?zz7N* zC=01{GI25;bZtpQmRX+gifDI%iI}MZp_yg<16Wi=LOKSJ=|rFca=@E1B2oTB4#Wf6 zjS)xpW15WVSkg@&Kri^&=ZYkM=uD8Lk-5G`^$UaPqZJ>3D!7oLH{N#I9PGbQS;kH@ z=gg|&uI(YLqrJVodI}oK>G=BF-rg?3ahG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