0

Client side use / AJAX

I had tried to use the Place Finder API within Javascript. But it seems it's not working. I can make a call to the API as simple URL in a browser and it works. But when I try to open this URL within a XMLHttpRequest() object no data is sent back.
Does the Place Finder API only work from a server side (e.g. using PHP)?

3 Replies
  • QUOTE (hansjrgstark @ Nov 25 2010, 07:35 AM) <{POST_SNAPBACK}>
    I had tried to use the Place Finder API within Javascript. But it seems it's not working. I can make a call to the API as simple URL in a browser and it works. But when I try to open this URL within a XMLHttpRequest() object no data is sent back.
    Does the Place Finder API only work from a server side (e.g. using PHP)?


    There is a problem with the crossdomain.xml file that prevents access to the PlaceFinder API. We are working on a fix for this problem.

    Eddie Babcock
    Yahoo! Geo Technologies
    0
  • Hey Eddie,

    Do you have an idea how long it will take for a fix for the the crossdomain.xml issue to be made?

    I'm also having issues calling the PlaceFinder JSON service from localhost, but when i put the request in the browser's address bar, it works fine. I have a feeling this is the same crossdomain issue...

    Thanks!
    -Tom.
    0
  • We are facing a invalid label error as follows
    This is the error info from firebug along with other details

    $. ajax ({
    type: "GET",
    url : url ,
    data: "()",
    contentType: "application/ json ; charset = utf -8",
    dataType: " jsonp ",
    success:function( json ){
    alert("in success method");
    },
    error:function(XMLHttpRequest, textStatus, errorThrown){
    alert("XMLHttpRequest"+XMLHttpRequest);
    alert("textStatus"+textStatus);
    alert("errorThrown"+errorThrown);
    }
    });

    Error: invalid label
    Source File: http://where.yahooapis.com/geocode?appid=j...+CA&flags=J
    Line: 1, Column: 1
    Source Code:
    {"ResultSet":{"version":"1.0","Error":0,"ErrorMessage":"No error","Locale":"us_US","Quality":40,"Found":1,"Results":[{"quality":40,"latitude":"37.777125","longitude":"-122.419644","offsetlat":"37.777125","offsetlon":"-122.419644","radius":10700,"name":"",

    my requirement is simple I just want to get the lat long data back through json (that will be called thorugh a jquery ajax request) but every time I am getting invalid label error , whether I am missing something silly stuff , cam someone provide me a code demo where I can get the json response back after calling thorugh a jquery ajax request, we are seriously thinking over to use Placefinder for our upcoming site but this problem is creating a dampner, can you please revert back to us quickly then we can still try to use Placefinder over Google Places
    0
This forum is locked.

Recent Posts

in PlaceFinder General Discussion