Solved! Go to Solution.
var strPoints; // add code to populate strPoints here. require([ "esri/map", "esri/geometry/Extent", "esri/geometry/Point", "esri/symbols/SimpleMarkerSymbol", "esri/graphic", "esri/tasks/GeometryService", "dojo/_base/array", "dojo/_base/lang", "dojo/_base/Color", "esri/layers/ArcGISDynamicMapServiceLayer", "dojo/domReady!" ], function (Map, Extent, Point, SimpleMarkerSymbol, Graphic, GeometryService, arrayUtiles, lang, Color, ArcGISDynamicMapServiceLayer) { var initialExtent = new Extent({ "xmin": 2306896.79, "ymin": 7278537, "xmax": 2710915.5, "ymax": 7674860.5, "spatialReference": { "wkid": 2953 } }); //102100, 2953 var map = new Map("NBmap", { extent: initialExtent }); var basemaplayer = new ArcGISDynamicMapServiceLayer("http://swv25orat01.gnb.ca:6080/arcgis/rest/services/WFRS/WFRS_FireSummarymxd/MapServer"); map.addLayer(basemaplayer); map.on("load", function() { map.disablePan(); map.disableScrollWheelZoom(); map.hideZoomSlider(); var geometryService = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); var arrycoord = strPoints.split(","); var x, y, point; var symbol = new SimpleMarkerSymbol( SimpleMarkerSymbol.STYLE_CIRCLE, 16, null, new Color("#ce641d") ); for (i = 0; i < arrycoord.length; i = i + 2) { x = arrycoord; y = arrycoord[i + 1]; point = new Point(x, y); geometryService.project(point, map.spatialReference, function (newpoint) { var graphic = new Graphic(newpoint, symbol); map.graphics.add(graphic); }); }; }); });