Link to home
Start Free TrialLog in
Avatar of christampa
christampa

asked on

example of yahoo geocoding with googles maps

hello anyone have an example of the yahoo geocode with google maps in asp?  thanks.
Avatar of WilliamFrantz
WilliamFrantz

Maybe this will help:

http://www.codeproject.com/Ajax/GeoLocation.asp

"Yahoo! has a very cool (and free) Web Service for GeoCoding. However, the trick is to make Yahoo!'s service play nice with Google Maps."
Avatar of christampa

ASKER

i already saw that before the post, it didnt help.  

that is the thing i got the google to work with another geocode, but it isnt as accurate as yahoo.

i also tried the yahoo maps with yahoo geocode, but there is no way to do the directions like google.  

i need an example of a google map, using yahoo geocode.  if you have any please send it,

thanks.
i got the answer here is the function to get it from the xml file

function alertLatLong(addr)
{
var oXML = new ActiveXObject("Msxml2.XMLHTTP.4.0");
oXML.open("GET", "http://api.local.yahoo.com/MapsService/V1/geocode?appid=yahoo&street=" + addr, false);
oXML.send();
var oRes = oXML.responseXML;
var oLat = oRes.selectSingleNode("//*[local-name() = 'Latitude']").text;
var oLong = oRes.selectSingleNode("//*[local-name() = 'Longitude']").text;
var oAddress = oRes.selectSingleNode("//*[local-name() = 'Address']").text;
var oCity= oRes.selectSingleNode("//*[local-name() = 'City']").text;
var oState = oRes.selectSingleNode("//*[local-name() = 'State']").text;
var oZip = oRes.selectSingleNode("//*[local-name() = 'Zip']").text;
}
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial