OpenLayers OpenLayers

Changeset 9249

Show
Ignore:
Timestamp:
04/08/09 19:15:48 (1 year ago)
Author:
crschmidt
Message:

Add support for ArcIMS/ArcXML to OpenLayers.

Thanks for the killer effort from David Zwarg from Avencia in building this,
and for Tim Schaub from OpenGeo for his excellent review. r=me,tschaub
(Closes #213)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/examples/proxy.cgi

    r8895 r9249  
    2020                'prototype.openmnnd.org', 'geo.openplans.org', 
    2121                'sigma.openplans.org', 'demo.opengeo.org', 
    22                 'www.openstreetmap.org'
     22                'www.openstreetmap.org', 'sample.avencia.com'
    2323 
    2424method = os.environ["REQUEST_METHOD"] 
  • trunk/openlayers/lib/OpenLayers.js

    r9240 r9249  
    114114            "OpenLayers/Layer/WMS.js", 
    115115            "OpenLayers/Layer/WMS/Untiled.js", 
     116            "OpenLayers/Layer/ArcIMS.js", 
    116117            "OpenLayers/Layer/GeoRSS.js", 
    117118            "OpenLayers/Layer/Boxes.js", 
     
    212213            "OpenLayers/Format.js", 
    213214            "OpenLayers/Format/XML.js", 
     215            "OpenLayers/Format/ArcXML.js", 
     216            "OpenLayers/Format/ArcXML/Features.js", 
    214217            "OpenLayers/Format/GML.js", 
    215218            "OpenLayers/Format/GML/Base.js", 
  • trunk/openlayers/lib/OpenLayers/Tile/Image.js

    r9115 r9249  
    285285        this.imgDiv.viewRequestID = this.layer.map.viewRequestID; 
    286286         
    287         // needed for changing to a different serve for onload error 
    288         if (this.layer.url instanceof Array) { 
    289             this.imgDiv.urls = this.layer.url.slice(); 
    290         } 
    291          
    292         this.url = this.layer.getURL(this.bounds); 
     287        if (this.layer.async) { 
     288            // Asyncronous image requests call the asynchronous getURL method 
     289            // on the layer to fetch an image that covers 'this.bounds', in the scope of 
     290            // 'this', setting the 'url' property of the layer itself, and running 
     291            // the callback 'positionFrame' when the image request returns. 
     292            this.layer.getURLasync(this.bounds, this, "url", this.positionImage); 
     293        } else { 
     294            // syncronous image requests get the url and position the frame immediately, 
     295            // and don't wait for an image request to come back. 
     296           
     297            // needed for changing to a different server for onload error 
     298            if (this.layer.url instanceof Array) { 
     299                this.imgDiv.urls = this.layer.url.slice(); 
     300            } 
     301           
     302            this.url = this.layer.getURL(this.bounds); 
     303           
     304            // position the frame immediately 
     305            this.positionImage();  
     306        } 
     307        return true; 
     308    }, 
     309 
     310    /** 
     311     * Method: positionImage 
     312     * Using the properties currenty set on the layer, position the tile correctly. 
     313     * This method is used both by the async and non-async versions of the Tile.Image 
     314     * code. 
     315     */ 
     316     positionImage: function() { 
     317        // if the this layer doesn't exist at the point the image is 
     318        // returned, do not attempt to use it for size computation 
     319        if ( this.layer == null ) 
     320            return; 
     321         
    293322        // position the frame  
    294323        OpenLayers.Util.modifyDOMElement(this.frame,  
    295                                          null, this.position, this.size);    
     324                                          null, this.position, this.size);    
    296325 
    297326        if (this.layerAlphaHack) { 
     
    303332            this.imgDiv.src = this.url; 
    304333        } 
    305         return true; 
    306334    }, 
    307335 
  • trunk/openlayers/tests/list-tests.html

    r9240 r9249  
    4646    <li>Filter/Spatial.html</li> 
    4747    <li>Format.html</li> 
     48    <li>Format/ArcXML.html</li> 
     49    <li>Format/ArcXML/Features.html</li> 
    4850    <li>Format/GeoJSON.html</li> 
    4951    <li>Format/GeoRSS.html</li> 
     
    104106    <li>Lang.html</li> 
    105107    <li>Layer.html</li> 
     108    <li>Layer/ArcIMS.html</li>  
    106109    <li>Layer/ArcGIS93Rest.html</li> 
    107110    <li>Layer/EventPane.html</li>