Class: Decidim::Map::Provider::StaticMap::Osm
- Defined in:
- lib/decidim/map/provider/static_map/osm.rb
Overview
The static map utility class for the OpenStreetMap based map services
Instance Attribute Summary
Attributes inherited from Utility
#configuration, #locale, #organization
Instance Method Summary collapse
Methods inherited from StaticMap
Methods inherited from Utility
Constructor Details
This class inherits a constructor from Decidim::Map::Utility
Instance Method Details
#url_params(latitude:, longitude:, options: {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/decidim/map/provider/static_map/osm.rb', line 10 def url_params(latitude:, longitude:, options: {}) # This is the format used by osm-static-maps which is not an # official OSM product but it should be rather easy to setup. For # further information, see: # https://github.com/jperelli/osm-static-maps { geojson: { type: "Point", coordinates: [longitude, latitude] }.to_json, zoom: [:zoom] || 15, width: [:width] || 120, height: [:height] || 120 } end |