
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
google-maps-image-api-url
Advanced tools
This is an easy way to consume the Google Maps Image API to render static maps or street views
Allows you to easily get Google Maps Image API urls.
Google Maps Image API allows you to get static images of a 2d map or streetview. This module will return the url of such an image. The options correlate to those in the API.
const image = require('google-maps-image-api')
image({
type: 'staticmap',
center: '40.714728,-73.998672'
}) // -> url
{
type: 'staticmap',
center: '40.714728,-73.998672' // can also be a street address
}
{
key: '<your api key>', // your Google API Key
zoom: 14, // 0 = entire world, 21 = streets
size: '320x240', // size of the image
scale: 1, // for retina screens this should be 2
format: 'JPEG', // or 'PNG' or 'GIF'
maptype: 'roadmap', // or 'satellite' or 'hybrid' or 'terrain'
language: 'en', // language of the map
region: 'us', // country code in ccTLD
// defines the appropriate borders to display, based on geo-political sensitivities
markers: 'color:blue|label:S|11211|11206|11222', // add markers to the map
// see https://developers.google.com/maps/documentation/staticmaps/index#Markers
path: 'color:0x0000ff|weight:5|40.737102,-73.990318|40.749825,-73.987963',
// Add a path to the map. A path can be filled or just a line.
// see https://developers.google.com/maps/documentation/staticmaps/index#Paths
visible: 'Toronto', // a location that should be visible
// This can be either long,lat or a location name.
style: 'feature:administrative|element:labels|weight:3.9|visibility:on|inverse_lightness:true',
// how features are rendered eg. roads, parks, etc.
// see https://developers.google.com/maps/documentation/staticmaps/index#StyledMaps
}
{
type: 'streetview',
// You must define either location or pano.
location: 'Toronto', // location name or long,lat
pano: '<pano id>', // id of a specific panorama
}
{
key: '<your api key>', // your Google API key
size: '320x240', // size of the image
heading: 45, // bearing (direction) of the camera. 0 - 360. 0 == North
fov: 90, // field of view in degrees.
pitch: 0, // up/down angle of the camera. 90 = straight up. -90 = straight down
}
FAQs
This is an easy way to consume the Google Maps Image API to render static maps or street views
The npm package google-maps-image-api-url receives a total of 18 weekly downloads. As such, google-maps-image-api-url popularity was classified as not popular.
We found that google-maps-image-api-url 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
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.