dojo.require("esri.map"); function init(){ var map = new esri.Map("map",{ wrapAround180:true, extent: esri.geometry.geographicToWebMercator(new esri.geometry.Extent(19.5, 59, 31.7, 70.5 , new esri.SpatialReference(4326))) }); dojo.connect(window,'resize',map,map.resize); var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"); map.addLayer(tiledMapServiceLayer); dojo.connect(map, "onLoad", function() { var Point = new esri.geometry.Point(20, 60, new esri.SpatialReference(4326)); var testGraphic = new esri.Graphic( Point, new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255])), {"Point":"1"}, new esri.InfoTemplate() ); map.graphics.add(testGraphic); }); } dojo.addOnLoad(init);
Solved! Go to Solution.
var Point = esri.geometry.geographicToWebMercator(new esri.geometry.Point(20, 60, new esri.SpatialReference(4326)));
var Point = esri.geometry.geographicToWebMercator(new esri.geometry.Point(20, 60, new esri.SpatialReference(4326)));
esri.geometry.geographicToWebMercator(new esri.geometry.Point(east, north, new esri.SpatialReference(2392)))