我正在阅读Google的API,但没有看到任何示例,并且所有其他Google搜索示例都有点旧(大约1-2岁,大部分都是基于API密钥的:S)。Google地理编码API结果在地图上显示?
我想要一个文本输入。发送按钮。和下面的iframe。
如何使用我自己的输入显示地图上的位置?
这时我的iframe看起来像这样:
<iframe width="230" height="180" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="<?php echo $src ?>">
输入:(?但据我所知JSON建议)
<input id="googleMaps" name="googleMaps" type="text" />
此时此刻我“米,XML试图,但我发现XML只是文字在我的iframe,如:
This document had no style information.
<GeocodeResponse>
<status>
OK
</status>
<result>
<type>
locality
</type>
<type>
political
</type>
<formatted_address>
(...)
如何将这些数据传递给谷歌,并得到映射回:)?
非常感谢。
我建议你看看JavaScript API,因为你想在地图上显示结果。 http://code.google.com/apis/maps/documentation/javascript/basics.html有地理编码示例。 – igorw 2010-11-21 14:42:26
您没有提及您需要的地图类型,但是您可能会发现易于使用的静态地图:http://code.google.com/apis/maps/documentation/staticmaps/。您只需要几个基本工具:cURL和SimpleXML。 – stillstanding 2010-11-21 14:46:21
不幸的是我要显示动态地图(像“blabla,纽约,纽约州”的用户类型地址,并且它显示了一个缩放选项等地图。我真的需要使用外部脚本吗?; s – fomicz 2010-11-21 14:52:30