michael_porter

esri.request to google places

Discussion created by michael_porter on Jun 29, 2012
Latest reply on Jun 29, 2012 by khutchins-esristaff
Hi,

I'm trying to make a request to the Google Places API, but I get the following error message:

"Unable to load http://gisbedit100/proxy/proxy.jsp?https://maps.googleapis.com/maps/api/place/search/json?location=38.196612153051745%2C-85.64023545758986&rankby=distance&name=restaurant&sensor=false&key=<My Key> status:403"

I am using ESRI JS API 3.0.  The Code is below where <My Key> is my google places api key:


               var proxyHandler = esri.request({
                    url: "https://maps.googleapis.com/maps/api/place/search/json",
                    content: {
                        location: "38.196612153051745,-85.64023545758986",
                        rankby: "distance",
                        name: "restaurant",
                        sensor: "false",
                        key: "<My Key>"
                    },
                    handleAs: "json",
                    callbackParmName: "callback"
                }, { useProxy: true });
                proxyHandler.then(function(content) {
                    var hold = 1;
                },
                function(error) {
                    var hold = 1;
                });

I am sure that the search request is formatted properly and the my proxy page is working.  I was wondering if it might be a https:// issue, but according to the release notes for JS API 3.0 "NIM081360: esri.request should switch to https when error is "403: SSL is required" ".  Not sure if this makes a difference.  Any help is appreciated.

Thanks.

Outcomes