New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mapkick-static

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapkick-static

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Mapkick Static

Create beautiful static maps with one line of Ruby. No more fighting with mapping libraries!

See it in action

:fire: For JavaScript maps, check out Mapkick

Build Status

Installation

Add this line to your application’s Gemfile:

gem "mapkick-static"

Mapkick Static uses the Mapbox Static Images API. Create a Mapbox account to get an access token and set ENV["MAPBOX_ACCESS_TOKEN"] in your environment.

Maps

Point map

Point map
<%= static_map [{latitude: 37.7829, longitude: -122.4190}] %>

Area map (experimental)

Area map
<%= static_area_map [{geometry: {type: "Polygon", coordinates: ...}}] %>

Data

Data can be an array

<%= static_map [{latitude: 37.7829, longitude: -122.4190}] %>

Point Map

Use latitude or lat for latitude and longitude, lon, or lng for longitude

You can specify a color for each data point

{
  latitude: ...,
  longitude: ...,
  color: "#f84d4d"
}

Area Map

Use geometry with a GeoJSON Polygon or MultiPolygon

You can specify a color for each data point

{
  geometry: {type: "Polygon", coordinates: ...},
  color: "#0090ff"
}

Options

Width and height

<%= static_map data, width: 800, height: 500 %>

Alt text

<%= static_map data, alt: "Map of ..." %>

Marker color

<%= static_map data, markers: {color: "#f84d4d"} %>

Map style

<%= static_map data, style: "mapbox/outdoors-v12" %>

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/mapkick-static.git
cd mapkick-static
bundle install
bundle exec rake test

FAQs

Package last updated on 03 May 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc