]> git.mxchange.org Git - friendica.git/blob - include/map.php
Issue 2122: Make sure to always return the correct number of entries
[friendica.git] / include / map.php
1 <?php
2
3 /**
4  * Leaflet Map related functions
5  */
6  
7  function generate_map($coord) {
8         $coord = trim($coord);
9         $coord = str_replace(array(',','/','  '),array(' ',' ',' '),$coord);
10         $arr = array('lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => '');
11         call_hooks('generate_map',$arr);
12         return (($arr['html']) ? $arr['html'] : $coord);
13 }
14 function generate_named_map($location) {
15         $arr = array('location' => $location, 'html' => '');
16         call_hooks('generate_named_map',$arr);
17         return (($arr['html']) ? $arr['html'] : $location);
18 }