GeometryService - Factor issue while plotting a circle on map with a distance

Discussion created by venkatap on Jan 30, 2012
Latest reply on Feb 7, 2012 by venkatap
I am trying to plot a map in Esri Maps using the ArcGIS JavaScript API. I am using Geometry Service to plot a circle on the map. For example if I plot a circle with a radius of 1 mile. When I measure a 1 mile distance in  Google maps I am just short with the radius by a factor of 1.3. Did anyone observe this pattern or am I doing any mistake? Please refer to the code I used from the sample

Here is the code

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
    <!--The viewport meta tag is used to improve the presentation and behavior of the samples
      on iOS devices-->
   <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
  <link rel="stylesheet" type="text/css" href="">
  <script src="" type="text/javascript"></script>

  <script type="text/javascript">

    var map = null;
    var gsvc = null;

    function initialize() {
      map = new esri.Map("map");
      var layer = new esri.layers.ArcGISTiledMapServiceLayer("");
      map.setExtent(esri.geometry.geographicToWebMercator(new esri.geometry.Extent(-77.550, 38.600, -77.020, 39.070, new esri.SpatialReference({wkid: 4326}))));

      gsvc = new esri.tasks.GeometryService("");
      dojo.connect(map, "onClick", doBuffer);

    function doBuffer(evt) {;
      var params = new esri.tasks.BufferParameters();
      params.geometries = [ evt.mapPoint ];

      //buffer in linear units such as meters, km, miles etc.
  params.distances = [ 1 ];
      params.unit = esri.tasks.GeometryService.UNIT_STATUTE_MILE;
      params.outSpatialReference = map.spatialReference;

      gsvc.buffer(params, showBuffer);

    function showBuffer(geometries) {

      var symbol = new esri.symbol.SimpleFillSymbol(
        new esri.symbol.SimpleLineSymbol(
          new dojo.Color([0,0,255,0.65]), 2
        new dojo.Color([0,0,255,0.15])

      dojo.forEach(geometries, function(geometry) {
        var graphic = new esri.Graphic(geometry,symbol);;



<body class="claro">
  <b>Click a location on the map to buffer. Click again on another location to buffer again.</b>
  <div id="map" style="width:800px; height:600px; border:1px solid #000;"></div>