Changeset 7549
- Timestamp:
- 07/18/08 15:08:56 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/topp/almanac/lib/OpenLayers/Control/YahooGeocoder.js
r7529 r7549 40 40 * options - {Object} An optional object with properties to be set on the 41 41 * control. 42 * 42 43 */ 43 initialize: function(appid, options) { 44 this.appid = appid; 45 44 initialize: function(options) { 46 45 this.serverProj = new OpenLayers.Projection("EPSG:4326"); 47 46 … … 83 82 84 83 params = { 85 appid : this.appid,86 84 location: location 85 } 86 87 if(this.appid){ 88 params.appid = this.appid; 87 89 } 88 90 … … 92 94 var requestCallback = function(request) { 93 95 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); 96 101 97 102 var result = response.getElementsByTagName("Result")[0]; 98 99 var xml = new OpenLayers.Format.XML();100 103 101 104 var precision = xml.getAttributeNS(result, null, 'precision');
