<?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 ClusterLayer not showing on correct position in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clusterlayer-not-showing-on-correct-position/m-p/24175#M2098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;I am following the this library:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/samples/layers_point_clustering/" title="https://developers.arcgis.com/javascript/3/samples/layers_point_clustering/"&gt;Cluster&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can display my points and display cluster but they always end up displaying at incorrect position.&lt;/P&gt;&lt;P&gt;One of the cluster is always on top left which the single points are placed on correct position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what is causing this error, i changed to correct SpatialReference as my Map, which is "26918".&lt;/P&gt;&lt;P&gt;My point is also in UTM coordinates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function DrawProjectGeometry(jsBird)&lt;BR /&gt;{&lt;BR /&gt; &lt;BR /&gt; var attributes = {"graphicid": jsBird['entry_id'], "species_en" : jsBird['species_en']};&lt;BR /&gt; &lt;BR /&gt; var newpoint = new esri.geometry.Point(jsBird['utm_x'],jsBird['utm_y'],map.spatialReference);&lt;BR /&gt; var webMercator = webMercatorUtils.geographicToWebMercator(newpoint);&lt;BR /&gt; var webMercator2 = webMercatorUtils.lngLatToXY(jsBird['latitude_y_dd'],jsBird['latitude_x_dd']);&lt;/P&gt;&lt;P&gt;var dd = {"x": newpoint.x,"y": newpoint.y,"attributes": attributes};&lt;BR /&gt; &lt;BR /&gt; birdInfo.data.push(dd);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function updateLayout()&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;// popupTemplate to work with attributes specific to this dataset&lt;BR /&gt; var popupTemplate = new PopupTemplate({&lt;BR /&gt; "title": "",&lt;BR /&gt; "fieldInfos": [{&lt;BR /&gt; "fieldName": "graphicid",&lt;BR /&gt; visible: true&lt;BR /&gt; }, {&lt;BR /&gt; "fieldName": "species_en",&lt;BR /&gt; "label": "On Instagram",&lt;BR /&gt; visible: true&lt;BR /&gt; }]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;clusterLayer = new ClusterLayer({&lt;BR /&gt; "data": birdInfo.data,&lt;BR /&gt; "distance": 50,&lt;BR /&gt; "id": "clusters",&lt;BR /&gt; "labelColor": "#fff",&lt;BR /&gt; "labelOffset": 0,&lt;BR /&gt; "resolution": map.extent.getWidth() / map.width,&lt;BR /&gt; "singleColor": "#888",&lt;BR /&gt; "singleTemplate": popupTemplate,&lt;BR /&gt; "spatialReference": map.spatialReference,&lt;BR /&gt; "showSingles": false&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var defaultSym = new SimpleMarkerSymbol().setSize(8);&lt;BR /&gt; &lt;BR /&gt; var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount");&lt;BR /&gt;&lt;SPAN&gt; var picBaseUrl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fstatic.arcgis.com%2Fimages%2FSymbols%2FShapes%2F" rel="nofollow" target="_blank"&gt;https://static.arcgis.com/images/Symbols/Shapes/&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt; var blue = new PictureMarkerSymbol(picBaseUrl + "BluePin1LargeB.png", 32, 32).setOffset(0, 15);&lt;BR /&gt; var green = new PictureMarkerSymbol(picBaseUrl + "GreenPin1LargeB.png", 64, 64).setOffset(0, 15);&lt;BR /&gt; var red = new PictureMarkerSymbol(picBaseUrl + "RedPin1LargeB.png", 72, 72).setOffset(0, 15);&lt;BR /&gt; renderer.addBreak(0, 1, blue);&lt;BR /&gt; renderer.addBreak(2, 200, green);&lt;BR /&gt; renderer.addBreak(200, 1001, red);&lt;/P&gt;&lt;P&gt;clusterLayer.setRenderer(renderer);&lt;BR /&gt; map.addLayer(clusterLayer);&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Aug 2017 19:06:46 GMT</pubDate>
    <dc:creator>MuhammadUmer1</dc:creator>
    <dc:date>2017-08-21T19:06:46Z</dc:date>
    <item>
      <title>ClusterLayer not showing on correct position</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clusterlayer-not-showing-on-correct-position/m-p/24175#M2098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;I am following the this library:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/samples/layers_point_clustering/" title="https://developers.arcgis.com/javascript/3/samples/layers_point_clustering/"&gt;Cluster&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can display my points and display cluster but they always end up displaying at incorrect position.&lt;/P&gt;&lt;P&gt;One of the cluster is always on top left which the single points are placed on correct position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what is causing this error, i changed to correct SpatialReference as my Map, which is "26918".&lt;/P&gt;&lt;P&gt;My point is also in UTM coordinates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function DrawProjectGeometry(jsBird)&lt;BR /&gt;{&lt;BR /&gt; &lt;BR /&gt; var attributes = {"graphicid": jsBird['entry_id'], "species_en" : jsBird['species_en']};&lt;BR /&gt; &lt;BR /&gt; var newpoint = new esri.geometry.Point(jsBird['utm_x'],jsBird['utm_y'],map.spatialReference);&lt;BR /&gt; var webMercator = webMercatorUtils.geographicToWebMercator(newpoint);&lt;BR /&gt; var webMercator2 = webMercatorUtils.lngLatToXY(jsBird['latitude_y_dd'],jsBird['latitude_x_dd']);&lt;/P&gt;&lt;P&gt;var dd = {"x": newpoint.x,"y": newpoint.y,"attributes": attributes};&lt;BR /&gt; &lt;BR /&gt; birdInfo.data.push(dd);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function updateLayout()&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;// popupTemplate to work with attributes specific to this dataset&lt;BR /&gt; var popupTemplate = new PopupTemplate({&lt;BR /&gt; "title": "",&lt;BR /&gt; "fieldInfos": [{&lt;BR /&gt; "fieldName": "graphicid",&lt;BR /&gt; visible: true&lt;BR /&gt; }, {&lt;BR /&gt; "fieldName": "species_en",&lt;BR /&gt; "label": "On Instagram",&lt;BR /&gt; visible: true&lt;BR /&gt; }]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;clusterLayer = new ClusterLayer({&lt;BR /&gt; "data": birdInfo.data,&lt;BR /&gt; "distance": 50,&lt;BR /&gt; "id": "clusters",&lt;BR /&gt; "labelColor": "#fff",&lt;BR /&gt; "labelOffset": 0,&lt;BR /&gt; "resolution": map.extent.getWidth() / map.width,&lt;BR /&gt; "singleColor": "#888",&lt;BR /&gt; "singleTemplate": popupTemplate,&lt;BR /&gt; "spatialReference": map.spatialReference,&lt;BR /&gt; "showSingles": false&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var defaultSym = new SimpleMarkerSymbol().setSize(8);&lt;BR /&gt; &lt;BR /&gt; var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount");&lt;BR /&gt;&lt;SPAN&gt; var picBaseUrl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fstatic.arcgis.com%2Fimages%2FSymbols%2FShapes%2F" rel="nofollow" target="_blank"&gt;https://static.arcgis.com/images/Symbols/Shapes/&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt; var blue = new PictureMarkerSymbol(picBaseUrl + "BluePin1LargeB.png", 32, 32).setOffset(0, 15);&lt;BR /&gt; var green = new PictureMarkerSymbol(picBaseUrl + "GreenPin1LargeB.png", 64, 64).setOffset(0, 15);&lt;BR /&gt; var red = new PictureMarkerSymbol(picBaseUrl + "RedPin1LargeB.png", 72, 72).setOffset(0, 15);&lt;BR /&gt; renderer.addBreak(0, 1, blue);&lt;BR /&gt; renderer.addBreak(2, 200, green);&lt;BR /&gt; renderer.addBreak(200, 1001, red);&lt;/P&gt;&lt;P&gt;clusterLayer.setRenderer(renderer);&lt;BR /&gt; map.addLayer(clusterLayer);&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:06:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clusterlayer-not-showing-on-correct-position/m-p/24175#M2098</guid>
      <dc:creator>MuhammadUmer1</dc:creator>
      <dc:date>2017-08-21T19:06:46Z</dc:date>
    </item>
  </channel>
</rss>

