google-maps-image-api
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.
usage
const image = require('google-maps-image-api')
image({
type: 'staticmap',
center: '40.714728,-73.998672'
})
static maps
required parameters
{
type: 'staticmap',
center: '40.714728,-73.998672'
}
optional parameters
{
key: '<your api key>',
zoom: 14,
size: '320x240',
scale: 1,
format: 'JPEG',
maptype: 'roadmap',
language: 'en',
region: 'us',
markers: 'color:blue|label:S|11211|11206|11222',
path: 'color:0x0000ff|weight:5|40.737102,-73.990318|40.749825,-73.987963',
visible: 'Toronto',
style: 'feature:administrative|element:labels|weight:3.9|visibility:on|inverse_lightness:true',
}
streetview pictures
required parameters
{
type: 'streetview',
location: 'Toronto',
pano: '<pano id>',
}
optional parameters
{
key: '<your api key>',
size: '320x240',
heading: 45,
fov: 90,
pitch: 0,
}