6.0.0 • Published 2 years ago

google-static-maps-styler-query v6.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

google-static-maps-styler-query

npm version CI status

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

Installation

To install with npm, run:

npm install google-static-maps-styler-query

Examples

How to create a styled static map URL:

import googleStaticMapsStylerQuery from "google-static-maps-styler-query";

const styles = [{ elementType: "labels", stylers: [{ visibility: "off" }] }];
const stylerQuery = googleStaticMapsStylerQuery(styles);
const googleStaticMapSrc = `https://maps.googleapis.com/maps/api/staticmap?center=Australia&size=250x200${stylerQuery}`;

Requirements

  • Node.js: ^12.22.0 || ^14.17.0 || >= 16.0.0
  • Browsers: > 0.5%, not OperaMini all, not IE > 0, not dead

Exports

These ECMAScript modules are published to npm and exported via the package.json exports field:

6.0.0

2 years ago

5.0.0

3 years ago

4.0.0

4 years ago

3.0.0

4 years ago

2.0.0

5 years ago

1.0.0

7 years ago