binoruv

A bug of GeometryService.project?

Discussion created by binoruv on Sep 25, 2010
Latest reply on Sep 28, 2010 by khutchins-esristaff
hi

i am now using ags js api 2.1, the basemap's wkid is 102100, i need to transform the wkid to 4326 to display longitude and latitude.

i use this service: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer

    dojo.connect(map, "onMouseMove", function(evt) {
        var gsvc = new esri.tasks.GeometryService('http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');
        var pt;
        gsvc.project([evt.mapPoint], { "wkid": 4326 }, function(projectedPoints) {
            debugger;
            pt = projectedPoints[0];
        });
        coordinateBar.setText('ç»�度ï¼?' + pt.x + "ï¼?纬度ï¼?" + pt.y);
    });


when i call the gsvc.project method, it goes to
esri.request({url:this._url.path+"/project",content:_74e,callbackParamName:"callback",load:(function(r,i){_750(r,i,_74f,_74a,_74b,_74c)}


i monitor the variable "content:_74e", it is like the following

f "json"
geometries {"geometryType":"esriGeometryPoint","geometries":[{"x":-13299349.801652893,"y":4242526.207236842,"spatialReference":{"wkid":102100}}]}
inSR 102100
outSR 4326

according to the project service's parameters, the red part of "content:_74e" caused the problem

the following is the right parameters of project service

http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/project.html
Example:
{
"geometryType" : "esriGeometryPoint",
"geometries" : [
{"x" : -104.53, "y" : 34.74},
{"x" : -63.53, "y" : 10.23}
]
}

has anybody encountered the problem?
thanks!

Outcomes