OpenLayers OpenLayers

Changeset 7549

Show
Ignore:
Timestamp:
07/18/08 15:08:56 (3 months ago)
Author:
sbenthall
Message:

yahoo geocoder takes appid *optionally*

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/topp/almanac/lib/OpenLayers/Control/YahooGeocoder.js

    r7529 r7549  
    4040     * options - {Object} An optional object with properties to be set on the 
    4141     *     control. 
     42     * 
    4243     */ 
    43     initialize: function(appid, options) { 
    44         this.appid = appid; 
    45  
     44    initialize: function(options) { 
    4645        this.serverProj = new OpenLayers.Projection("EPSG:4326"); 
    4746         
     
    8382         
    8483        params = { 
    85             appid : this.appid, 
    8684            location: location            
     85        } 
     86 
     87        if(this.appid){ 
     88            params.appid = this.appid; 
    8789        } 
    8890         
     
    9294        var requestCallback = function(request) { 
    9395            if(request.status >= 200 && request.status < 300) { 
    94                 // success 
    95                 var response = request.responseXML; 
     96 
     97                // success                 
     98                var xml = new OpenLayers.Format.XML(); 
     99 
     100                var response = xml.read(request.responseText); 
    96101                 
    97102                var result = response.getElementsByTagName("Result")[0]; 
    98                  
    99                 var xml = new OpenLayers.Format.XML(); 
    100103                 
    101104                var precision = xml.getAttributeNS(result, null, 'precision');