PHP Classes

File: sample_googlegpx.php

Recommend this page to a friend!
  Classes of Tom Schaefer   QXML   sample_googlegpx.php   Download  
File: sample_googlegpx.php
Role: Example script
Content type: text/plain
Description: GPX XML from Google Routes
Class: QXML
XML <> Array (preserve attrib.), JSON, etc.
Author: By
Last change:
Date: 15 years ago
Size: 605 bytes


Class file image Download
include_once 'classes/QSet.class.php';
include_once 'classes/QGoogleMapToGPX.class.php';

$key = ""; // just provide your own GoogleApi Key

$url = '';
$url .= '&saddr='. urlencode("Barbarossa Platz 1, Köln, Erftstadt");
$url .= '&daddr='. urlencode("L182 @50.724248, 6.914609 to:L192 @50.778430, 6.990120 to:Meckenheimer Allee @50.731026, 7.094984");

$url . '';
$url .= '&ie=UTF8&t=h&z=12';

$object = new QGoogleMapToGPX($url);
$object->set("", "GoogleMap - Route");

print $object->asXML();