Skip to content

Commit

Permalink
modified: ../KML.html
Browse files Browse the repository at this point in the history
	modified:   ../ex.kml
	modified:   Format.class.php
	modified:   Format/KML.class.php
	modified:   Geometry.class.php
	modified:   Geometry/Collection.class.php
	modified:   Geometry/LinearRing.class.php
	new file:   Geometry/MultiPoint.class.php
	modified:   Util.class.php
	modified:   ../simpleKMLTest.php
	deleted:    ../tests/test.php
	../KMLParserDemo.php
	../tests/feature/
	../tests/format/
	../tests/geometry/
  • Loading branch information
rccc committed Sep 10, 2009
1 parent 2b04daf commit 5b13533
Show file tree
Hide file tree
Showing 11 changed files with 864 additions and 153 deletions.
1 change: 1 addition & 0 deletions KML.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
}
f.read(test_nl);
}

function test_Format_KML_readCdataAttributes_21(t) {
t.plan(2);
var cdata = '<kml xmlns="http://earth.google.com/kml/2.1"><Document><Placemark><name><![CDATA[Pezinok]]></name><description><![CDATA[Full of text.]]></description><styleUrl>#rel1.0</styleUrl><Point> <coordinates>17.266666, 48.283333</coordinates></Point></Placemark></Document></kml>';
Expand Down
9 changes: 1 addition & 8 deletions ex.kml
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<NetworkLink>
<Link>
<href>http://kml-samples.googlecode.com/svn/trunk/morekml/Network_Links/Targets/Network_Links.Targets.Simple.kml</href>
</Link>
</NetworkLink>
</kml>
<?xml version="1.0" encoding="utf-8"?><kml xmlns="http://earth.google.com/kml/2.0"> <Placemark> <Style> <LineStyle> <color>870000ff</color> <width>10</width> </LineStyle> </Style> <LineString> <coordinates> -112,36 -113,37 </coordinates> </LineString> </Placemark></kml>
20 changes: 12 additions & 8 deletions lib/Format.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@

class Format
{
/**
* A reference to options passed to the constructor.
* @var array
*/

public $options = array();

/**
* When passed a externalProjection and
* internalProjection, the format will reproject the geometries it reads or writes.
Expand Down Expand Up @@ -54,6 +47,11 @@ class Format

public $keepData = false;


public function __set($name, $value) {
$this->$name = $value;
}

/**
*
* @param $options array
Expand All @@ -63,6 +61,12 @@ class Format
public function __construct($options = array())
{
if(!empty($options))
$this->options = Util::extend($this->options, $options);
{
foreach($options as $property => $value):
$this->__set($property, $value);
endforeach;
}

// $this->options = Util::extend($this->options, $options);
}
}
Loading

0 comments on commit 5b13533

Please sign in to comment.