<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Drawing a polygon using Easting and Northings in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638147#M59614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Derek&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used Google Maps in the past on many projects, but we're planning to use ESRI's web service due to the scale of what we're planning to deliver with this project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm afraid I'm struggling to get to grips with the ESRI web client, I'm used to dealing with simple Google Map implementations using just lat/longs. The move to a more complex system which benefits from more in depth knowledge of projections, spatial references and a whole new library is causing me grief.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are storing our spatial data in SQL Server 2008. We need to plot new points, polylines and polygon through the ESRI web client and then store in the SQL Server backend. We also need the ESRI web client to display the points, polylines and polygons returned by the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are using a spatial reference of OSGB 1936 (British National Grid).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you could point me to examples that would get me on the right path I would appreciate it. Currently I'm building a Frankenstein's Monster of an web client attempting to get a feel for the concepts and library knowledge I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any guidance or examples you could give would be very much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Feb 2012 09:37:33 GMT</pubDate>
    <dc:creator>PeterBridger</dc:creator>
    <dc:date>2012-02-16T09:37:33Z</dc:date>
    <item>
      <title>Drawing a polygon using Easting and Northings</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638145#M59612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using the polygon drawing code &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/util_simplify.html" rel="nofollow" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt; to draw my own polygon retrieved using AJAX.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is for a web application designed to run in the UK, so the points retrieved are eastings and northings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However I don't understand how to get ESRI ArcGIS to display polygons using eastings and northing are points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been looking through the documentation and examples, but I'm struggling to find anything that can help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var points = new Array(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var csv = result.Value.split(','); // CSV of eastings and northings &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for( var i = 0; i &amp;lt; csv.length; i+=2){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; points[points.length] = new esri.geometry.Point(csv&lt;I&gt;, csv[i+1]); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Draw polygon &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polygon = new esri.geometry.Polygon(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon.addRing(points); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon.spatialReference = new esri.SpatialReference({ wkid: 27700 }); // British National Grid&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add the polygon to map &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleFillSymbol().setStyle(esri.symbol.SimpleFillSymbol.STYLE_SOLID); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonGraphic = new esri.Graphic(polygon, symbol); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(polygonGraphic);&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be very much appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter Bridger&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 13:06:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638145#M59612</guid>
      <dc:creator>PeterBridger</dc:creator>
      <dc:date>2012-02-15T13:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing a polygon using Easting and Northings</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638146#M59613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What's the spatial reference of your map? If it's anything other than British National Grid, you'll need to project your polygon to your map's spatial reference before you can add it to the map:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html&lt;/A&gt;&lt;SPAN&gt; That sample projects a point but the same workflow applies to other geometry types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, you linked to a 1.6 version of the help. The most current version of the help (and API) is 2.7). We recommend you use that. Here's the same sample, but using 2.7:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_simplify.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_simplify.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 15:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638146#M59613</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-02-15T15:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing a polygon using Easting and Northings</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638147#M59614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Derek&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used Google Maps in the past on many projects, but we're planning to use ESRI's web service due to the scale of what we're planning to deliver with this project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm afraid I'm struggling to get to grips with the ESRI web client, I'm used to dealing with simple Google Map implementations using just lat/longs. The move to a more complex system which benefits from more in depth knowledge of projections, spatial references and a whole new library is causing me grief.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are storing our spatial data in SQL Server 2008. We need to plot new points, polylines and polygon through the ESRI web client and then store in the SQL Server backend. We also need the ESRI web client to display the points, polylines and polygons returned by the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are using a spatial reference of OSGB 1936 (British National Grid).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you could point me to examples that would get me on the right path I would appreciate it. Currently I'm building a Frankenstein's Monster of an web client attempting to get a feel for the concepts and library knowledge I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any guidance or examples you could give would be very much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 09:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638147#M59614</guid>
      <dc:creator>PeterBridger</dc:creator>
      <dc:date>2012-02-16T09:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing a polygon using Easting and Northings</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638148#M59615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For reference with my problem and in case it helps anyone else, &lt;/SPAN&gt;&lt;A href="http://osedok.wordpress.com/tag/web-mercator/"&gt;I've found the following article&lt;/A&gt;&lt;SPAN&gt; which is discussing the type of issue I'm having. I'll post back if this allows me to sort out my issues.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Conversion of British National Grid (WKID:27700) to WGS84(WKID:4326) and then to Web Mercator (WKID:102100)&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;I had to use the British National Grid data over the basemap having the WebMercator projection or a basemap coming from the basemap gallery&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 12:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638148#M59615</guid>
      <dc:creator>PeterBridger</dc:creator>
      <dc:date>2012-02-16T12:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing a polygon using Easting and Northings</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638149#M59616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wasn't able to change projections using ESRI's JavaScript methods (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html&lt;/A&gt;&lt;SPAN&gt;), due to it requiring a proxy and unresolved issues when I attempted to setup this up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead I've implemented a server-side solution that converts from&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;British National Grid (27700)&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;WGS84 (4326)&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Web Mercator (102100)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've achieved this by using &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://projnet.codeplex.com/" rel="nofollow" target="_blank"&gt;Proj.Net&lt;/A&gt;&lt;SPAN&gt; for the &lt;/SPAN&gt;&lt;STRONG&gt;British National Grid (27700) to WGS84 (4326)&lt;/STRONG&gt;&lt;SPAN&gt; conversion&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then for the &lt;/SPAN&gt;&lt;STRONG&gt;WGS84 (4326) to Web Mercator (102100)&lt;/STRONG&gt;&lt;SPAN&gt; conversion I used the code in &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.gal-systems.com/2011/07/convert-coordinates-between-web.html" rel="nofollow" target="_blank"&gt;this article&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this is of help for someone else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 14:01:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drawing-a-polygon-using-easting-and-northings/m-p/638149#M59616</guid>
      <dc:creator>PeterBridger</dc:creator>
      <dc:date>2012-02-16T14:01:28Z</dc:date>
    </item>
  </channel>
</rss>

