function _gmap_str2coord in GMap Module 5
Same name and namespace in other branches
- 6.2 gmap_parse_macro.inc \_gmap_str2coord()
- 6 gmap_parse_macro.inc \_gmap_str2coord()
- 7.2 gmap_parse_macro.inc \_gmap_str2coord()
- 7 gmap_parse_macro.inc \_gmap_str2coord()
Parse "x.xxxxx , y.yyyyyy (+ x.xxxxx, y.yyyyy ...)" into an array of points. @internal
1 call to _gmap_str2coord()
File
- ./
gmap_parse_macro.inc, line 48 - GMap macro parsing routines.
Code
function _gmap_str2coord($str) {
// Explode along + axis
$arr = explode('+', $str);
// Explode along , axis
$points = array();
foreach ($arr as $pt) {
list($lat, $lon) = explode(',', $pt);
$points[] = array(
(double) trim($lat),
(double) trim($lon),
);
}
return $points;
}