<?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: Using PictureMarkerSymbol instead of SimpleMarkerSymbol in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830598#M485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply and for teaching me that.&amp;nbsp; It works now... I moved the PictureMarkerSymbol around and I also replaced:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var markerSymbol = new SimpleMarkerSymbol();&lt;BR /&gt;markerSymbol.setPath("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z");&lt;BR /&gt;markerSymbol.setColor(new Color("#00FFFF"));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var markerSymbol = new PictureMarkerSymbol(); &lt;BR /&gt; markerSymbol.setUrl("https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png");&lt;BR /&gt; markerSymbol.setHeight(64);&lt;BR /&gt; markerSymbol.setWidth(64);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Worked like a charm!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 May 2019 12:32:31 GMT</pubDate>
    <dc:creator>BrianRoscher</dc:creator>
    <dc:date>2019-05-01T12:32:31Z</dc:date>
    <item>
      <title>Using PictureMarkerSymbol instead of SimpleMarkerSymbol</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830596#M483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I built a simple program that let's the user type in the latitude and longitude in user fields and then click a button and it puts a marker on that point in the map.&amp;nbsp; I want to be able to use picture files (like png or jpg files) instead of a symbol.&amp;nbsp; When I try to replace the markerSymbol in my code with a PictureMarkerSymbol, it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the below code, you will need to scroll the rendered program in your browser down in order to see the latitude and longitude fields below the map.&amp;nbsp; Simply click either button and it will place the marker on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/3.28/esri/css/esri.css"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt; #info {&lt;BR /&gt; top: 20px;&lt;BR /&gt; color: #444;&lt;BR /&gt; height: auto;&lt;BR /&gt; font-family: arial;&lt;BR /&gt; right: 20px;&lt;BR /&gt; margin: 5px;&lt;BR /&gt; padding: 10px;&lt;BR /&gt; position: absolute;&lt;BR /&gt; width: 115px;&lt;BR /&gt; z-index: 40;&lt;BR /&gt; border: solid 2px #666;&lt;BR /&gt; border-radius: 4px;&lt;BR /&gt; background-color: #fff;&lt;BR /&gt; }&lt;BR /&gt; html, body, #mapDiv {&lt;BR /&gt; padding:0;&lt;BR /&gt; margin:0;&lt;BR /&gt; height:100%;&lt;BR /&gt; }&lt;BR /&gt; button {&lt;BR /&gt; display: block;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script src="https://js.arcgis.com/3.28/"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; var map, tb;&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt; "esri/map", "esri/toolbars/draw",&lt;BR /&gt; "esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt; "esri/graphic", &lt;BR /&gt; "esri/geometry/Point",&lt;BR /&gt; "esri/Color", &lt;BR /&gt; "dojo/dom", &lt;BR /&gt; "dojo/on", &lt;BR /&gt; "dojo/domReady!",&lt;BR /&gt; "esri/symbols/PictureMarkerSymbol"&lt;BR /&gt; ], &lt;BR /&gt; function(Map, Draw, SimpleMarkerSymbol, Graphic, Point, Color, dom, on, PictureMarkerSymbol) {&lt;BR /&gt; map = new Map("mapDiv", {&lt;BR /&gt; basemap: "streets",&lt;BR /&gt; center: [-81.122685, 33.941193],&lt;BR /&gt; zoom: 15&lt;BR /&gt; });&lt;BR /&gt; map.on("load", initToolbar);&lt;/P&gt;&lt;P&gt;function initToolbar() {&lt;BR /&gt; tb = new Draw(map);&lt;/P&gt;&lt;P&gt;on(dom.byId("GoGo"), "click", function() {&lt;BR /&gt; addGraphic();&lt;BR /&gt; }); &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function addGraphic() {&lt;BR /&gt; var point = new Point&lt;BR /&gt; ({&lt;BR /&gt; longitude: document.getElementById("lon").value,&lt;BR /&gt; latitude: document.getElementById("lat").value&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// markerSymbol is used for point and multipoint, see http://raphaeljs.com/icons/#talkq for more examples&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var markerSymbol = new SimpleMarkerSymbol();&lt;BR /&gt; markerSymbol.setPath("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z");&lt;BR /&gt; markerSymbol.setColor(new Color("#00FFFF"));&lt;/P&gt;&lt;P&gt;map.enableMapNavigation();&lt;BR /&gt; map.graphics.add(new Graphic(point, markerSymbol));&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="mapDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;input type=text name=lat id=lat value=33.941193&amp;gt;&amp;nbsp;&lt;BR /&gt; &amp;lt;input type=text name=lon id=lon value=-81.122685&amp;gt;&amp;nbsp;&lt;BR /&gt; &amp;lt;input type=button value=Go! id=GoGo&amp;gt; &amp;lt;input type=button value=Go2! onclick=document.getElementById("GoGo").click();&amp;gt;&lt;BR /&gt; &amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2019 19:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830596#M483</guid>
      <dc:creator>BrianRoscher</dc:creator>
      <dc:date>2019-04-30T19:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using PictureMarkerSymbol instead of SimpleMarkerSymbol</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830597#M484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Your require oder is off.&amp;nbsp;dojo/domReady! should always be last in your require array.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;script&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; tb&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

  &lt;SPAN class="token function"&gt;require&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"esri/map"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"esri/toolbars/draw"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"esri/symbols/SimpleMarkerSymbol"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"esri/graphic"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
    &lt;SPAN class="string token"&gt;"esri/geometry/Point"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"esri/Color"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
    &lt;SPAN class="string token"&gt;"dojo/dom"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
    &lt;SPAN class="string token"&gt;"dojo/on"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"esri/symbols/PictureMarkerSymbol"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"dojo/domReady!"&lt;/SPAN&gt;

  &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
  &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Draw&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SimpleMarkerSymbol&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Graphic&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Point&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Color&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dom&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; on&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
    PictureMarkerSymbol&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830597#M484</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using PictureMarkerSymbol instead of SimpleMarkerSymbol</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830598#M485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply and for teaching me that.&amp;nbsp; It works now... I moved the PictureMarkerSymbol around and I also replaced:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var markerSymbol = new SimpleMarkerSymbol();&lt;BR /&gt;markerSymbol.setPath("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z");&lt;BR /&gt;markerSymbol.setColor(new Color("#00FFFF"));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var markerSymbol = new PictureMarkerSymbol(); &lt;BR /&gt; markerSymbol.setUrl("https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png");&lt;BR /&gt; markerSymbol.setHeight(64);&lt;BR /&gt; markerSymbol.setWidth(64);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Worked like a charm!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2019 12:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830598#M485</guid>
      <dc:creator>BrianRoscher</dc:creator>
      <dc:date>2019-05-01T12:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using PictureMarkerSymbol instead of SimpleMarkerSymbol</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830599#M486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2019 12:42:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/using-picturemarkersymbol-instead-of/m-p/830599#M486</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-01T12:42:52Z</dc:date>
    </item>
  </channel>
</rss>

