You are here

function legacy__gmap_str2coord in GMap Module 7.2

Parse "x.xxxxx , y.yyyyyy (+ x.xxxxx, y.yyyyy ...)" into an array of points. @internal

1 call to legacy__gmap_str2coord()
legacy__gmap_parse_macro in tests/inc/gmap_parse_macro.inc

File

tests/inc/gmap_parse_macro.inc, line 54
GMap macro parsing routines.

Namespace

tests\inc

Code

function legacy__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;
}