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, 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);
Solved! Go to Solution.
Conversion of British National Grid (WKID:27700) to WGS84(WKID:4326) and then to Web Mercator (WKID:102100)
I decided to write this article as in my work (local authority) the 90% of the spatial data is created using British National Grid coordinate system.
Working with ArcGIS server there was never problem to display the data properly on the top of OS Mastermap or rasters, however few weeks ago I decided to do some mash up using the ArcGIS Java Script API and the basemap dijit and the problems jumped out.
I had to use the British National Grid data over the basemap having the WebMercator projection or a basemap coming from the basemap gallery