Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (10 sloc) 1.04 KB
This is a Javascript Google Maps extension that adds a circle overlay that can be added to a GMap2 object. It is a subclass of GPolygon that draws the vertices in a circle. It has an adjustable resolution for the number of vertices drawn by using the last parameter of the constructor. The more points provided in the numPoints parameter, the smoother the circle will look, but the lower the performance. Included is a sample HTML page that makes use of it to demonstrate usage.
CircleOverlay(center:Number, radius:Number, strokeColor:String, strokeWeight:Number, strokeOpacity:Number, fillColor:Number, fillOpacity:Number, numPoints?:Number)
Sample Usage:
var circle = new CircleOverlay(map.getCenter(), circleRadius, "#336699", 1, 1, '#336699', 0.25);
or specify the number of points in the polygon for smoother or coarser effect:
var circle = new CircleOverlay(map.getCenter(), circleRadius, "#0000FF", 1, 1, '#0000FF', 0.25, 40);
Jump to Line
Something went wrong with that request. Please try again.