I'm using the polygon drawing code here to draw my own polygon retrieved using AJAX.

This is for a web application designed to run in the UK, so the points retrieved are eastings and northings.

However I don't understand how to get ESRI ArcGIS to display polygons using eastings and northing are points.

I've been looking through the documentation and examples, but I'm struggling to find anything that can help me.

My code is as follows:

Any help would be very much appreciated

Thanks

Peter Bridger

This is for a web application designed to run in the UK, so the points retrieved are eastings and northings.

However I don't understand how to get ESRI ArcGIS to display polygons using eastings and northing are points.

I've been looking through the documentation and examples, but I'm struggling to find anything that can help me.

My code is as follows:

var points = new Array(); var csv = result.Value.split(','); // CSV of eastings and northings for( var i = 0; i < csv.length; i+=2){ points[points.length] = new esri.geometry.Point(csv[i], csv[i+1]); } // Draw polygon var polygon = new esri.geometry.Polygon(); polygon.addRing(points); polygon.spatialReference = new esri.SpatialReference({ wkid: 27700 }); // British National Grid // Add the polygon to map var symbol = new esri.symbol.SimpleFillSymbol().setStyle(esri.symbol.SimpleFillSymbol.STYLE_SOLID); polygonGraphic = new esri.Graphic(polygon, symbol); map.graphics.add(polygonGraphic);

Any help would be very much appreciated

Thanks

Peter Bridger

Instead I've implemented a server-side solution that converts from

British National Grid (27700)to

WGS84 (4326)to

Web Mercator (102100)I've achieved this by using Proj.Net for the

British National Grid (27700) to WGS84 (4326)conversionThen for the

WGS84 (4326) to Web Mercator (102100)conversion I used the code in this articleHope this is of help for someone else

Peter