mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
Map is moved to the new place
This commit is contained in:
parent
9d574f6666
commit
ea10a7c002
5 changed files with 10 additions and 10 deletions
18
src/Util/Map.php
Normal file
18
src/Util/Map.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Leaflet Map related functions
|
||||
*/
|
||||
|
||||
function generate_map($coord) {
|
||||
$coord = trim($coord);
|
||||
$coord = str_replace(array(',','/',' '),array(' ',' ',' '),$coord);
|
||||
$arr = array('lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => '');
|
||||
call_hooks('generate_map',$arr);
|
||||
return (($arr['html']) ? $arr['html'] : $coord);
|
||||
}
|
||||
function generate_named_map($location) {
|
||||
$arr = array('location' => $location, 'html' => '');
|
||||
call_hooks('generate_named_map',$arr);
|
||||
return (($arr['html']) ? $arr['html'] : $location);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue