Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios4 Google Place Api-位于多个位置_Ios4_Google Places Api - Fatal编程技术网

Ios4 Google Place Api-位于多个位置

Ios4 Google Place Api-位于多个位置,ios4,google-places-api,Ios4,Google Places Api,我正在使用GooglePlaceAPI在iphone中显示位置。我使用ClLocation manager类获取设备的当前位置,该位置将作为api的参数传递 但它并不是每次都在多个设备的不同位置工作 有什么帮助吗???看看这个 你可以 这是一个普通的web服务,发布请求并获取XML/JSON列表 位置搜索请求是以下内容的HTTP URL: e、 g 获取JSON输出,如下所示: { "html_attributions" : [ "Listings by \u003ca hre

我正在使用GooglePlaceAPI在iphone中显示位置。我使用ClLocation manager类获取设备的当前位置,该位置将作为api的参数传递

但它并不是每次都在多个设备的不同位置工作

有什么帮助吗???

看看这个

你可以 这是一个普通的web服务,发布请求并获取XML/JSON列表

位置搜索请求是以下内容的HTTP URL:

e、 g

获取JSON输出,如下所示:

{
  "html_attributions" : [
    "Listings by \u003ca href=\"http://www.yellowpages.com.au/\"\u003eYellow Pages\u003c/a\u003e"
  ],
  "results" : [
    {
      "geometry" : {
        "location" : {
          "lat" : -33.8719830,
          "lng" : 151.1990860
        }
      },
        "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
        "id" : "677679492a58049a7eae079e0890897eb953d79b",
        "name" : "Zaaffran Restaurant - BBQ and GRILL, Darling Harbour",
        "rating" : 3.90,
        "reference" : "CpQBjAAAAHDHuimUQATR6gfoWNmZlk5dKUKq_n46BpSzPQCjk1m9glTKkiAHH_Gs4xGttdOSj35WJJDAV90dAPnNnZK2OaxMgogdeHKQhIedh6UduFrW53wtwXigUfpAzsCgIzYNI0UQtCj38cr_DE56RH4Wi9d2bWbbIuRyDX6tx2Fmk2EQzO_lVJ-oq4ZY5uI6I75RnxIQJ6smWUVVIHup9Jvc517DKhoUidfNPyQZZIgGiXS_SwGQ1wg0gtc",
        "types" : [ "restaurant", "food", "establishment" ],
        "vicinity" : "Harbourside Centre 10 Darling Drive, Darling Harbour, Sydney"
    },
    {
      "geometry" : {
        "location" : {
          "lat" : -33.8722580,
          "lng" : 151.1986550
        }
      },
        "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
        "id" : "27ea39c8fed1c0437069066b8dccf958a2d06f19",
        "name" : "Criniti's Darling Harbour",
        "rating" : 3.60,
        "reference" : "CnRwAAAA-5kh5WZ3m1CMTO3LslvhRtAYsrOcQP7wB9AE1bV5R6Bd46NN5wB16MtImXWQ9eS1nWVbV_j-8iXYXRpU13Efp1t_d-Dp4WfEsFcYj-_g6db1SC1vAukyeCyotjS5xrwhzqWWAhgmA4qIliWeev2u1BIQprWzxl_hkj_w3QdTiUBYKxoUDVTjF4RugJdaJWkC4n6w6pSajKw",
        "types" : [ "restaurant", "food", "establishment" ],
        "vicinity" : "Shop 461, 2-10 Darling Drive, Harbourside Shopping Centre, DARLING HARBOUR"
    },
    ...additional results...
  ],
  "status" : "OK"
}
像这样获取XML

<?xml version="1.0" encoding="UTF-8"?>
<PlaceSearchResponse>
 <status>OK</status>
 <result>
  <name>Zaaffran Restaurant - BBQ and GRILL, Darling Harbour</name>
  <vicinity>Harbourside Centre 10 Darling Drive, Darling Harbour, Sydney</vicinity>
  <type>restaurant</type>
  <type>food</type>
  <type>establishment</type>
  <geometry>
   <location>
    <lat>-33.8719830</lat>
    <lng>151.1990860</lng>
   </location>
  </geometry>
  <rating>3.9</rating>
  <icon>http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png</icon>
  <reference>CpQBjAAAAJd_vFgeIo6ogU2gDLEe85XpxRi8LwIQXSVcPS5dxGIytvbNWic7gTlGIleeFRbrP-Rs4_V6AmCcF1RtaUXcb26_Oai6k6n34Ag17Cle3pnVl740CyNpp0VT48lOf7XkMngj75wKHqnApPZ9Bfcn0myuYeEZoKXw7c3pneO4Ty8FTxDqQyLiJk8CAkodTzSn5BIQj0ovOoMS5u-ds6_jygEGxRoUbKMNq2DBZdiS16jO3yku2DOBwNI</reference>
  <id>677679492a58049a7eae079e0890897eb953d79b</id>
 </result>
 <result>
  <name>Criniti's Darling Harbour</name>
  <vicinity>Shop 461, 2-10 Darling Drive, Harbourside Shopping Centre, DARLING HARBOUR</vicinity>
  <type>restaurant</type>
  <type>food</type>
  <type>establishment</type>
  <geometry>
   <location>
    <lat>-33.8722580</lat>
    <lng>151.1986550</lng>
   </location>
  </geometry>
  <rating>3.6</rating>
  <icon>http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png</icon>
  <reference>CnRwAAAAwE_vlF04Iix2hijlKQsJLhpvAj8hwpfXGxtc0ckpBe0d54-rk4dxn8d1ZbaPGxxYfytkf4WJ7l5UC4Zh8jFZg0MTu1S8d66BK4vb2ktpAsKkfb28i3Mrf77ORRPXXjWwRtA7PEEfMP07mjfX3Xdg-RIQwjSMECQHM5S9WAohBIVB0BoUAb4i1DW-fL9E6XbgiDnmyZKrzRE</reference>
  <id>27ea39c8fed1c0437069066b8dccf958a2d06f19</id>
 </result>
 ...additional results...
 <html_attribution>Listings by &lt;a href="http://www.yellowpages.com.au/"&gt;Yellow Pages&lt;/a&gt;</html_attribution>
</PlaceSearchResponse>

好啊
扎夫兰餐厅-烧烤和烧烤,达令港
悉尼达令港达令大道10号海港中心
餐馆
食物
机构
-33.8719830
151.1990860
3.9
http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png
CPQBjaaajdvfgeio6ogu2gdlee85xxri8lwiqxvcps5dxgiytvbnwic7gtlgileefrbrp-Rs4mcc1rtauxcb26oai6n4c1p0cynpp0vt48lof7xkmngj75wkhqnappz9bf0c3c3pneo4ftxyyy1c8cakodtzn5biqj0ovms5c6c2d6c2d6c0c0c2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2c2d2wni
677679492a58049a7eae079e0890897eb953d79b
克里尼蒂达令港
达令港海港购物中心达令大道2-10号461号店
餐馆
食物
机构
-33.8722580
151.1986550
3.6
http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png
CNRWaaawe_vlF04Iix2hijlKQsJLhpvAj8hwpfXGxtc0ckpBe0d54-RK4DxN8D1ZBAPGXXYFYTKF4WJ7L5UC4ZH8JFZG0MTU8D66BK4VB2KTAPKFB28I3MRF77ORRPXJWWRTA7PEEFMP07MJFX3XDG-RIQWJSMECQHM5S9WAOHBIBB0BOUAB4I1DW-FL9E6XBGGIDNMYZRE
27ea39c8fed1c0437069066b8dccf958a2d06f19
…其他结果。。。
a href=”列出的列表http://www.yellowpages.com.au/“黄页/a

Hii,感谢您的回复,但我使用的是google place api中提到的以及上面提到的一样东西,但问题是如果位置发生变化,它不会获取任何数据……即使在某些设备上,它也可以正常工作,但在其他设备上,当我们在不同位置测试它时,它不会。