Google Places API的替代品 [英] Alternatives to Google Places API

查看:49
本文介绍了Google Places API的替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是"Google Places API"的替代方案?不管有没有付费的API服务.

What are alternatives to 'Google Places API' ? No matter if there is any paid API Service.

推荐答案

在搜索一种为iOS应用中的用户输入位置字段实现自动填充字段的方法时,我也遇到了这个问题.我认为它是如何工作的最好的例子之一是在Apple的原生Weather App中制作的.添加新位置屏幕"上的搜索结果多于我尝试过的任何其他服务:
-Google Place API(主要替代方法)
-Yelp
-四方
-其他一些.

I also faced this issue when was searching a way to implement the autocompletion field for user input location field in iOS app. One of the best example of how it works I think was made in Apple's native Weather App. There are more search results on "add new location screen)" than gives any other service I have tried:
- Google Place API (main alternative)
- Yelp
- Foursquare
- some others.

不幸的是,Weather使用https请求:( https://gsp-ssl.ls.apple.com ).:(似乎没有解决方案来检索此数据.但是事实证明,苹果公司并没有使用他们自己的服务来确定位置.

Unfortunately Weather uses https requests: (https://gsp-ssl.ls.apple.com). :( It may seems that there is no solution to retrieve this data. But as turned out Apple ain't use their own service for location determination.

我检查了Maps应用,并尝试了 CLGeocoder 类,该类是--(void)geocodeAddressString:(NSString *)addressString完成处理程序:(仅适用于iOS)

I checked Maps app and tried CLGeocoder class with it's - -(void)geocodeAddressString:(NSString *)addressString completionHandler: (persists only in iOS)

上一个没有用,只找到一个结果,而Google给出了5个结果("Mosc"一词是莫斯科的一部分)

Last one was useless, finding only one result while Google gave about 5's (for word 'Mosc' as a part of Moscow)

解决方案:苹果放弃了Yahoo作为天气提供者,而选择了 TWC (校对链接).因此,我们的案例不是收集天气状况,而是获取位置以及它们提供的位置!

Solution: Apple discarded Yahoo as a weather provider and chose TWC (prooflink). So our case is not to collect weather conditions but rather get the locations, what they also provide!

确切地说,让我们比较几种服务:

(上图-利用Place API的Google地图,下图-苹果使用的TWC)

To be exact let's compare several services:

(top image - google maps that exploit Place API, bottom - TWC, that Apple uses)

专家(TWC):
-可以按城市(邮政编码,机场等)进行搜索
-找到更多结果(即使为Google查询设置了最大半径-50000也不会找到很多结果)
-支持带有自动完成选项的API
-非常适合自动完成,包含所有基本字段JSON如下所示:

Pros (TWC):
- Search can be made by city (zip,airport etc.)
- More results are found (if even set max. radius for google query - 50 000, it would not find a lot)
- Supports API with Autocomplete options
- Well-suited for autocompletion purpose, contains all the basic fields JSON looks like the below:

{
     "name":"Moscu, CUN, COLOMBIA",
      "key":"COXX8971:1:CO",
    "locId":"COXX8971",
  "locType":1,
   "cityNm":"Moscu",
  "cntryCd":"CO",
 "_country":"COLOMBIA",
     "stCd":"CUN",
     "stNm":"Cundinamarca",
  "bigCity":false
},

缺点:
-如果您需要地理编码选项或查询地点,则功能远不如Google强大.
-处理请求的速度比Google慢

Cons:
- Much less powerful than Google if you need a geocoding options or query for places.
- Handles requests slower than google does

这篇关于Google Places API的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆