Login   Register  
PHP Classes
elePHPant
Icontem

File: svgDrawer.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of david boardman  >  GPX Mapper & CMS  >  svgDrawer.php  >  Download  
File: svgDrawer.php
Role: Example script
Content type: text/plain
Description: svgDrawer class callback
Class: GPX Mapper & CMS
Save maps GPX location files from coordinates
Author: By
Last change:
Date: 2006-11-09 12:51
Size: 1,043 bytes
 

Contents

Class file image Download
<?
/*        
    SVG Mapper
    Version: 1.0 
    Author: David Boardman
    URL: http://www.netzfunk.org/?usr=d
    Licenced under Creative Commons Attribution-NonCommercial-ShareAlike 2.5
    If redistributed in any form, please include credits and a link to http://www.netzfunk.org/?usr=d
*/
include('inc/config.php');
set_time_limit($config['timelimit']);
require_once(
"cls/cls.svgDrawer.php");
require_once(
'cls/cls.SofeeXmlParser.php'); 
// VARS
$path=$config['mainfolder'].$config['svgfolder'];
$mapname="svg5";
$mapwidth=1800;
$mapheight=1200;
$scale=2000;
$xmlfile="esempioGPX.xml";
// PARSING FILE GPX
$xml = new SofeeXmlParser(); 
$xml->parseFile($config['gpxfolder']."/",$xmlfile); 
$tree $xml->getTree(); 
unset(
$xml); 
// ISTANZA SVGMAPPER
$svg=new svgDrawer($config,$mapwidth,$mapheight,$mapname,$path,$tree,$scale);
// COLLECT DATA
//$meta=$svg->collectMETA();
$wpt=$svg->collectWPT();
//$rte=$svg->collectRTE();
//$trk=$svg->collectTRK();
$trkpt=$svg->collectTRKPT();
// BUILD MAP
$svg->svgMap();
$svg->saveSVG();

$svg->gotoSVG();
?>