开发者

Passing Location string as parameter to google places from iphone sdk

I am working on google places that would list local interest points from a particular location. but i am not able to set any particular location right now in link. following link i am trying to use.

http://www.google.com/m/local/lstr=bryn+ma开发者_Go百科wr

http://www.google.com/m/places/lstr=bryn+mawr

https://maps.googleapis.com/maps/api/place/details/json?reference=REFERENCE_ID&client=clientId&sensor=true_or_false&signature=SIGNATURE

https://maps.googleapis.com/maps/api/place/details/xml?reference=REFERENCE_ID&client=clientId&sensor=true_or_false&signature=SIGNATURE

Please suggest any solution regarding this.


If you are going to use this from inside an iPhone app... you will never have any kind of:

signature (REQUIRED) — The generated value of signing this URL


Take a look at the API. It makes it pretty clear what you have to include. See the required parameters:

location (REQUIRED) — The textual latitude/longitude value from which you wish to retrieve place information.

Example: location=-33.8670522,151.1957362 -- Your query does not have a location.

radius (REQUIRED) — The distance (in meters) within which to return Place results. The recommended best practice is to set radius based on the accuracy of the location signal as given by the location sensor.

Example: radius=50 -- Your query does not have a radius.

name (optional) — The text name of the Place. When passed, matching results will be restricted to those containing the passed name. This name is not case-sensitive. This parameter is useful for narrowing down the search for a Place when you know where you are located.

Optional, helps narrow down the right result if a name is being searched for.

sensor (REQUIRED) — Indicates whether or not the Place request came from a device using a location sensor (e.g. a GPS) to determine the location sent in this request. This value must be either true or false.

Example: sensor=true -- You have *true_or_false* which is in the example but isn't valid. The last sentence in the description, above, notes that it must be true or false.

client (REQUIRED) — Specifies the registered application using this service.

Example: client=1234567890 -- You are using "clientId", but you have to use the actual clientID of your app, as requested from Google and explained in the API reference.

signature (REQUIRED) — The generated value of signing this URL using the client's cryptographic key. (See URL Authentication for more information.)

Example: signature=1234567890 -- You are using SIGNATURE but you have to supply a valid signature which is an encrypted URL using the private key you get from Google.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜