Subversion Repositories eFlore/Applications.moissonnage

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 delphine 1
L.Icon.Canvas = L.Icon.extend({
2
	options: {
3
		iconSize: new L.Point(20, 20), // Have to be supplied
4
		/*
5
		iconAnchor: (Point)
6
		popupAnchor: (Point)
7
		*/
8
		className: 'leaflet-canvas-icon'
9
	},
10
 
11
	createIcon: function () {
12
		var e = document.createElement('canvas');
13
		this._setIconStyles(e, 'icon');
14
		var s = this.options.iconSize;
15
		e.width = s.x
16
		e.height = s.y;
17
		this.draw(e.getContext('2d'), s.x, s.y);
18
		return e;
19
	},
20
 
21
	createShadow: function () {
22
		return null;
23
	},
24
 
25
	draw: function(canvas, width, height) {
26
	}
27
});