<?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: My Graphics objects get plotted on very strange places in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523040#M48764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One more question on this theme:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If my data points are in the Finnish KKJ2 projection (i.e. Finland_Zone_2), wkid 2392. How would I go about creating the data point and converting it to webmercator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried with the code &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;esri.geometry.geographicToWebMercator(new esri.geometry.Point(east, north, new esri.SpatialReference(2392)))&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;but it seems like it will always assume that the spatial reference is WSG84 (or whatever the default is). It does not matter what wkid i put in my code, my points end up on the exact same location on the map regardless of the wkid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where should I start looking for a solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2012 08:58:12 GMT</pubDate>
    <dc:creator>ChristianLindholm</dc:creator>
    <dc:date>2012-08-22T08:58:12Z</dc:date>
    <item>
      <title>My Graphics objects get plotted on very strange places</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523036#M48760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: clindholm&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a simple code that should add one graphic point to a basic world street map. I cannot find out why my graphic point gets plotted at very strange coordinates. What is wrong in my code below when the testGraphic object gets plotted at the equator and not inside Finland.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The map extent gets correctly set (see attachment 1), but as can bee seen in the second attachment the point gets plotted near coordinates 0N 0E. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.require("esri.map");&amp;nbsp; function init(){ &amp;nbsp;&amp;nbsp;&amp;nbsp; var map = new esri.Map("map",{ &amp;nbsp; wrapAround180:true, &amp;nbsp; extent: esri.geometry.geographicToWebMercator(new esri.geometry.Extent(19.5, 59, 31.7, 70.5 , new esri.SpatialReference(4326)))&amp;nbsp; });&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(window,'resize',map,map.resize);&amp;nbsp;&amp;nbsp;&amp;nbsp; var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");&amp;nbsp; map.addLayer(tiledMapServiceLayer);&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map, "onLoad", function() {&amp;nbsp;&amp;nbsp; &amp;nbsp; var Point = new esri.geometry.Point(20, 60, new esri.SpatialReference(4326));&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; var testGraphic = &amp;nbsp;&amp;nbsp; new esri.Graphic( &amp;nbsp;&amp;nbsp;&amp;nbsp; Point, &amp;nbsp;&amp;nbsp;&amp;nbsp; new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255])), &amp;nbsp;&amp;nbsp;&amp;nbsp; {"Point":"1"}, &amp;nbsp;&amp;nbsp;&amp;nbsp; new esri.InfoTemplate() &amp;nbsp;&amp;nbsp; ); &amp;nbsp; map.graphics.add(testGraphic);&amp;nbsp; });&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; dojo.addOnLoad(init);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 19:10:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523036#M48760</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-08-07T19:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: My Graphics objects get plotted on very strange places</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523037#M48761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Kelly&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The graphic is added in the incorrect location because the input point is in gcs&amp;nbsp; and the basemap is Web Mercator. You can resolve this by converting the point to web mercator before adding it to the map using esri.geometry.geographicToWebMercator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; var Point = esri.geometry.geographicToWebMercator(new esri.geometry.Point(20, 60, new esri.SpatialReference(4326))); &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 20:36:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523037#M48761</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-08-07T20:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: My Graphics objects get plotted on very strange places</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523038#M48762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;in your code, when you pass your latitude and longitude values to set the extent of the map you are taking advantage of the utility method "geographicToWebMercator" to reproject the coordinates to web mercator values (to match the coordinate system of the map.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;geometry objects can't reproject on the fly either, so if you want your graphics to draw in the right location they also have to be created with a coordinate system that matches the projection of your map or explicitly reprojected.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 20:41:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523038#M48762</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2012-08-07T20:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: My Graphics objects get plotted on very strange places</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523039#M48763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: clindholm&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks guys, I got it working now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 08:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523039#M48763</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-08-22T08:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: My Graphics objects get plotted on very strange places</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523040#M48764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One more question on this theme:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If my data points are in the Finnish KKJ2 projection (i.e. Finland_Zone_2), wkid 2392. How would I go about creating the data point and converting it to webmercator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried with the code &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;esri.geometry.geographicToWebMercator(new esri.geometry.Point(east, north, new esri.SpatialReference(2392)))&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;but it seems like it will always assume that the spatial reference is WSG84 (or whatever the default is). It does not matter what wkid i put in my code, my points end up on the exact same location on the map regardless of the wkid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where should I start looking for a solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 08:58:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/my-graphics-objects-get-plotted-on-very-strange/m-p/523040#M48764</guid>
      <dc:creator>ChristianLindholm</dc:creator>
      <dc:date>2012-08-22T08:58:12Z</dc:date>
    </item>
  </channel>
</rss>

