【问题标题】:Google maps API with query string带有查询字符串的 Google 地图 API
【发布时间】:2011-10-27 19:16:41
【问题描述】:

有没有办法获取谷歌地图,无论是静态的 (http://maps.googleapis.com/maps/api/staticmap) 还是动态的,以显示来自正常搜索查询的结果?

例如: 假设我想在静态地图上查找并显示邮政编码 84020 附近的所有 Wendy 的位置

可以列出这件事吗?

例如: http://maps.googleapis.com/maps/api/staticmap?q=wendys,84020&zoom=14&size=512x512&maptype=roadmap&sensor=false

【问题讨论】:

    标签: api google-maps


    【解决方案1】:

    在这里输入链接描述

    http://maps.google.com/maps?q=wendys,84020&zoom=14&size=512x512&maptype=roadmap&sensor=false

    根据需求说明更新答案:

    http://maps.googleapis.com/maps/api/staticmap?center=wendys,84020&zoom=14&size=512x512&maptype=roadmap&sensor=false

    您必须将q= 更改为center=,注意参数区分大小写。否则他们将无法工作。参数listed here 应该可以工作。

    再次更新:

    查看 StaticMap API 参数http://gmaps-samples.googlecode.com/svn/trunk/simplewizard/makestaticmap.html

    .. 和巫师

    http://gmaps-samples.googlecode.com/svn/trunk/simplewizard/makestaticmap.html

    附:可能无法进行搜索,但我想您可以根据此处给出的结果放置经纬度标记来模拟搜索:

    http://maps.googleapis.com/maps/geo?q=wendys,84020&zoom=14&size=512x512&maptype=roadmap&sensor=true

    【讨论】:

    • 那仍然行不通。即,它没有对所有 WENDYS(快餐)进行搜索,并在地图上显示它们。也许用谷歌地图 API 是不可能的?
    • 我为您提供了一个包含 google 地图参数列表的站点,用于滚动您自己的查询,但如果您仍需要帮助,请告诉我,我会为您提供额外帮助。
    • 我继续添加更多信息:7,您可以获得模拟搜索。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-15
    • 2010-12-31
    • 1970-01-01
    • 1970-01-01
    • 2012-03-23
    • 2012-07-15
    相关资源
    最近更新 更多