MarkerMaker
Small service for outlining map pins via HTML5 Canvas.
Especially useful for creating custom Leaflet markers.
Fill free to try out the demo and go through the documentation.
Setup
npm install marker-maker --save
import * as markerOutliner from 'marker-maker'
or simply add to your HTML file the following code:
<script src="https://cdn.rawgit.com/mmaltsev/MarkerMaker/7c945bde/dist/main.js"></script>
Usage
let iconUrl = markerOutliner(color, width, height, markerType)
For a better understanding just go through the demo code.
Options
markerOutliner(color, width, height, markerType)
Variable | Type | Description |
---|---|---|
color | string | color of the marker (standard / HEX / RGB) |
width | number | width of the marker |
height | number | height of the marker |
markerType | string | 'pin' / 'house' (optional, 'pin' by default) |
Example
License
MIT License. Copyright (c) 2017 Maxim Maltsev.