OsmShortlink (osm_shortlink v0.1.0)
Link to this section Summary
Functions
Function calculates the openstreetmap short link see http://wiki.openstreetmap.org/wiki/Shortlink
Link to this section Functions
Link to this function
osm_shortlink(lat, lng, zoom, marker \\ false)
Specs
osm_shortlink(number(), number(), pos_integer(), boolean()) :: binary()
Function calculates the openstreetmap short link see http://wiki.openstreetmap.org/wiki/Shortlink
Its a port to elixir of the erlang code made by Krzysztof Marciniak - Public Domain
other implementations are:
https://github.com/openstreetmap/openstreetmap-website/blob/master/lib/short_link.rb
based on https://gist.github.com/mdornseif/5652824 by Maximillian Dornseif
iex(76)> OsmShortlink.osm_shortlink(51.5110,0.0550, 16) "http://osm.org/go/0EEQjEEb" iex(78)> OsmShortlink.osm_shortlink(51.5110,0.0550, 9) "http://osm.org/go/0EEQjE--" iex(79)> OsmShortlink.osm_shortlink(51.5110,0.0550, 9, true) "http://osm.org/go/0EEQjE--?m"