ig_markerfactory
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -5,3 +5,3 @@ { | ||
"jsnext:main": "markerfactory.esm.js", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -1,2 +0,2 @@ | ||
# IG MarkerFactory | ||
# IG MarkerFactory: uses a canvas element to create images on the fly, specially taylored for Google Maps API. | ||
@@ -27,3 +27,3 @@ [![Build Status](https://travis-ci.org/HuasoFoundries/ig_markerfactory.svg)](https://travis-ci.org/HuasoFoundries/ig_markerfactory) [![Code Climate](https://codeclimate.com/github/HuasoFoundries/ig_markerfactory/badges/gpa.svg)](https://codeclimate.com/github/HuasoFoundries/ig_markerfactory) [![Codacy Badge](https://api.codacy.com/project/badge/grade/44d15485b93e43cf86356e56a8bfb7d1)](https://www.codacy.com/app/amenadiel/ig_markerfactory) | ||
var myimage = MarkerFactory.autoIcon({ | ||
var myIcon = MarkerFactory.autoIcon({ | ||
label: 'f1b9', | ||
@@ -35,3 +35,3 @@ font: 'fontawesome-webfont', | ||
console.log({myimage:myimage}); | ||
console.log(myIcon); | ||
@@ -42,4 +42,28 @@ }); | ||
The `myIcon` object is a valid [google.maps.Icon](https://developers.google.com/maps/documentation/javascript/3.exp/reference#Icon) object, | ||
but of course you might want the image for other purposes so you can just use `myIcon.url` which is a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs) | ||
Examples: | ||
```js | ||
define(['huasofoundries/ig_markerfactory'], function(MarkerFactory) { | ||
var myIcon = MarkerFactory.autoIcon({ | ||
label: 'f1b9', | ||
font: 'fontawesome-webfont', | ||
color: '#CC0000', | ||
fontsize: 20 | ||
}); | ||
console.log(myIcon); | ||
}); | ||
``` | ||
You'll see that `myimage.url` is a data url you can use as the SRC attribute of the image. | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103664
67