OpenLayers OpenLayers

Changeset 4999

Show
Ignore:
Timestamp:
10/17/07 21:20:04 (1 year ago)
Author:
elam
Message:

feed loaded event notification.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/elam/openlayers/lib/OpenLayers/Layer/GeoRSSvector.js

    r4961 r4999  
    2626    format: null, 
    2727     
    28     /** store url of text file 
    29     * @type str */ 
    3028    url:null, 
    3129 
     
    3937     * Options renderer {Object}: Typically SvgRenderer or VmlRenderer. 
    4038     */ 
    41      initialize: function(name, url) { 
     39     initialize: function(name, url, options) { 
    4240      
    4341        var newArguments = new Array() 
    44         newArguments.push(name); 
     42        newArguments.push(name,options); 
    4543        OpenLayers.Layer.Vector.prototype.initialize.apply(this, newArguments); 
    4644        this.url = url; 
    47          
    48      
    49         //OpenLayers.loadURL(url, null, this, this.parseData); 
    50      
    5145    }, 
    5246     
     
    6559        if(this.visibility && !this.loaded){ 
    6660            // Load the GML 
    67             this.loadGML(); 
     61            this.loadXML(); 
    6862        } 
    6963    }, 
     
    8377        // See http://trac.openlayers.org/ticket/404 
    8478        if(this.visibility && !this.loaded){ 
    85             this.loadGML(); 
     79            this.events.triggerEvent("loadstart"); 
     80            this.loadXML(); 
    8681        } 
    8782    }, 
    8883 
    89     loadGML: function() { 
     84    loadXML: function() { 
    9085        if (!this.loaded) { 
    9186            var results = OpenLayers.loadURL(this.url, null, this, this.requestSuccess, this.requestFailure); 
     
    123118     */ 
    124119    requestFailure: function(request) { 
    125         alert("Error in loading GML file "+this.url); 
     120        alert("Error in loading GML file "+this.url); 
     121        this.events.triggerEvent("loadend"); 
    126122    }, 
    127123