i use the following code
var searchUrl = config.searchUrl +'?lat='+center[0].geometry.location.lat()+'&lng='+center[0].geometry.location.lng()+'&'+Object.toQueryString(params);
jQuery.get(searchUrl, {}, function(data) {
alert(JSON.stringify(data,null,4));
alert(searchUrl);
});
when i use what is outputted by alert(searchUrl);
which looks like this
in the browser it outputs XML like this
<results>
<markers>
<marker marker_label="1" location_id="953"/>
<marker marker_label="2" location_id="952"/>
</markers>
<storelist><div class="store-list transparent-header">list</div></storelist>
</results>
however, alert(JSON.stringify(data,null,4));
outputs null, is there something i'm doing wrong with my request/response
NOTE: what i am trying to do is replace the original use of GDownloadUrl that was use in this script, at this point all i'm trying to do is get the response and confirm it's the same as what i am seeing in the browser