OpenLayers OpenLayers

Changeset 4769

Show
Ignore:
Timestamp:
10/03/07 01:30:17 (1 year ago)
Author:
crschmidt
Message:

Support W3C Geo in Format.GeoRSS -- this.geons was referenced ,but never
defined. Add property and test. Reviewed by SDE (thx!), (See #1024)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Format/GeoRSS.js

    r4352 r4769  
    3939     */ 
    4040    georssns: "http://www.georss.org/georss", 
     41 
     42    /** 
     43     * APIProperty: geons 
     44     * {String} W3C Geo namespace to use.  Defaults to 
     45     *     "http://www.w3.org/2003/01/geo/wgs84_pos#" 
     46     */ 
     47    geons: "http://www.w3.org/2003/01/geo/wgs84_pos#", 
    4148     
    4249    /** 
  • trunk/openlayers/tests/Format/test_GeoRSS.html

    r4305 r4769  
    2727        t.eq(data, '<rss xmlns="http://backend.userland.com/rss2"><item><title></title><description></description><georss:line xmlns:georss="http://www.georss.org/georss">45.68 -111.04 45.68 -112.04</georss:line></item></rss>', 'GeoRSS serializes a line correctly'); 
    2828    } 
     29    function test_Format_GeoRSS_w3cgeo(t) {  
     30        t.plan(2); 
     31 
     32        var parser = new OpenLayers.Format.GeoRSS(); 
     33        var data = parser.read('<rss xmlns="http://backend.userland.com/rss2" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"><item><geo:long>-1</geo:long><geo:lat>1</geo:long></item></rss>'); 
     34        t.eq(features.geometry.x, "-1", "w3c geo x read correctly");  
     35        t.eq(features.geometry.y, "1", "w3c geo y read correctly");  
     36    } 
    2937    function test_Format_GeoRSS_roundtrip(t) { 
    3038        t.plan(input.length);