ig_markerfactory
Advanced tools
Comparing version 2.9.2 to 2.9.3
@@ -6,3 +6,3 @@ { | ||
"description": "Uses canvas to generate google.maps.Marker Icons from graphic fonts (i.e. font-awesome) on the fly", | ||
"version": "2.9.2", | ||
"version": "2.9.3", | ||
"license": "MIT", | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -22,4 +22,4 @@ # Google Maps MarkerFactory | ||
size: new google.maps.Size(54 , 48 ), | ||
origin: new google.maps.Point(0, 0), | ||
anchor: new google.maps.Point(27 , 24 ) | ||
origin: new google.maps.Point(0, 0), | ||
anchor: new google.maps.Point(27 , 24 ) | ||
}); | ||
@@ -35,11 +35,26 @@ ``` | ||
But still, you need an image. You'll need to host every icon and color combination thay might be. | ||
But still, you need an image. You'll need to **host every icon and color combination** thay might ever be. | ||
With MarkerFactory, you generate those icons on the fly. | ||
## Example | ||
run | ||
```sh | ||
npm install | ||
jspm install | ||
serve . | ||
``` | ||
Open your browser at http://localhost:3000/ and you'll be presented with three graphical fonts variations, both in | ||
their CSS render as well as their PNG rendering generated by IG_Markerfactory. | ||
![screenshot from 2016-07-06 12-00-51](https://cloud.githubusercontent.com/assets/238439/16625228/7ac42b58-4371-11e6-9b44-6bdde4098958.png) | ||
Feel free to play with `examples/example.js` to see what happens when you try different colors, icons and scales. | ||
## Installation | ||
@@ -67,21 +82,20 @@ | ||
This is a simple example using AMD loading: | ||
This is a simple example using AMD loading. It assumes you're using a font that's already present in the DOM. | ||
```js | ||
define(['huasofoundries/ig_markerfactory'], function(MarkerFactory) { | ||
define(['huasofoundries/ig_markerfactory'], function(MarkerFactory) { | ||
var myIcon = MarkerFactory.autoIcon({ | ||
label: 'f1b9', | ||
font: 'FontAwesome', | ||
color: '#CC0000', | ||
fontsize: 20 | ||
}); | ||
var myIcon = MarkerFactory.autoIcon({ | ||
label: 'f1b9', | ||
font: 'fontawesome-webfont', | ||
color: '#CC0000', | ||
fontsize: 20 | ||
}); | ||
console.log(myIcon); | ||
console.log(myIcon); | ||
}); | ||
}); | ||
``` | ||
The `myIcon` object is a valid [google.maps.Icon](https://developers.google.com/maps/documentation/javascript/3.exp/reference#Icon) object, | ||
You will see that `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) | ||
@@ -91,13 +105,3 @@ | ||
## Example | ||
run | ||
```sh | ||
npm install | ||
jspm install | ||
serve . | ||
``` | ||
and open your browser at http://localhost:3000/example.html | ||
Sorry, the diff of this file is not supported yet
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
1405333
104