Nicely Presented Misnomer
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

google-static-maps-styler-query

1.0.0 • Public • Published

google-static-maps-styler-query

NPM version Github issues Github stars

Converts a Google Maps styler array to a Google Static Maps styler URL query string.

  • Node >= 6.4 supported.
  • > 2% market share browsers supported.
  • MIT license.

Usage

Install with Yarn:

yarn add google-static-maps-styler-query
import googleStaticMapsStylerQuery from 'google-static-maps-styler-query'
 
const stylerArray = [{
  stylers: [{
    visibility: 'simplified'
  }, {
    hue: '#e91e63'
  }, {
    gamma: 0.8
  }]
}, {
  elementType: 'labels',
  stylers: [{
    visibility: 'off'
  }]
}]
const stylerQuery = googleStaticMapsStylerQuery(stylerArray)
const googleStaticMapSrc = `https://maps.googleapis.com/maps/api/staticmap?center=Australia&size=250x200${stylerQuery}`

install

npm i google-static-maps-styler-query

Downloadsweekly downloads

2

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability