Add GeoRSS layer and example. Only support for georss:point for the time being. Probably has a fair number of cases where it can fail, but it works for a first run, and the community can build from here :)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@778 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
36
examples/georss.html
Normal file
36
examples/georss.html
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||||
|
<style type="text/css">
|
||||||
|
#map {
|
||||||
|
width: 800px;
|
||||||
|
height: 475px;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="../lib/OpenLayers.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
<!--
|
||||||
|
var map, layer;
|
||||||
|
|
||||||
|
function init(){
|
||||||
|
map = new OpenLayers.Map('map', {maxResolution:'auto'});
|
||||||
|
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||||
|
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||||
|
|
||||||
|
map.addLayer(layer);
|
||||||
|
|
||||||
|
var newl = new OpenLayers.Layer.GeoRSS( "text", "./georss.xml" );
|
||||||
|
map.addLayer(newl);
|
||||||
|
|
||||||
|
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||||
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||||
|
}
|
||||||
|
// -->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="init()">
|
||||||
|
<h1>OpenLayers Example</h1>
|
||||||
|
<div id="map"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
378
examples/georss.xml
Normal file
378
examples/georss.xml
Normal file
@@ -0,0 +1,378 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/rss.css" ?>
|
||||||
|
|
||||||
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns="http://purl.org/rss/1.0/"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:georss="http://www.georss.org/georss">
|
||||||
|
<docs>This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: <span>http://platial.typepad.com/news/2006/04/really_simple_t.html</span> for more info.</docs><channel rdf:about="http://platial.com">
|
||||||
|
<link>http://platial.com</link>
|
||||||
|
<title>Crschmidt's Places At Platial</title>
|
||||||
|
<description></description>
|
||||||
|
<items>
|
||||||
|
<rdf:Seq>
|
||||||
|
<rdf:li resource="http://platial.com/place/90306"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/67230"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/65645"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/62200"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28232"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/43666"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28394"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28251"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28392"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28391"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28231"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28393"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/31685"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28596"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28595"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28594"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28593"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28592"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28591"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28590"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28589"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28588"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28587"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28586"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28585"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28584"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28583"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28582"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28581"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28580"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28579"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28578"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28577"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28576"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28575"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28574"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28573"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28572"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28571"/>
|
||||||
|
<rdf:li resource="http://platial.com/place/28570"/>
|
||||||
|
</rdf:Seq>
|
||||||
|
</items>
|
||||||
|
</channel>
|
||||||
|
<item rdf:about="http://platial.com/place/90306">
|
||||||
|
<link>http://platial.com/place/90306</link>
|
||||||
|
<title>Knitting Room</title>
|
||||||
|
<description><![CDATA[This little shop is jammed full. Yarn, yarn everywhere. They make the most of every possible nook and cranny. I like this place also because they have a lot of different kinds of knitting needles in all different sizes. Also, the people who work here are younger and hipper than in the other stores I go to. I reccomend buying supplies here and then knitting your way through a good documentary at the Capitol Theater across the street.<br/>Address: 2 lake St, Arlington, MA <br/>Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats<br /><br /><a href="http://platial.com/place/90306">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/90306">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>42.405696 -71.142197</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-06-08T17:35:01.942452+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/67230">
|
||||||
|
<link>http://platial.com/place/67230</link>
|
||||||
|
<title>Knitting Room</title>
|
||||||
|
<description><![CDATA[This little shop is jammed full. Yarn, yarn everywhere. They make the most of every possible nook and cranny. I like this place also because they have a lot of different kinds of knitting needles in all different sizes. Also, the people who work here are younger and hipper than in the other stores I go to. I reccomend buying supplies here and then knitting your way through a good documentary at the Capitol Theater across the street.<br/>Address: 2 lake St, Arlington, MA <br/>Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats<br /><br /><a href="http://platial.com/place/67230">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/67230">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>42.405524 -71.142273</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-04-24T11:35:26.733857+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/65645">
|
||||||
|
<link>http://platial.com/place/65645</link>
|
||||||
|
<title>â ¢¢â¢Â£ËøÅ</title>
|
||||||
|
<description><![CDATA[ijeª£âµËËî<br/>Address: 151 Erie St., Cambridge, MA<br/>Tags: platial graffiti<br /><br /><a href="http://platial.com/place/65645">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/65645">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>42.352455 -71.110210</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-04-20T08:56:12.696224+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/62200">
|
||||||
|
<link>http://platial.com/place/62200</link>
|
||||||
|
<title>Allen Hall</title>
|
||||||
|
<description><![CDATA[My dorm at UIUC.<br/>Address: 1301 W Gregory Dr, Urbana, IL<br/>Tags: dorm, uiuc, college<br/><a href="http://platial.com/place/62200"><img src="http://platial.comhttp://static.flickr.com/4/8576450_0d59cc2531_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/62200">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/62200">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>40.104172 -88.220623</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-04-14T08:01:01.872873+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28232">
|
||||||
|
<link>http://platial.com/place/28232</link>
|
||||||
|
<title>Bagby Hot Springs, OR</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C. However, the area around the springs are not exactly well looked upon by people who know the place.
|
||||||
|
|
||||||
|
<br/>Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria<br /><br /><a href="http://platial.com/place/28232">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28232">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.936000 -122.173000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:10:18.553063+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/43666">
|
||||||
|
<link>http://platial.com/place/43666</link>
|
||||||
|
<title>Shooting Location for "The Field of Dreams" Film</title>
|
||||||
|
<description><![CDATA[1989's Field of Dreams was a Best Picture Academy Award nominee, and the baseball field in the cornfield still stands today, and has become quite a tourist destination. Games are occasionally played at the field, re-enacting professional baseball at the turn of the 20th Century.<br/>Address: Dyersville, Iowa<br/>Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location<br /><br /><a href="http://platial.com/place/43666">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/43666">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>42.481213 -91.111679</georss:point>
|
||||||
|
<dc:creator>echinodermata</dc:creator>
|
||||||
|
<dc:date>2006-03-23T11:40:17.654061+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28394">
|
||||||
|
<link>http://platial.com/place/28394</link>
|
||||||
|
<title>Moffetts (Bonneville) Hot Springs, WA</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 97 degress F, 36 degress C<br/>Tags: soak, hot springs, relax, nature<br /><br /><a href="http://platial.com/place/28394">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28394">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>45.658000 -121.962000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:16:27.329816+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28251">
|
||||||
|
<link>http://platial.com/place/28251</link>
|
||||||
|
<title>Austin Hot Springs, OR</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 186 degress F, 86 degress C<br/>Tags: soak, hot springs, relax, nature, popular, crowded<br /><br /><a href="http://platial.com/place/28251">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28251">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>45.021000 -122.009000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:11:04.489886+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28392">
|
||||||
|
<link>http://platial.com/place/28392</link>
|
||||||
|
<title>Rock Creek Hot Springs, WA</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br/>Tags: soak, hot springs, relax, nature<br /><br /><a href="http://platial.com/place/28392">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28392">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>45.723000 -121.927000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:16:22.636855+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28391">
|
||||||
|
<link>http://platial.com/place/28391</link>
|
||||||
|
<title>St. Martins (Wind River) Hot Springs, WA</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 120 degress F, 49 degress C<br/>Tags: hot springs, soak, relax, nature, wonderful<br /><br /><a href="http://platial.com/place/28391">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28391">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>45.728000 -121.800000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:16:20.383244+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28231">
|
||||||
|
<link>http://platial.com/place/28231</link>
|
||||||
|
<title>Breitenbush Hot Springs, OR</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br/>Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking<br /><br /><a href="http://platial.com/place/28231">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28231">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.782000 -121.975000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:10:16.529195+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28393">
|
||||||
|
<link>http://platial.com/place/28393</link>
|
||||||
|
<title>Collins Hot Springs, WA</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 122 degress F, 50 degress C<br/>Tags: portland, nice, hot springs, soak<br /><br /><a href="http://platial.com/place/28393">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28393">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>45.701000 -121.728000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:16:24.648745+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/31685">
|
||||||
|
<link>http://platial.com/place/31685</link>
|
||||||
|
<title>Darwin's Ltd.</title>
|
||||||
|
<description><![CDATA[Nice little coffee shop/cafe, free Wifi, close enough to walk from Harvard Square.<br/>Address: 148 Mount Auburn St, Cambridge, MA<br/>Tags: coffee, beer, sandwiches, freewifi<br/><a href="http://platial.com/place/31685"><img src="http://platial.comhttp://static.flickr.com/38/84885937_74fd3d1025_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/31685">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/31685">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>42.373974 -71.125053</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-10T09:24:08.152985+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28596">
|
||||||
|
<link>http://platial.com/place/28596</link>
|
||||||
|
<title>Huckleberry Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Boiling degress F, Boiling degress C<br /><br /><a href="http://platial.com/place/28596">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28596">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.115000 -110.684000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:32.283094+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28595">
|
||||||
|
<link>http://platial.com/place/28595</link>
|
||||||
|
<title>South Entrance Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 156 degress F, 69 degress C<br/><a href="http://platial.com/place/28595"><img src="http://platial.comhttp://static.flickr.com/52/130989872_f1457f68b5_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/28595">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28595">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.142000 -110.656000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:30.279497+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28594">
|
||||||
|
<link>http://platial.com/place/28594</link>
|
||||||
|
<title>Crawfish Creek Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C<br/><a href="http://platial.com/place/28594"><img src="http://platial.comhttp://static.flickr.com/52/128312256_d6a879924c_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/28594">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28594">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.157000 -110.699000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:28.280271+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28593">
|
||||||
|
<link>http://platial.com/place/28593</link>
|
||||||
|
<title>Crawfish Creek Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 138 degress F, 59 degress C<br /><br /><a href="http://platial.com/place/28593">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28593">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.165000 -110.723000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:20.364077+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28592">
|
||||||
|
<link>http://platial.com/place/28592</link>
|
||||||
|
<title>Snake Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C<br /><br /><a href="http://platial.com/place/28592">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28592">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.169000 -110.583000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:12.234974+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28591">
|
||||||
|
<link>http://platial.com/place/28591</link>
|
||||||
|
<title>Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 142 degress F, 61 degress C<br /><br /><a href="http://platial.com/place/28591">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28591">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.187000 -110.726000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:10.027857+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28590">
|
||||||
|
<link>http://platial.com/place/28590</link>
|
||||||
|
<title>Hot Springs on Upper Snake River, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 167 degress F, 75 degress C<br /><br /><a href="http://platial.com/place/28590">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28590">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.204000 -110.486000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:07.79658+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28589">
|
||||||
|
<link>http://platial.com/place/28589</link>
|
||||||
|
<title>Hot Springs on lewis Lake, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 154 degress F, 68 degress C<br /><br /><a href="http://platial.com/place/28589">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28589">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.276000 -110.636000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:05.683418+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28588">
|
||||||
|
<link>http://platial.com/place/28588</link>
|
||||||
|
<title>Rustic Geyser, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28588">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28588">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.282000 -110.506000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:03.66329+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28587">
|
||||||
|
<link>http://platial.com/place/28587</link>
|
||||||
|
<title>Bechler River Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 194 degress F, 90 degress C<br /><br /><a href="http://platial.com/place/28587">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28587">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.285000 -110.900000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:24:01.611442+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28586">
|
||||||
|
<link>http://platial.com/place/28586</link>
|
||||||
|
<title>Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Boiling degress F, 201 degress C<br /><br /><a href="http://platial.com/place/28586">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28586">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.290000 -110.504000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:59.658699+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28585">
|
||||||
|
<link>http://platial.com/place/28585</link>
|
||||||
|
<title>Heart Lake Geyser Basin, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Middle Group degress F, 174 degress C<br /><br /><a href="http://platial.com/place/28585">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28585">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.299000 -110.517000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:57.181801+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28584">
|
||||||
|
<link>http://platial.com/place/28584</link>
|
||||||
|
<title>Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Boiling degress F, 201 degress C<br /><br /><a href="http://platial.com/place/28584">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28584">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.307000 -110.526000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:55.240485+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28583">
|
||||||
|
<link>http://platial.com/place/28583</link>
|
||||||
|
<title>Hot Springs on lewis Lake, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28583">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28583">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.309000 -110.654000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:53.22295+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28582">
|
||||||
|
<link>http://platial.com/place/28582</link>
|
||||||
|
<title>Shoshone Geyser Basin, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28582">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28582">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.354000 -110.800000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:51.179049+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28581">
|
||||||
|
<link>http://platial.com/place/28581</link>
|
||||||
|
<title>Hot Springs on Continental Divide, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 189 degress F, 87 degress C<br /><br /><a href="http://platial.com/place/28581">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28581">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.401000 -110.936000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:49.077176+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28580">
|
||||||
|
<link>http://platial.com/place/28580</link>
|
||||||
|
<title>Hot Springs on Upper Firehole River, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28580">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28580">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.404000 -110.824000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:47.054664+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28579">
|
||||||
|
<link>http://platial.com/place/28579</link>
|
||||||
|
<title>Summit Lake Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 162 degress F, 72 degress C<br /><br /><a href="http://platial.com/place/28579">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28579">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.410000 -110.953000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:45.039394+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28578">
|
||||||
|
<link>http://platial.com/place/28578</link>
|
||||||
|
<title>Lone Star Geyser Basin, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Footbridge degress F, 183 degress C<br /><br /><a href="http://platial.com/place/28578">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28578">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.414000 -110.817000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:42.938808+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28577">
|
||||||
|
<link>http://platial.com/place/28577</link>
|
||||||
|
<title>West. Thumb Geyser Basin, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28577">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28577">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.417000 -110.570000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:40.90238+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28576">
|
||||||
|
<link>http://platial.com/place/28576</link>
|
||||||
|
<title>Lone Star Geyser, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28576">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28576">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.418000 -110.805000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:38.844625+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28575">
|
||||||
|
<link>http://platial.com/place/28575</link>
|
||||||
|
<title>Smoke Jumper Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br /><br /><a href="http://platial.com/place/28575">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28575">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.421000 -110.952000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:36.818513+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28574">
|
||||||
|
<link>http://platial.com/place/28574</link>
|
||||||
|
<title>West. Thumb Geyser Basin, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 196 degress F, 91 degress C<br /><br /><a href="http://platial.com/place/28574">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28574">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.422000 -110.574000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:34.767729+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28573">
|
||||||
|
<link>http://platial.com/place/28573</link>
|
||||||
|
<title>Potts Hot Spring Basin, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28573">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28573">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.433000 -110.581000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:32.749915+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28572">
|
||||||
|
<link>http://platial.com/place/28572</link>
|
||||||
|
<title>Hot Springs, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28572">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28572">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.433000 -110.813000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:30.829745+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28571">
|
||||||
|
<link>http://platial.com/place/28571</link>
|
||||||
|
<title>Hot Springs on Continental Divide, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28571">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28571">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.438000 -110.977000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:28.730401+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
<item rdf:about="http://platial.com/place/28570">
|
||||||
|
<link>http://platial.com/place/28570</link>
|
||||||
|
<title>SouthEastern Group, WY</title>
|
||||||
|
<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br /><br /><a href="http://platial.com/place/28570">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28570">Grab this on Platial</a> ]]></description>
|
||||||
|
<georss:point>44.459000 -110.817000</georss:point>
|
||||||
|
<dc:creator>crschmidt</dc:creator>
|
||||||
|
<dc:date>2006-01-03T23:23:26.706763+00:00</dc:date>
|
||||||
|
</item>
|
||||||
|
</rdf:RDF>
|
||||||
@@ -71,6 +71,7 @@ if (typeof(_OPENLAYERS_SFL_) == "undefined") {
|
|||||||
"OpenLayers/Layer/WMS.js",
|
"OpenLayers/Layer/WMS.js",
|
||||||
"OpenLayers/Layer/WFS.js",
|
"OpenLayers/Layer/WFS.js",
|
||||||
"OpenLayers/Layer/WMS/Untiled.js",
|
"OpenLayers/Layer/WMS/Untiled.js",
|
||||||
|
"OpenLayers/Layer/GeoRSS.js",
|
||||||
"OpenLayers/Popup/Anchored.js",
|
"OpenLayers/Popup/Anchored.js",
|
||||||
"OpenLayers/Popup/AnchoredBubble.js",
|
"OpenLayers/Popup/AnchoredBubble.js",
|
||||||
"OpenLayers/Control.js",
|
"OpenLayers/Control.js",
|
||||||
|
|||||||
143
lib/OpenLayers/Layer/GeoRSS.js
Normal file
143
lib/OpenLayers/Layer/GeoRSS.js
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
|
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||||
|
* text of the license. */
|
||||||
|
// @require: OpenLayers/Layer/Markers.js
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class
|
||||||
|
*/
|
||||||
|
OpenLayers.Layer.GeoRSS = Class.create();
|
||||||
|
OpenLayers.Layer.GeoRSS.prototype =
|
||||||
|
Object.extend( new OpenLayers.Layer.Markers(), {
|
||||||
|
|
||||||
|
/** store url of text file
|
||||||
|
* @type str */
|
||||||
|
location:null,
|
||||||
|
|
||||||
|
/** @type Array(OpenLayers.Feature) */
|
||||||
|
features: null,
|
||||||
|
|
||||||
|
/** @type OpenLayers.Feature */
|
||||||
|
selectedFeature: null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
*
|
||||||
|
* @param {String} name
|
||||||
|
* @param {String} location
|
||||||
|
*/
|
||||||
|
initialize: function(name, location) {
|
||||||
|
OpenLayers.Layer.Markers.prototype.initialize.apply(this, [name]);
|
||||||
|
this.location = location;
|
||||||
|
this.features = new Array();
|
||||||
|
new Ajax.Request(location,
|
||||||
|
{ method: 'get', onComplete:this.parseData.bind(this) } );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
destroy: function() {
|
||||||
|
this.clearFeatures();
|
||||||
|
this.features = null;
|
||||||
|
OpenLayers.Layer.Markers.prototype.destroy.apply(this, arguments);
|
||||||
|
},
|
||||||
|
|
||||||
|
/** WFS layer is never a base class.
|
||||||
|
* @type Boolean
|
||||||
|
*/
|
||||||
|
isBaseLayer: function() {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?} ajaxRequest
|
||||||
|
*/
|
||||||
|
parseData: function(ajaxRequest) {
|
||||||
|
var doc = ajaxRequest.responseXML;
|
||||||
|
if (!doc || ajaxRequest.fileType!="XML") {
|
||||||
|
doc = OpenLayers.parseXMLString(ajaxRequest.responseText);
|
||||||
|
}
|
||||||
|
var pointlist = doc.getElementsByTagName('point');
|
||||||
|
for (var i = 0; i < pointlist.length; i++) {
|
||||||
|
var data = {};
|
||||||
|
var location = pointlist[i].firstChild.nodeValue.split(" ");
|
||||||
|
if (location.length != 2)
|
||||||
|
continue;
|
||||||
|
location = new OpenLayers.LonLat(parseFloat(location[1]), parseFloat(location[0]));
|
||||||
|
var title = OpenLayers.Util.getNodes(pointlist[i].parentNode, "title")[0].firstChild.nodeValue;
|
||||||
|
var description = OpenLayers.Util.getNodes(pointlist[i].parentNode, "description")[0].firstChild.nodeValue;
|
||||||
|
try { var link = OpenLayers.Util.getNodes(pointlist[i].parentNode, "link")[0].firstChild.nodeValue; } catch (e) { }
|
||||||
|
data.icon = OpenLayers.Marker.defaultIcon();
|
||||||
|
data.popupSize = new OpenLayers.Size(250, 200);
|
||||||
|
if ((title != null) && (description != null)) {
|
||||||
|
contentHTML = "<br />";
|
||||||
|
contentHTML += "<div style='margin: -0.5em 0.5em 0.5em 0.5em'>"
|
||||||
|
|
||||||
|
contentHTML += "<div style='height: 1.3em; overflow: hidden'>";
|
||||||
|
contentHTML += "<span style='font-size: 1.2em; font-weight: bold'>";
|
||||||
|
if (link) contentHTML += "<a href='"+link+"' target='_blank'>";
|
||||||
|
contentHTML += title;
|
||||||
|
if (link) contentHTML += "</a>";
|
||||||
|
contentHTML += "</span>";
|
||||||
|
contentHTML += "</div>";
|
||||||
|
|
||||||
|
|
||||||
|
contentHTML += "<span style='font-size: 0.7em; align:center'>";
|
||||||
|
contentHTML += description;
|
||||||
|
contentHTML += "</span>";
|
||||||
|
|
||||||
|
contentHTML += "</div>"
|
||||||
|
data['popupContentHTML'] = contentHTML;
|
||||||
|
|
||||||
|
//data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>';
|
||||||
|
}
|
||||||
|
var feature = new OpenLayers.Feature(this, location, data);
|
||||||
|
this.features.append(feature);
|
||||||
|
var marker = feature.createMarker();
|
||||||
|
marker.events.register('click', feature, this.markerClick);
|
||||||
|
this.addMarker(marker);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Event} evt
|
||||||
|
*/
|
||||||
|
markerClick: function(evt) {
|
||||||
|
sameMarkerClicked = (this == this.layer.selectedFeature);
|
||||||
|
this.layer.selectedFeature = (!sameMarkerClicked) ? this : null;
|
||||||
|
for(var i=0; i < this.layer.map.popups.length; i++) {
|
||||||
|
this.layer.map.removePopup(this.layer.map.popups[i]);
|
||||||
|
}
|
||||||
|
if (!sameMarkerClicked) {
|
||||||
|
var popup = this.createPopup();
|
||||||
|
Event.observe(popup.div, "click",
|
||||||
|
function() {
|
||||||
|
for(var i=0; i < this.layer.map.popups.length; i++) {
|
||||||
|
this.layer.map.removePopup(this.layer.map.popups[i]);
|
||||||
|
}
|
||||||
|
}.bindAsEventListener(this));
|
||||||
|
this.layer.map.addPopup(popup);
|
||||||
|
}
|
||||||
|
Event.stop(evt);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
clearFeatures: function() {
|
||||||
|
if (this.features != null) {
|
||||||
|
while(this.features.length > 0) {
|
||||||
|
var feature = this.features[0];
|
||||||
|
this.features.remove(feature);
|
||||||
|
feature.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** @final @type String */
|
||||||
|
CLASS_NAME: "OpenLayers.Layer.GeoRSS"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user