From e0e71a924d017f5b3ee2a8e0cd9ff133dba27700 Mon Sep 17 00:00:00 2001 From: Lennard Voogdt Date: Sat, 26 Oct 2013 21:54:50 +0200 Subject: [PATCH 01/15] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index ec92a07..de69da0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ # Leaflet.awesome-markers plugin Colorful iconic & retina-proof markers for Leaflet, based on the Font Awesome/Twitter Bootstrap icons +Version 1.0 of Leaflet.awesome-markers is tested with: +- Bootstrap 2 +- Font Awesome 3.0 +- Leaflet 0.5 + +Use version 2.0 for newer versions of bootstrap and font-awesome! + ## Screenshots ![AwesomeMarkers screenshot](https://raw.github.com/lvoogdt/Leaflet.awesome-markers/master/screenshots/screenshot-soft.png "Screenshot of AwesomeMarkers") From 1232d91c9b4bcb66e11ce9c5943a49d00568c51c Mon Sep 17 00:00:00 2001 From: "K.K. POON" Date: Fri, 28 Mar 2014 14:47:29 +0800 Subject: [PATCH 02/15] add text option for marker --- dist/leaflet.awesome-markers.js | 17 ++++++++++++++--- dist/leaflet.awesome-markers.min.js | 8 +------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dist/leaflet.awesome-markers.js b/dist/leaflet.awesome-markers.js index 7505b6f..d292b52 100644 --- a/dist/leaflet.awesome-markers.js +++ b/dist/leaflet.awesome-markers.js @@ -31,7 +31,8 @@ extraClasses: '', icon: 'home', markerColor: 'blue', - iconColor: 'white' + iconColor: 'white', + font: 'monospace' }, initialize: function (options) { @@ -72,11 +73,21 @@ if(options.iconColor === 'white' || options.iconColor === 'black') { iconColorClass = "icon-" + options.iconColor; } else { - iconColorStyle = "style='color: " + options.iconColor + "' "; + iconColorStyle = "color: " + options.iconColor; } } + if(options.font && options.text) { + if (iconColorStyle) { + iconColorStyle += "; "; + } + iconColorStyle += "font-family: " + options.font; + } + + if (options.text) { + return "" + options.text + ""; + } - return ""; + return ""; }, _setIconStyles: function (img, name) { diff --git a/dist/leaflet.awesome-markers.min.js b/dist/leaflet.awesome-markers.min.js index 376e57e..bdb2b11 100644 --- a/dist/leaflet.awesome-markers.min.js +++ b/dist/leaflet.awesome-markers.min.js @@ -1,7 +1 @@ -/* - Leaflet.AwesomeMarkers, a plugin that adds colorful iconic markers for Leaflet, based on the Font Awesome icons - (c) 2012-2013, Lennard Voogdt - - http://leafletjs.com - https://github.com/lvoogdt -*//*global L*/(function(e,t,n){"use strict";L.AwesomeMarkers={};L.AwesomeMarkers.version="2.0.1";L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",icon:"home",markerColor:"blue",iconColor:"white"},initialize:function(e){e=L.Util.setOptions(this,e)},createIcon:function(){var e=t.createElement("div"),n=this.options;n.icon&&(e.innerHTML=this._createInner());n.bgPos&&(e.style.backgroundPosition=-n.bgPos.x+"px "+ -n.bgPos.y+"px");this._setIconStyles(e,"icon-"+n.markerColor);return e},_createInner:function(){var e,t="",n="",r="",i=this.options;i.icon.slice(0,i.prefix.length+1)===i.prefix+"-"?e=i.icon:e=i.prefix+"-"+i.icon;i.spin&&typeof i.spinClass=="string"&&(t=i.spinClass);i.iconColor&&(i.iconColor==="white"||i.iconColor==="black"?n="icon-"+i.iconColor:r="style='color: "+i.iconColor+"' ");return""},_setIconStyles:function(e,t){var n=this.options,r=L.point(n[t==="shadow"?"shadowSize":"iconSize"]),i;t==="shadow"?i=L.point(n.shadowAnchor||n.iconAnchor):i=L.point(n.iconAnchor);!i&&r&&(i=r.divideBy(2,!0));e.className="awesome-marker-"+t+" "+n.className;if(i){e.style.marginLeft=-i.x+"px";e.style.marginTop=-i.y+"px"}if(r){e.style.width=r.x+"px";e.style.height=r.y+"px"}},createShadow:function(){var e=t.createElement("div");this._setIconStyles(e,"shadow");return e}});L.AwesomeMarkers.icon=function(e){return new L.AwesomeMarkers.Icon(e)}})(this,document); +!function(o,e){"use strict";L.AwesomeMarkers={},L.AwesomeMarkers.version="2.0.1",L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",extraClasses:"",icon:"home",markerColor:"blue",iconColor:"white",font:"monospace"},initialize:function(o){o=L.Util.setOptions(this,o)},createIcon:function(){var o=e.createElement("div"),n=this.options;return n.icon&&(o.innerHTML=this._createInner()),n.bgPos&&(o.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(o,"icon-"+n.markerColor),o},_createInner:function(){var o,e="",n="",s="",i=this.options;return o=i.icon.slice(0,i.prefix.length+1)===i.prefix+"-"?i.icon:i.prefix+"-"+i.icon,i.spin&&"string"==typeof i.spinClass&&(e=i.spinClass),i.iconColor&&("white"===i.iconColor||"black"===i.iconColor?n="icon-"+i.iconColor:s="color: "+i.iconColor),i.font&&i.text&&(s&&(s+="; "),s+="font-family: "+i.font),i.text?""+i.text+"":""},_setIconStyles:function(o,e){var n,s=this.options,i=L.point(s["shadow"===e?"shadowSize":"iconSize"]);n=L.point("shadow"===e?s.shadowAnchor||s.iconAnchor:s.iconAnchor),!n&&i&&(n=i.divideBy(2,!0)),o.className="awesome-marker-"+e+" "+s.className,n&&(o.style.marginLeft=-n.x+"px",o.style.marginTop=-n.y+"px"),i&&(o.style.width=i.x+"px",o.style.height=i.y+"px")},createShadow:function(){var o=e.createElement("div");return this._setIconStyles(o,"shadow"),o}}),L.AwesomeMarkers.icon=function(o){return new L.AwesomeMarkers.Icon(o)}}(this,document); \ No newline at end of file From 72443db815220c0271004781f16817e3aacbbdbf Mon Sep 17 00:00:00 2001 From: gerbsen Date: Fri, 12 Dec 2014 11:13:12 +0100 Subject: [PATCH 03/15] Updated possible color values --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e4cbda..3429f44 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Add the ionicon stylesheet from a [CDN](http://code.ionicframework.com/ionicons/ | --------------- | ---------------------- | ------------- | ---------------------------------------------------- | | icon | Name of the icon | 'home' | See glyphicons or font-awesome | | prefix | Select de icon library | 'glyphicon' | 'fa' for font-awesome or 'glyphicon' for bootstrap 3 | -| markerColor | Color of the marker | 'blue' | 'red', 'darkred', 'orange', 'green', 'darkgreen', 'blue', 'purple', 'darkpuple', 'cadetblue' | +| markerColor | Color of the marker | 'blue' | 'red', 'darkred', 'lightred', 'orange', 'beige', 'green', 'darkgreen', 'lightgreen', 'blue', 'darkblue', 'lightblue', 'purple', 'darkpurple', 'pink', 'cadetblue', 'white', 'gray', 'lightgray', 'black' | | iconColor | Color of the icon | 'white' | 'white', 'black' or css code (hex, rgba etc) | | spin | Make the icon spin | false | true or false. Font-awesome required | | extraClasses | Additional classes in the created tag | '' | 'fa-rotate90 myclass' eller other custom configuration | From a9ea7a6c855b0b3db2197c637e9c11c7aaf3e534 Mon Sep 17 00:00:00 2001 From: The Code Destroyer Date: Tue, 6 Jan 2015 17:24:58 +0100 Subject: [PATCH 04/15] Implemented icon rotation support --- dist/leaflet.awesome-markers.js | 38 +++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/dist/leaflet.awesome-markers.js b/dist/leaflet.awesome-markers.js index 7505b6f..0abce3c 100644 --- a/dist/leaflet.awesome-markers.js +++ b/dist/leaflet.awesome-markers.js @@ -1,10 +1,10 @@ /* - Leaflet.AwesomeMarkers, a plugin that adds colorful iconic markers for Leaflet, based on the Font Awesome icons - (c) 2012-2013, Lennard Voogdt + Leaflet.AwesomeMarkers, a plugin that adds colorful iconic markers for Leaflet, based on the Font Awesome icons + (c) 2012-2013, Lennard Voogdt - http://leafletjs.com - https://github.com/lvoogdt -*/ + http://leafletjs.com + https://github.com/lvoogdt + */ /*global L*/ @@ -31,7 +31,8 @@ extraClasses: '', icon: 'home', markerColor: 'blue', - iconColor: 'white' + iconColor: 'white', + iconRotate: 0 }, initialize: function (options) { @@ -56,7 +57,11 @@ }, _createInner: function() { - var iconClass, iconSpinClass = "", iconColorClass = "", iconColorStyle = "", options = this.options; + var iconClass, + iconSpinClass = "", + iconColorClass = "", + options = this.options, + inlineStyle = "style='"; if(options.icon.slice(0,options.prefix.length+1) === options.prefix + "-") { iconClass = options.icon; @@ -72,11 +77,19 @@ if(options.iconColor === 'white' || options.iconColor === 'black') { iconColorClass = "icon-" + options.iconColor; } else { - iconColorStyle = "style='color: " + options.iconColor + "' "; + inlineStyle += "color: " + options.iconColor + ";"; } } - return ""; + if(options.iconRotate && options.iconRotate !== 0) { + inlineStyle += "-webkit-transform: rotate(" + options.iconRotate + "deg);"; + inlineStyle += "-moz-transform: rotate(" + options.iconRotate + "deg);"; + inlineStyle += "-o-transform: rotate(" + options.iconRotate + "deg);"; + inlineStyle += "-ms-transform: rotate(" + options.iconRotate + "deg);"; + inlineStyle += "transform: rotate(" + options.iconRotate + "deg);"; + } + + return ""; }, _setIconStyles: function (img, name) { @@ -112,14 +125,11 @@ this._setIconStyles(div, 'shadow'); return div; - } + } }); - + L.AwesomeMarkers.icon = function (options) { return new L.AwesomeMarkers.Icon(options); }; }(this, document)); - - - From f864f2151645b2d0db8126ebe44f8f29490e31bd Mon Sep 17 00:00:00 2001 From: fritzvd Date: Fri, 20 Feb 2015 11:18:45 +0100 Subject: [PATCH 05/15] fa-inverse instead of icon-white for FA 4.3 --- dist/leaflet.awesome-markers.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/leaflet.awesome-markers.js b/dist/leaflet.awesome-markers.js index 7505b6f..973ad91 100644 --- a/dist/leaflet.awesome-markers.js +++ b/dist/leaflet.awesome-markers.js @@ -69,8 +69,11 @@ } if(options.iconColor) { - if(options.iconColor === 'white' || options.iconColor === 'black') { + if(options.iconColor === 'white' || options.iconColor === 'black' && + options.prefix !== 'fa') { iconColorClass = "icon-" + options.iconColor; + } else if (options.prefix === 'fa' && options.iconColor === 'white') { + iconColorClass = "fa-inverse"; } else { iconColorStyle = "style='color: " + options.iconColor + "' "; } From a9cf424d52b2007cf2120288049ae78a45149d74 Mon Sep 17 00:00:00 2001 From: fritzvd Date: Fri, 20 Feb 2015 11:28:31 +0100 Subject: [PATCH 06/15] iffing is hard --- dist/leaflet.awesome-markers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/leaflet.awesome-markers.js b/dist/leaflet.awesome-markers.js index 973ad91..7021464 100644 --- a/dist/leaflet.awesome-markers.js +++ b/dist/leaflet.awesome-markers.js @@ -69,7 +69,7 @@ } if(options.iconColor) { - if(options.iconColor === 'white' || options.iconColor === 'black' && + if ((options.iconColor === 'white' || options.iconColor === 'black') && options.prefix !== 'fa') { iconColorClass = "icon-" + options.iconColor; } else if (options.prefix === 'fa' && options.iconColor === 'white') { From f27342845dcc4bd65db01263577d91e3fae57924 Mon Sep 17 00:00:00 2001 From: Matt Barnes Date: Thu, 19 Mar 2015 09:58:14 +1300 Subject: [PATCH 07/15] Allow the prefix config option to be falsy. --- dist/leaflet.awesome-markers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/leaflet.awesome-markers.js b/dist/leaflet.awesome-markers.js index 7505b6f..36887d1 100644 --- a/dist/leaflet.awesome-markers.js +++ b/dist/leaflet.awesome-markers.js @@ -58,7 +58,7 @@ _createInner: function() { var iconClass, iconSpinClass = "", iconColorClass = "", iconColorStyle = "", options = this.options; - if(options.icon.slice(0,options.prefix.length+1) === options.prefix + "-") { + if(!options.prefix || (options.icon.slice(0,options.prefix.length+1) === options.prefix + "-")) { iconClass = options.icon; } else { iconClass = options.prefix + "-" + options.icon; @@ -76,7 +76,7 @@ } } - return ""; + return ""; }, _setIconStyles: function (img, name) { From 85c594dafed9cbbfe0bf91538d3c3b07f4bfd732 Mon Sep 17 00:00:00 2001 From: ghybs Date: Wed, 8 Jul 2015 13:36:48 +0400 Subject: [PATCH 08/15] Correct background-position of White Marker Following my issue #59. --- dist/leaflet.awesome-markers.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/leaflet.awesome-markers.css b/dist/leaflet.awesome-markers.css index 588a99c..31594c1 100644 --- a/dist/leaflet.awesome-markers.css +++ b/dist/leaflet.awesome-markers.css @@ -108,7 +108,7 @@ Version: 1.0 } .awesome-marker-icon-white { - background-position: -574px 0; + background-position: -576px 0; } .awesome-marker-icon-gray { From cd5051d7cd150f0d099979ecb413f13710c9c394 Mon Sep 17 00:00:00 2001 From: Alexis Caffa Date: Wed, 18 May 2016 04:11:52 -0300 Subject: [PATCH 09/15] Update Fiddle link on readme Cloudmade tile not working. Replaced by OpenStreetMap --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e4cbda..c800da2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ For bootstrap 2.x & Fontawesome 3.x use Leaflet.awesome-markers v1.0 ## Screenshots ![AwesomeMarkers screenshot](https://raw.github.com/lvoogdt/Leaflet.awesome-markers/master/screenshots/screenshot-soft.png "Screenshot of AwesomeMarkers") -JSfiddle demo +JSfiddle demo ### Twitter Bootstrap/Font-Awesome icons This plugin depends on either Bootstrap or Font-Awesome for the rendering of the icons. See these urls for more information: From 3f35924ebb9b5226e04955c21cff9803b4d28395 Mon Sep 17 00:00:00 2001 From: JeanMichel FRANCOIS Date: Tue, 24 May 2016 14:06:57 +0200 Subject: [PATCH 10/15] fix: add package.json to make it installable throw npm --- package.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..63fdb35 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "leaflet.awesome-markers", + "version": "2.0.2", + "description": "Colorful, iconic & retina-proof markers for Leaflet, based on the Font Awesome/Twitter Bootstrap icons", + "main": "index.js", + "directories": { + "example": "examples" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/toutpt/Leaflet.awesome-markers.git" + }, + "keywords": [ + "leaflet" + ], + "author": "Lennard Voogdt", + "license": "MIT", + "bugs": { + "url": "https://github.com/toutpt/Leaflet.awesome-markers/issues" + }, + "homepage": "https://github.com/toutpt/Leaflet.awesome-markers#readme" +} From ed3a9d9ef4c67ff86f9c2ba5394b1de7774e2e01 Mon Sep 17 00:00:00 2001 From: George Silva Date: Tue, 1 Nov 2016 13:29:42 -0200 Subject: [PATCH 11/15] new release --- bower.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 4589cc3..b3a31cb 100644 --- a/bower.json +++ b/bower.json @@ -1,9 +1,10 @@ { "name": "Leaflet.awesome-markers", - "version": "2.0.2", - "homepage": "https://github.com/lvoogdt/Leaflet.awesome-markers", + "version": "2.0.3", + "homepage": "https://github.com/sigma-geosistemas/Leaflet.awesome-markers", "authors": [ - "Lennard Voogdt " + "Lennard Voogdt ", + "Sigma Geosistemas Date: Thu, 1 Dec 2016 14:48:10 -0500 Subject: [PATCH 12/15] fixed a small bug and uglified --- bower.json | 5 +++-- dist/leaflet.awesome-markers.js | 3 ++- dist/leaflet.awesome-markers.min.js | 2 +- examples/basic-example.html | 26 +++++++++++++------------ examples/random-markers.html | 26 +++++++++++-------------- examples/with-bootstrap.html | 30 +++++++++++++---------------- package.json | 8 ++++---- 7 files changed, 48 insertions(+), 52 deletions(-) diff --git a/bower.json b/bower.json index 4589cc3..b221346 100644 --- a/bower.json +++ b/bower.json @@ -1,9 +1,10 @@ { "name": "Leaflet.awesome-markers", "version": "2.0.2", - "homepage": "https://github.com/lvoogdt/Leaflet.awesome-markers", + "homepage": "https://github.com/bhaskarvk/Leaflet.awesome-markers", "authors": [ - "Lennard Voogdt " + "Lennard Voogdt ", + "Bhaskar V. Karambelkar " ], "description": "Colorful iconic & retina-proof markers for Leaflet, based on the Glyphicons / Font-Awesome icons", "main": [ diff --git a/dist/leaflet.awesome-markers.js b/dist/leaflet.awesome-markers.js index 999bf13..96e0394 100644 --- a/dist/leaflet.awesome-markers.js +++ b/dist/leaflet.awesome-markers.js @@ -61,7 +61,8 @@ var iconClass, iconSpinClass = "", iconColorClass = "", - options = this.options, + iconColorStyle = "", + options = this.options; if(!options.prefix || (options.icon.slice(0,options.prefix.length+1) === options.prefix + "-")) { iconClass = options.icon; diff --git a/dist/leaflet.awesome-markers.min.js b/dist/leaflet.awesome-markers.min.js index 210fb80..0aaf719 100644 --- a/dist/leaflet.awesome-markers.min.js +++ b/dist/leaflet.awesome-markers.min.js @@ -1 +1 @@ -!function(o,e){"use strict";L.AwesomeMarkers={},L.AwesomeMarkers.version="2.0.1",L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",extraClasses:"",icon:"home",markerColor:"blue",iconColor:"white",font:"monospace"},initialize:function(o){o=L.Util.setOptions(this,o)},createIcon:function(){var o=e.createElement("div"),n=this.options;return n.icon&&(o.innerHTML=this._createInner()),n.bgPos&&(o.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(o,"icon-"+n.markerColor),o},_createInner:function(){var o,e="",n="",s="",i=this.options;return o=i.prefix&&i.icon.slice(0,i.prefix.length+1)!==i.prefix+"-"?i.prefix+"-"+i.icon:i.icon,i.spin&&"string"==typeof i.spinClass&&(e=i.spinClass),i.iconColor&&("white"===i.iconColor||"black"===i.iconColor?n="icon-"+i.iconColor:s="color: "+i.iconColor),i.font&&i.text&&(s&&(s+="; "),s+="font-family: "+i.font),i.text?""+i.text+"":""},_setIconStyles:function(o,e){var n,s=this.options,i=L.point(s["shadow"===e?"shadowSize":"iconSize"]);n=L.point("shadow"===e?s.shadowAnchor||s.iconAnchor:s.iconAnchor),!n&&i&&(n=i.divideBy(2,!0)),o.className="awesome-marker-"+e+" "+s.className,n&&(o.style.marginLeft=-n.x+"px",o.style.marginTop=-n.y+"px"),i&&(o.style.width=i.x+"px",o.style.height=i.y+"px")},createShadow:function(){var o=e.createElement("div");return this._setIconStyles(o,"shadow"),o}}),L.AwesomeMarkers.icon=function(o){return new L.AwesomeMarkers.Icon(o)}}(this,document); \ No newline at end of file +(function(window,document,undefined){"use strict";L.AwesomeMarkers={};L.AwesomeMarkers.version="2.0.1";L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",extraClasses:"",icon:"home",markerColor:"blue",iconColor:"white",iconRotate:0,font:"monospace"},initialize:function(options){options=L.Util.setOptions(this,options)},createIcon:function(){var div=document.createElement("div"),options=this.options;if(options.icon){div.innerHTML=this._createInner()}if(options.bgPos){div.style.backgroundPosition=-options.bgPos.x+"px "+-options.bgPos.y+"px"}this._setIconStyles(div,"icon-"+options.markerColor);return div},_createInner:function(){var iconClass,iconSpinClass="",iconColorClass="",iconColorStyle="",options=this.options;if(!options.prefix||options.icon.slice(0,options.prefix.length+1)===options.prefix+"-"){iconClass=options.icon}else{iconClass=options.prefix+"-"+options.icon}if(options.spin&&typeof options.spinClass==="string"){iconSpinClass=options.spinClass}if(options.iconColor){if((options.iconColor==="white"||options.iconColor==="black")&&options.prefix!=="fa"){iconColorClass="icon-"+options.iconColor}else if(options.prefix==="fa"&&options.iconColor==="white"){iconColorClass="fa-inverse"}else{iconColorStyle="color: "+options.iconColor+";"}}if(options.font&&options.text){iconColorStyle+="font-family: "+options.font+";"}if(options.iconRotate&&options.iconRotate!==0){iconColorStyle+="-webkit-transform: rotate("+options.iconRotate+"deg);";iconColorStyle+="-moz-transform: rotate("+options.iconRotate+"deg);";iconColorStyle+="-o-transform: rotate("+options.iconRotate+"deg);";iconColorStyle+="-ms-transform: rotate("+options.iconRotate+"deg);";iconColorStyle+="transform: rotate("+options.iconRotate+"deg);"}if(options.text){return""+options.text+""}return""},_setIconStyles:function(img,name){var options=this.options,size=L.point(options[name==="shadow"?"shadowSize":"iconSize"]),anchor;if(name==="shadow"){anchor=L.point(options.shadowAnchor||options.iconAnchor)}else{anchor=L.point(options.iconAnchor)}if(!anchor&&size){anchor=size.divideBy(2,true)}img.className="awesome-marker-"+name+" "+options.className;if(anchor){img.style.marginLeft=-anchor.x+"px";img.style.marginTop=-anchor.y+"px"}if(size){img.style.width=size.x+"px";img.style.height=size.y+"px"}},createShadow:function(){var div=document.createElement("div");this._setIconStyles(div,"shadow");return div}});L.AwesomeMarkers.icon=function(options){return new L.AwesomeMarkers.Icon(options)}})(this,document); diff --git a/examples/basic-example.html b/examples/basic-example.html index f031b61..26b82fa 100644 --- a/examples/basic-example.html +++ b/examples/basic-example.html @@ -6,26 +6,25 @@ - - - - + + +
- + diff --git a/examples/random-markers.html b/examples/random-markers.html index 11c5c06..73ddca6 100644 --- a/examples/random-markers.html +++ b/examples/random-markers.html @@ -6,29 +6,25 @@ - - - - - - - + + +
- + + + + +
- + + + +