OpenLayers OpenLayers

Ticket #1024: w3cgeo.patch

File w3cgeo.patch, 1.7 kB (added by crschmidt, 1 year ago)
  • tests/Format/test_GeoRSS.html

    old new  
    2626        var data = parser.write([f]); 
    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); 
    3139        var parser = new OpenLayers.Format.GeoRSS(); 
  • lib/OpenLayers/Format/GeoRSS.js

    old new  
    3838     *     "http://www.georss.org/georss" 
    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    /** 
    4350     * APIProperty: featureTitle