aboutsummaryrefslogtreecommitdiffstats
path: root/extlib/leaflet/src/layer/vector/CircleMarker.js
blob: fa4bacf0186f067df210c648fb38c6b1ddab32ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * L.CircleMarker is a circle overlay with a permanent pixel radius. 
 */

L.CircleMarker = L.Circle.extend({
	options: {
		radius: 10,
		weight: 2
	},
	
	initialize: function(latlng, options) {
		L.Circle.prototype.initialize.call(this, latlng, null, options);
		this._radius = this.options.radius;
	},
	
	projectLatlngs: function() {
		this._point = this._map.latLngToLayerPoint(this._latlng);
	},
	
	setRadius: function(radius) {
		this._radius = radius;
		this._redraw();
		return this;
	}	
});