<?php #-*-Mode: php; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/*
jjfMapper, a cartography program for PHP 4.
Copyright (C) 2004 John J Foerch
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
class geoformat {
/* Think of the geoformat class as an abstract base class
* for all geoformats. It defines an interface that all
* geoformats must follow.
*/
function parse_instructions(&$ops, &$symbols) {
echo ("geoformat::parse_instructions() - Override this.\n");
return false;
}
/* Your draw routine will receive as a parameter
* a reference to an object of type projection,
* which contains a gd image called $mapimage,
* and an array of palette values called $palette.
* It also has a method, TranslateXY which will
* convert longitude and latitude to x and y values
* that can be plotted to $mapimage.
*/
function draw(&$projection) {
echo ("geoformat::draw() - Override this.\n");
}
function bounds() {
echo ("geoformat::bounds() - Override this.\n");
return array(0,0,0,0);
}
function validate() {
echo ("geoformat::validate() - Override this.\n");
return true;
}
////////////
//FIELDS
//
//if you need to indicate to the calling program that
//your constructor has failed, set $ok to false and
//set $error to an error string.
var $ok=true;
var $error=false;
}
?>