• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

sntran/google_maps: Google Maps API written in Elixir

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

sntran/google_maps

开源软件地址(OpenSource Url):

https://github.com/sntran/google_maps

开源编程语言(OpenSource Language):

Elixir 99.5%

开源软件介绍(OpenSource Introduction):

Google Maps Open in Gitpod

Elixir wrapper around Google Maps APIs

Actions Status Build Status Hex Version License

Services

  • Directions - Directions between multiple locations.
  • Distance Matrix - Travel time and distance for multiple destinations. (contributed by @bnns)
  • Elevation - Elevation data for any point in the world.
  • Geocoding - Converts between addresses and geographic coordinates.
  • Place Add - Allows you to supplement the data in Google's Places database with data from your application.
  • Place Autocomplete - can be used to automatically fill in the name and/or address of a place as you type.
  • Place Details - Returns more detailed information about a specific Place, including user reviews.
  • Place Photo - Gives you access to the millions of Place related photos stored in Google's Place database (contributed by @gVirtu)
  • Place Nearby Search - Returns a list of places within a specified area based on a user's location or search string. (contributed by @distortia)
  • Query Autocomplete - can be used to provide a query prediction service for text-based geographic searches, by returning suggested queries as you type.
  • Timezone - Time zone data for anywhere in the world. (contributed by @uesteibar)

Methods

  • directions/3
  • distance/3
  • elevation/2
  • geocode/2
  • place_autocomplete/2
  • place_query/2
  • place_nearby/3
  • place_details/2
  • place_photo/4
  • timezone/2
  • get/2

Installation

If available in Hex, the package can be installed as:

  1. Add google_maps to your list of dependencies in mix.exs:
def deps do
  [{:google_maps, "~> 0.11"}]
end
  1. Ensure google_maps is started before your application:
def application do
  [applications: [:google_maps]]
end
  1. In your application's config/config.exs, add:
config :google_maps,
  api_key: "YOUR API KEY HERE"

Or you can use GOOGLE_MAPS_API_KEY system environment variable when running in iex.

If separate API keys are needed per request, they can be set through key option, i.e.:

GoogleMaps.directions("Toronto", "Montreal", key: API_KEY_1)

Development

You'll need a Google API key with all relevant APIs (see above) enabled. Add your key to the environment as specified above.

Then run tests:

mix deps.get test

mix test




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap