You are here

function gmap_gpx_parse_file in GMap Addons 7

Same name and namespace in other branches
  1. 5 gmap_gpx.inc \gmap_gpx_parse_file()
  2. 6 gmap_gpx.inc \gmap_gpx_parse_file()
1 call to gmap_gpx_parse_file()
_gmap_cck_get_gpx in ./gmap_cck.module
process gpx-parameter to show something on the map

File

./gmap_gpx.inc, line 8

Code

function gmap_gpx_parse_file($gpxfile) {
  if (!file_exists($gpxfile)) {
    return false;
  }
  $fp = @fopen($gpxfile, "r");
  if (!$fp) {
    return false;
  }
  $data = fgets($fp, 8192);
  while (!feof($fp)) {
    $data .= fgets($fp, 8192);
  }
  fclose($fp);
  return gmap_gpx_parse($data);
}