Thanks for the reply .. well i'll still a newbie in arcgis api so i might need a little more help .. my map wkid is 4326 102100
You map is either 4326 or 102100 those are two different SpatialReferences. 4326 is WGS84 which uses Lat and Long. So if your coordinates are Latitude and Longitude then the SpatialRefernce for those points is 4326. Your map may be in 102100 (Web Mercator), if you are using ArcGIS On-Line or Bing for a basemap this is the SpatialReference of the Map.When you set the SpatialReference or the point it needs to be the based on the coordinates of the point not of the Map. Also you have the coordinates flipped, X=Longitude, Y=Latitude like I mentioned in the previous post, which is probably the issue because it seems like you are projecting. You may want to explicitly set the SpatialReference of the point before you convert
// lat,lng values
var mp:MapPoint = new MapPoint(lat,lng);
mp.SpatialReference = new SpatialReference(4326) //Set explicitly
var mp2:MapPoint = (WebMercatorUtil.geographicToWebMercator(mp) as MapPoint);
//I don't think this next line is necessary, if you look in the debugger I think you will see SpatialReference is already set - but not 100% sure
mp2.spatialReference = new SpatialReference(102100);
Hope that helps
Thanks,
-Joe