can't load/read yahoo geocode as xml and read it in jquery
Posted
by mastah
on Stack Overflow
See other posts from Stack Overflow
or by mastah
Published on 2010-05-16T07:41:04Z
Indexed on
2010/05/16
7:50 UTC
Read the original article
Hit count: 383
Hi, I tried saving the result as an xml, when I read from there it works, but if I read it from yahoo's api, doesn't load anything.
You can check it here
here's my script
$(document).ready(function(){
$.ajax({
type: "GET",
url: "http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&zip=10035",
dataType: "xml",
success: function(xml) {
$(xml).find('Result').each(function(){
var city = $(this).find('City').text();
var state = $(this).find('State').text();
$('<div />').html('<p>'+city+'</p><p>'+state+'</p>').insertAfter('h2');
});
}
});
});?
© Stack Overflow or respective owner