
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Build static image maps using Google's Static Map API
gem 'static_map'
And then execute:
$ bundle
Or install it yourself as:
$ gem install static_map
image = StaticMap::Image.new({
size: '500x500',
sensor: false,
markers: [],
maptype: 'road',
zoom: 8,
title: 'A map',
alt: 'Alt text for img html',
path: './my-map.png'
})
image.url
# => http://maps.google.com/maps/api/staticmap?size=500x500&zoom=1&sensor=true
image.to_html
# => <img src='http://maps.google.com/maps/api/staticmap?size=500x500&zoom=1&sensor=true' title='' alt=''/>
img.save # save map to disk with path option
The options are
<%=raw StaticMap::Image.new %>
The markers option accepts either a location (E.g., "Burlington, Vermont") or latitude and longitude coordinates.
<%=raw StaticMap::Image.new({
zoom: 13,
markers: [
{ location: "Winooski,Vermont", color: "green", label: "A" },
{ latitude: 44.477171, longitude: -73.222032, color: "blue", label: "B" }
]
}) %>
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)The following links are great resources for working with Google Maps API
FAQs
Unknown package
We found that static_map demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.