function jsmCreateCircle(center, radiusM)
{
    var rLat = geoRadians(center.lat);  // radians
    var rLon = geoRadians(center.lon);  // radians
    var d    = radiusM / EARTH_RADIUS_METERS;
    var circlePoints = new Array();
    for (x = 0; x <= 360; x += 5) {         // 5 degrees (saves memory, & it still looks like a circle)
        var xrad = geoRadians(x);           // radians
        var tLat = Math.asin(Math.sin(rLat) * Math.cos(d) + Math.cos(rLat) * Math.sin(d) * Math.cos(xrad));
        var tLon = rLon + Math.atan2(Math.sin(xrad) * Math.sin(d) * Math.cos(rLat), Math.cos(d)-Math.sin(rLat) * Math.sin(tLat));
        circlePoints.push(new JSMapPoint(geoDegrees(tLat),geoDegrees(tLon)));
    }
    return circlePoints; // (JSMapPoint[])
}
/**
*** Returns an array of JSMapPoints representing a circle polygon
*** @param center  The circle center (JSMapPoint)
*** @param radiusM The circle radius, in meters
*** @return An array of JSMapPoints
**/
Returns an array of JSMapPoints representing a circle polygon
Returns an array of JSMapPoints representing a circle polygon
function jsmCreateCircle(center, radiusM)
{
    var rLat = geoRadians(center.lat);  
    var rLon = geoRadians(center.lon);  
    var d    = radiusM / EARTH_RADIUS_METERS;
    var circlePoints = new Array();
    for (x = 0; x <= 360; x += 5) {         
        var xrad = geoRadians(x);           
        var tLat = Math.asin(Math.sin(rLat) * Math.cos(d) + Math.cos(rLat) * Math.sin(d) * Math.cos(xrad));
        var tLon = rLon + Math.atan2(Math.sin(xrad) * Math.sin(d) * Math.cos(rLat), Math.cos(d)-Math.sin(rLat) * Math.sin(tLat));
        circlePoints.push(new JSMapPoint(geoDegrees(tLat),geoDegrees(tLon)));
    }
    return circlePoints; 
}
function jsmCreateCircle ( center , radiusM ) { var rLat = geoRadians ( center . lat ) ; var rLon = geoRadians ( center . lon ) ; var d = radiusM / EARTH_RADIUS_METERS ; var circlePoints = new Array ( ) ; for ( x = 0 ; x <= 360 ; x += 5 ) { var xrad = geoRadians ( x ) ; var tLat = Math . asin ( Math . sin ( rLat ) * Math . cos ( d ) + Math . cos ( rLat ) * Math . sin ( d ) * Math . cos ( xrad ) ) ; var tLon = rLon + Math . atan2 ( Math . sin ( xrad ) * Math . sin ( d ) * Math . cos ( rLat ) , Math . cos ( d ) - Math . sin ( rLat ) * Math . sin ( tLat ) ) ; circlePoints . push ( new JSMapPoint ( geoDegrees ( tLat ) , geoDegrees ( tLon ) ) ) ; } return circlePoints ; }
Returns an array of JSMapPoints representing a circle polygon
Returns an array of JSMapPoints representing a circle polygon
// radians // radians // 5 degrees (saves memory, & it still looks like a circle) // radians // (JSMapPoint[])