Using Google Places API
Has anyone used the Google Places API in an app? I'm working on an app that will use it but haven't receive an api key for.
I've filled out the form at http://gmaps-ws-console.appspot.com/. Will they send one for Places or do you using the same key you use with the google maps api.
4 Answers
-
Jason how can you connect appcelerator with places app from google??
-
Sara: You could use the Google Places API for mobile.
Construct and send a request in the following format (from your mobile app):
https://maps.googleapis.com/maps/api/place/search/json?location=-41.11,81.19&radius=50&name=hospital&sensor=true&key=YourKeyThe response will be a JSON object (or XML, if that's your preferred response format) containing the Places near the user's location.
More details can be found at https://developers.google.com/maps/documentation/places/
-
Pallavi: I'm currently trying to access the google places with a Ti.Network.HTTPClient instance (providing my api key in the params lis, and sensor=true) … I guess i'm following the api specs in my request url.
I saw your very recent post about this, so I thought maybe you could help in my trouble-shooting.
The fact is I'm getting an SSL error, stating:Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred: SSL problem (Possible causes may include a bad/expired/self-signed certificate, clock set to wrong date)" UserInfo=0x8c78850 {NSUnderlyingError=0x8c78880 "The operation couldn’t be completed. (OSStatus error -9800.)", NSLocalizedDescription=A connection failure occurred: SSL problem (Possible causes may include a bad/expired/self-signed certificate, clock set to wrong date)}
I'm not sure about the origin, but I found some discussions pointing to iOS validation of self-signed certificates. As I understand this api-key is one of this kind.
I also tried setting explicitly the value of HHTPClient.validatesSecureCertificate to false (the api-doc says it defaults to false) with no changes in connection success.
I hope I made myself clear enough, and I wish you'll have some suggestion to point main the right direction.
Thanks in advance,
regards. -
Now following to :
http://developer.appcelerator.com/question/138147/createhttpclient—ssl-problem-on-some-api-callas it looks like the problem isn't in my own code.