fork3rt
V2EX  ›  问与答

google.maps.places 检索问题

  •  
  •   fork3rt · May 25, 2013 · 2919 views
    This topic created in 4758 days ago, the information mentioned may be changed or developed.
    最近想结合 google maps api 做一个旅行分享类 网站。
    我现在的想法就是标注出 用户在google maps 上可视区域内的旅游景点. 于是就用到了google maps 地方搜索请求. 详见:https://developers.google.com/maps/documentation/javascript/places#loading_the_library
    PlacesService 的 search方法 需要 一个参数合集和一个回调函数 用来检索周围地方信息。
    如图:


    现在是把keyword设置为 keyword:'景点景区', 这样确实可以检索出周围不少景点并标注.可是如果我把可视区域拉到国外 就不行了..
    于是我就把types 设置为 types:['park'], 这样国内国外都行.但是检索的地点明显有点不准确.

    在这里想问下大家,我只是想检索景点,types到底该填什么?

    目前项目地址: http://0.travel2.duapp.com/
    1 replies    1970-01-01 08:00:00 +08:00
    fork3rt
        1
    fork3rt  
    OP
       May 25, 2013
    求大神解答啊 .. >_<~~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3294 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:52 · PVG 19:52 · LAX 04:52 · JFK 07:52
    ♥ Do have faith in what you're doing.