google-static-maps-styler-query
v6.0.0
Published
Converts a Google Maps styler array to a Google Static Maps styler URL query string.
Downloads
20
Maintainers
Readme
google-static-maps-styler-query
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
Exports
These ECMAScript modules are published to npm and exported via the package.json
exports
field: