trying to display my point

Discussion created by kirill_lykov on Apr 21, 2011
Latest reply on Apr 21, 2011 by kirill_lykov
I'm trying to display my point using the following code:

var extent = new esri.geometry.Extent(
 { "xmin":-97.0,"ymin":38.0,"xmax":-96.0,
map = new esri.Map("map", { extent: esri.geometry.geographicToWebMercator(extent)});

//... then in the call back function for map's onLoad event:
var symbol = new esri.symbol.SimpleMarkerSymbol(); = esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE;
symbol.setColor(new dojo.Color([255,255,0,0.5]));
var point = new esri.geometry.Point(x, y);
var graphic = new esri.Graphic(point, symbol);;

The problem is this code always displays point somewhere in in the Africa and it doesn't depend on the x, y values passed to the Point constructor. For instance, I tried 0.0,0.0 and -80.12468662, 40.42756484.
Where is the mistake? Perhaps, I need to convert point to be point in the display coordinates? How can I do this?