Hi,
I am using the code to read a database to get some points xy coordinates and using the following code to put these points to the map. Stpointcoord is xy coordinates array. I used vb.net to get the coordinate from the database and transfer these coordinate string to javascript.
var srLatLon = new SpatialReference({ wkid: 4326 });
for (var i = 0; i < stpointcoord.length; i = i + 2) {
var x = stpointcoord;
var y = stpointcoord[i + 1];
stpoint = new Point(x, y, srLatLon);
arrayUtils.forEach([stpoint], function (result) {
//add point to the map
graphic = new Graphic(result, createSymbol(initColor, "6"));
map.graphics.add(graphic);
};
The map is attached. Now I would like users to move the cursor over a point and then the point information is shown by infowindow. But the problem is that the xy coordinates I am using evt.mapPoint to get are not accurate and there is at most 500000 difference. For example, St.Paul???s xy coordinate in the database is 2617213,7485938, but I get the coordinate which is 3070882, 7012354 when I move my cursor over the point. So the information window shows wrong information. Could you tell me why the coordinates have big difference and how I can fix it. Thanks.
Saili