【问题标题】:Google Maps API check if a location has weather informationGoogle Maps API 检查某个位置是否有天气信息
【发布时间】:2013-03-28 09:47:03
【问题描述】:

在 Google Maps API v3 中是否可以检查指定位置的天气数据是否可用? 我的意思是天气图标,点击它会弹出显示未来几天预报的工具提示。


我正在使用 Google Maps API v3 中集成的 WeatherLayer 和 CloudLayer。

【问题讨论】:

    标签: google-maps google-maps-api-3 weather google-weather-api


    【解决方案1】:

    我认为您可以尝试使用天气库。 WeatherLayer 和 CloudLayer 对象允许您将天气预报和云图像添加到地图中。 https://developers.google.com/maps/documentation/javascript/layers#WeatherLayer

    【讨论】:

    • 抱歉,我没有说明我已经在使用 GMaps API v3 中提供的 WeatherLayer 和 CloudLayer。所以你建议在天气层添加点击事件的监听器,对吗?如果我能知道一个位置有一个天气层,尽管用户与之交互,那将是完美的。
    猜你喜欢
    • 1970-01-01
    • 2014-10-16
    • 2013-01-15
    • 2012-03-29
    • 2012-07-25
    • 2016-05-28
    • 2012-10-08
    • 2020-12-21
    • 1970-01-01
    相关资源
    最近更新 更多