Installed leaflet in extlib
[mediagoblin.git] / extlib / leaflet / src / layer / vector / CircleMarker.js
diff --git a/extlib/leaflet/src/layer/vector/CircleMarker.js b/extlib/leaflet/src/layer/vector/CircleMarker.js
new file mode 100644 (file)
index 0000000..fa4bacf
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * L.CircleMarker is a circle overlay with a permanent pixel radius. \r
+ */\r
+\r
+L.CircleMarker = L.Circle.extend({\r
+       options: {\r
+               radius: 10,\r
+               weight: 2\r
+       },\r
+       \r
+       initialize: function(latlng, options) {\r
+               L.Circle.prototype.initialize.call(this, latlng, null, options);\r
+               this._radius = this.options.radius;\r
+       },\r
+       \r
+       projectLatlngs: function() {\r
+               this._point = this._map.latLngToLayerPoint(this._latlng);\r
+       },\r
+       \r
+       setRadius: function(radius) {\r
+               this._radius = radius;\r
+               this._redraw();\r
+               return this;\r
+       }       \r
+});
\ No newline at end of file