<?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: Points won't show up in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/points-won-t-show-up/m-p/1132537#M6135</link>
    <description>&lt;P&gt;Another Developer on my team and I solved it. Here's our code so that it can help someone in the future. It relies on the url passing the point information:&lt;/P&gt;&lt;P&gt;define([&lt;BR /&gt;'dojo/_base/declare',&lt;BR /&gt;'dojo/_base/html',&lt;BR /&gt;'dijit/_WidgetsInTemplateMixin',&lt;BR /&gt;"esri/geometry/Point",&lt;BR /&gt;'esri/SpatialReference',&lt;BR /&gt;'jimu/BaseWidget',&lt;BR /&gt;'jimu/utils',&lt;BR /&gt;'jimu/dijit/Message',&lt;BR /&gt;'dojo/_base/lang',&lt;BR /&gt;'dojo/on',&lt;BR /&gt;"dojo/dom-class",&lt;BR /&gt;"esri/graphic",&lt;BR /&gt;"esri/layers/GraphicsLayer",&lt;BR /&gt;"esri/tasks/ProjectParameters",&lt;BR /&gt;"esri/geometry/webMercatorUtils",&lt;BR /&gt;"jimu/portalUtils",&lt;BR /&gt;"esri/config",&lt;BR /&gt;"libs/usng/usng",&lt;BR /&gt;"jimu/SpatialReference/unitUtils",&lt;BR /&gt;"esri/map",&lt;BR /&gt;"esri/symbols/PictureMarkerSymbol",&lt;BR /&gt;"esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt;"esri/Color",&lt;BR /&gt;"esri/InfoTemplate"&lt;BR /&gt;],&lt;BR /&gt;function(&lt;BR /&gt;declare,&lt;BR /&gt;html,&lt;BR /&gt;_WidgetsInTemplateMixin,&lt;BR /&gt;Point,&lt;BR /&gt;SpatialReference,&lt;BR /&gt;BaseWidget,&lt;BR /&gt;utils,&lt;BR /&gt;Message,&lt;BR /&gt;lang,&lt;BR /&gt;on,&lt;BR /&gt;domClass,&lt;BR /&gt;Graphic,&lt;BR /&gt;GraphicsLayer,&lt;BR /&gt;ProjectParameters,&lt;BR /&gt;webMercatorUtils,&lt;BR /&gt;portalUtils,&lt;BR /&gt;esriConfig,&lt;BR /&gt;usng,&lt;BR /&gt;unitUtils,&lt;BR /&gt;Map,&lt;BR /&gt;PictureMarkerSymbol,&lt;BR /&gt;SimpleMarkerSymbol,&lt;BR /&gt;Color,&lt;BR /&gt;InfoTemplate&lt;BR /&gt;){&lt;BR /&gt;var clazz = declare([BaseWidget], {&lt;BR /&gt;&lt;BR /&gt;startup: function() {&lt;BR /&gt;const urlString = window.location.href;&lt;BR /&gt;const pointParse = urlString.split('?')[1];&lt;BR /&gt;const pointParse2 = pointParse.split('&amp;amp;');&lt;BR /&gt;var locations = [];&lt;BR /&gt;for(i=0; i&amp;lt;pointParse2.length; i++)&lt;BR /&gt;{&lt;BR /&gt;const point = pointParse2[i].replace('points=', '');&lt;BR /&gt;console.log(point);&lt;BR /&gt;locations.push(point);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if(locations != null) {&lt;BR /&gt;var myMap = this.map;&lt;BR /&gt;var sms = new SimpleMarkerSymbol().setStyle(SimpleMarkerSymbol.STYLE_CIRCLE).setColor(new Color([255,0,0,0.5])).setSize(12);&lt;BR /&gt;&lt;BR /&gt;for(i=0; i&amp;lt;locations.length; i++){&lt;BR /&gt;console.log("adding points");&lt;BR /&gt;var p = new Point(parseFloat(locations[i].split(",")[0]),parseFloat(locations[i].split(",")[1]), new SpatialReference({ wkid: 4326}));&lt;BR /&gt;var g = new Graphic(p, sms);&lt;BR /&gt;myMap.graphics.add(g);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;})&lt;BR /&gt;&lt;BR /&gt;return clazz;&lt;BR /&gt;});&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jan 2022 18:01:36 GMT</pubDate>
    <dc:creator>Epiper40</dc:creator>
    <dc:date>2022-01-11T18:01:36Z</dc:date>
    <item>
      <title>Points won't show up</title>
      <link>https://community.esri.com/t5/developers-questions/points-won-t-show-up/m-p/1131423#M6127</link>
      <description>&lt;P&gt;I'm developing a custom widget based upon another users code that I saw on here. My problem is that the code runs and then no points show up. What am I doing wrong?&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;define([&lt;BR /&gt;'dojo/_base/declare',&lt;BR /&gt;'dojo/_base/html',&lt;BR /&gt;'dijit/_WidgetsInTemplateMixin',&lt;BR /&gt;"esri/geometry/Point",&lt;BR /&gt;'esri/SpatialReference',&lt;BR /&gt;'jimu/BaseWidget',&lt;BR /&gt;'jimu/utils',&lt;BR /&gt;'jimu/dijit/Message',&lt;BR /&gt;'dojo/_base/lang',&lt;BR /&gt;'dojo/on',&lt;BR /&gt;"dojo/dom-class",&lt;BR /&gt;"esri/graphic",&lt;BR /&gt;"esri/layers/GraphicsLayer",&lt;BR /&gt;"esri/tasks/ProjectParameters",&lt;BR /&gt;"esri/geometry/webMercatorUtils",&lt;BR /&gt;"jimu/portalUtils",&lt;BR /&gt;"esri/config",&lt;BR /&gt;"libs/usng/usng",&lt;BR /&gt;"jimu/SpatialReference/unitUtils",&lt;BR /&gt;"esri/map",&lt;BR /&gt;//"esri/views/Mapview",&lt;BR /&gt;"esri/symbols/PictureMarkerSymbol",&lt;BR /&gt;"esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt;"esri/InfoTemplate"&lt;BR /&gt;],&lt;BR /&gt;function(&lt;BR /&gt;declare,&lt;BR /&gt;html,&lt;BR /&gt;_WidgetsInTemplateMixin,&lt;BR /&gt;Point,&lt;BR /&gt;SpatialReference,&lt;BR /&gt;BaseWidget,&lt;BR /&gt;utils,&lt;BR /&gt;Message,&lt;BR /&gt;lang,&lt;BR /&gt;on,&lt;BR /&gt;domClass,&lt;BR /&gt;Graphic,&lt;BR /&gt;GraphicsLayer,&lt;BR /&gt;ProjectParameters,&lt;BR /&gt;webMercatorUtils,&lt;BR /&gt;portalUtils,&lt;BR /&gt;esriConfig,&lt;BR /&gt;usng,&lt;BR /&gt;unitUtils,&lt;BR /&gt;Map,&lt;BR /&gt;//MapView,&lt;BR /&gt;PictureMarkerSymbol,&lt;BR /&gt;SimpleMarkerSymbol,&lt;BR /&gt;InfoTemplate&lt;BR /&gt;){&lt;BR /&gt;var clazz = declare([BaseWidget], {&lt;BR /&gt;// postCreate: function() {&lt;BR /&gt;// this.inherited(arguments);&lt;BR /&gt;// console.log('postCreate');&lt;BR /&gt;// },&lt;BR /&gt;&lt;BR /&gt;startup: function() {&lt;BR /&gt;var locations = ["-90.2594, 38.6128", "-90.2704, 38.6290", "-90.2913, 38.6350"];&lt;BR /&gt;var map = new Map("map", {&lt;BR /&gt;basemap: "topo-vector",&lt;BR /&gt;center: [-25.312, 34.307],&lt;BR /&gt;zoom: 2&lt;BR /&gt;});&lt;BR /&gt;//map.on("load", initToolbar);&lt;BR /&gt;/*var view = new MapView({&lt;BR /&gt;container: "viewDiv",&lt;BR /&gt;map: map,&lt;BR /&gt;center: [0,0], // longitude, latitude&lt;BR /&gt;zoom: 6&lt;BR /&gt;});*/&lt;BR /&gt;var gl = new GraphicsLayer();&lt;BR /&gt;map.addLayer(gl);&lt;BR /&gt;for(i=0; i&amp;lt;locations.length; i++){&lt;BR /&gt;&lt;BR /&gt;//var s = new PictureMarkerSymbol('&lt;A href="https://webwin-portal.tgis.suprtek.com/portal/home/item.html?id=aa6642331cfa47c9ae112af1f0cad07d" target="_blank"&gt;https://webwin-portal.tgis.suprtek.com/portal/home/item.html?id=aa6642331cfa47c9ae112af1f0cad07d&lt;/A&gt;', 24, 24);&lt;BR /&gt;var simpleMarkerSymbol = {&lt;BR /&gt;type: "simple-marker",&lt;BR /&gt;color: [46, 204, 113 ], // Green&lt;BR /&gt;outline: {&lt;BR /&gt;color: [255, 255, 255], // white&lt;BR /&gt;width: 5&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;var p = new Point(locations[i].split(",")[0],locations[i].split(",")[1]);&lt;BR /&gt;var it = new InfoTemplate("Attributes","Test");&lt;BR /&gt;var g = new Graphic(p, simpleMarkerSymbol).setInfoTemplate(it);&lt;/P&gt;&lt;P&gt;gl.add(g);&lt;BR /&gt;}&lt;BR /&gt;gl.show();&lt;BR /&gt;//map.addLayer(gl);&lt;BR /&gt;}&lt;BR /&gt;})&lt;BR /&gt;return clazz;&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 21:47:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/points-won-t-show-up/m-p/1131423#M6127</guid>
      <dc:creator>Epiper40</dc:creator>
      <dc:date>2022-01-06T21:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Points won't show up</title>
      <link>https://community.esri.com/t5/developers-questions/points-won-t-show-up/m-p/1132537#M6135</link>
      <description>&lt;P&gt;Another Developer on my team and I solved it. Here's our code so that it can help someone in the future. It relies on the url passing the point information:&lt;/P&gt;&lt;P&gt;define([&lt;BR /&gt;'dojo/_base/declare',&lt;BR /&gt;'dojo/_base/html',&lt;BR /&gt;'dijit/_WidgetsInTemplateMixin',&lt;BR /&gt;"esri/geometry/Point",&lt;BR /&gt;'esri/SpatialReference',&lt;BR /&gt;'jimu/BaseWidget',&lt;BR /&gt;'jimu/utils',&lt;BR /&gt;'jimu/dijit/Message',&lt;BR /&gt;'dojo/_base/lang',&lt;BR /&gt;'dojo/on',&lt;BR /&gt;"dojo/dom-class",&lt;BR /&gt;"esri/graphic",&lt;BR /&gt;"esri/layers/GraphicsLayer",&lt;BR /&gt;"esri/tasks/ProjectParameters",&lt;BR /&gt;"esri/geometry/webMercatorUtils",&lt;BR /&gt;"jimu/portalUtils",&lt;BR /&gt;"esri/config",&lt;BR /&gt;"libs/usng/usng",&lt;BR /&gt;"jimu/SpatialReference/unitUtils",&lt;BR /&gt;"esri/map",&lt;BR /&gt;"esri/symbols/PictureMarkerSymbol",&lt;BR /&gt;"esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt;"esri/Color",&lt;BR /&gt;"esri/InfoTemplate"&lt;BR /&gt;],&lt;BR /&gt;function(&lt;BR /&gt;declare,&lt;BR /&gt;html,&lt;BR /&gt;_WidgetsInTemplateMixin,&lt;BR /&gt;Point,&lt;BR /&gt;SpatialReference,&lt;BR /&gt;BaseWidget,&lt;BR /&gt;utils,&lt;BR /&gt;Message,&lt;BR /&gt;lang,&lt;BR /&gt;on,&lt;BR /&gt;domClass,&lt;BR /&gt;Graphic,&lt;BR /&gt;GraphicsLayer,&lt;BR /&gt;ProjectParameters,&lt;BR /&gt;webMercatorUtils,&lt;BR /&gt;portalUtils,&lt;BR /&gt;esriConfig,&lt;BR /&gt;usng,&lt;BR /&gt;unitUtils,&lt;BR /&gt;Map,&lt;BR /&gt;PictureMarkerSymbol,&lt;BR /&gt;SimpleMarkerSymbol,&lt;BR /&gt;Color,&lt;BR /&gt;InfoTemplate&lt;BR /&gt;){&lt;BR /&gt;var clazz = declare([BaseWidget], {&lt;BR /&gt;&lt;BR /&gt;startup: function() {&lt;BR /&gt;const urlString = window.location.href;&lt;BR /&gt;const pointParse = urlString.split('?')[1];&lt;BR /&gt;const pointParse2 = pointParse.split('&amp;amp;');&lt;BR /&gt;var locations = [];&lt;BR /&gt;for(i=0; i&amp;lt;pointParse2.length; i++)&lt;BR /&gt;{&lt;BR /&gt;const point = pointParse2[i].replace('points=', '');&lt;BR /&gt;console.log(point);&lt;BR /&gt;locations.push(point);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if(locations != null) {&lt;BR /&gt;var myMap = this.map;&lt;BR /&gt;var sms = new SimpleMarkerSymbol().setStyle(SimpleMarkerSymbol.STYLE_CIRCLE).setColor(new Color([255,0,0,0.5])).setSize(12);&lt;BR /&gt;&lt;BR /&gt;for(i=0; i&amp;lt;locations.length; i++){&lt;BR /&gt;console.log("adding points");&lt;BR /&gt;var p = new Point(parseFloat(locations[i].split(",")[0]),parseFloat(locations[i].split(",")[1]), new SpatialReference({ wkid: 4326}));&lt;BR /&gt;var g = new Graphic(p, sms);&lt;BR /&gt;myMap.graphics.add(g);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;})&lt;BR /&gt;&lt;BR /&gt;return clazz;&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 18:01:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/points-won-t-show-up/m-p/1132537#M6135</guid>
      <dc:creator>Epiper40</dc:creator>
      <dc:date>2022-01-11T18:01:36Z</dc:date>
    </item>
  </channel>
</rss>

