@defvayne23/svg-marker

Class to create a marker in Google Maps Javascript API using a SVG file as the icon.

Stats

StarsIssuesVersionUpdatedCreatedSize
@defvayne23/svg-marker
1510.8.13 years ago6 years agoMinified + gzip package size for @defvayne23/svg-marker in KB

Readme

SVGMarker

Google Maps JavaScript API overlay class to easily add markers with an SVG image as the icon.

Install

yarn

yarn add @defvayne23/svg-marker

npm

npm install @defvayne23/svg-marker

Examples

FAQ

  • Why is this class useful? The API allows SVGs as icons, but only a single path. I had a use case of a complex image that needed look great at about 50x50 pixels. SVG fits this, but the SVGs required multiple paths and multiple colors. I couldn't find a simple overlay class, so I created my own.

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.