<?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: Can I render a markerSymbol image without having to define the width and height manually? in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768894#M71</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 posting that work around solution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be great if ESRI added an optional setting to render an image in its original size.&amp;nbsp; For example, maybe markerSymbol.setHeight(-1);&amp;nbsp; &amp;nbsp;and markerSymbol.setWidth(-1)... Or maybe&amp;nbsp;another markerSymbol.setSomething(true).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just mentioned the above idea with the hopes that the developers of ESRI&amp;nbsp;might read it and consider implementing this idea if it is feasible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 May 2019 12:15:01 GMT</pubDate>
    <dc:creator>BrianRoscher</dc:creator>
    <dc:date>2019-05-03T12:15:01Z</dc:date>
    <item>
      <title>Can I render a markerSymbol image without having to define the width and height manually?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768892#M69</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the function we currently use to add the point images onto our map:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function addGraphic() {&lt;BR /&gt; var point = new Point();&lt;BR /&gt; point.setLongitude(document.getElementById("lon").value);&lt;BR /&gt; point.setLatitude(document.getElementById("lat").value);&lt;BR /&gt; &lt;BR /&gt; var infoTemplate = new InfoTemplate();&lt;BR /&gt; infoTemplate.setTitle("Population");&lt;BR /&gt; infoTemplate.setContent("Hi&amp;lt;br/&amp;gt;Dude!");&lt;/P&gt;&lt;P&gt;var markerSymbol = new PictureMarkerSymbol(); &lt;BR /&gt; markerSymbol.setUrl(document.getElementById("picture_url").value);&lt;BR /&gt;//markerSymbol.setHeight(64);&lt;BR /&gt;//markerSymbol.setWidth(64);&lt;BR /&gt; &lt;BR /&gt; map.enableMapNavigation();&lt;BR /&gt; var graphic = new Graphic(point, markerSymbol);&lt;BR /&gt; graphic.setInfoTemplate(infoTemplate);&lt;BR /&gt; map.graphics.add(graphic); &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will notice that we commented out the setHeight and setWidth lines in hopes that it would simply render the actual image in its actual height and width.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a Google Maps application we are migrating to ESRI.&amp;nbsp; In our application, we have a zillion little picture files that can be markerSymbol images on the map.&amp;nbsp; The heights and widths of these images are different from one another.&amp;nbsp; When I have ESRI render our images onto the map, it distorts them all into a one size fits all square.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to make ESRI simply display an image on the map (whatever the zoom level) without distorting&amp;nbsp;that image or must I manually set the&amp;nbsp;width and height of each image (which is going to be a huge job to figure out the height and width of the zillions of images we have and store them in a database somewhere to have to manually set them in ESRI)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 19:16:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768892#M69</guid>
      <dc:creator>BrianRoscher</dc:creator>
      <dc:date>2019-05-02T19:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can I render a markerSymbol image without having to define the width and height manually?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768893#M70</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The height and width properties of the PictureMarkerSymbol have default values of 12&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#height" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#height&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You would&amp;nbsp; have to use JS native methods to get the images height and width.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; new_img &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Image&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

new_img&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;onload &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&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;var&lt;/SPAN&gt; width  &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        heigth &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

new_img&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;src &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string 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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:34:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768893#M70</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T08:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can I render a markerSymbol image without having to define the width and height manually?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768894#M71</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 posting that work around solution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be great if ESRI added an optional setting to render an image in its original size.&amp;nbsp; For example, maybe markerSymbol.setHeight(-1);&amp;nbsp; &amp;nbsp;and markerSymbol.setWidth(-1)... Or maybe&amp;nbsp;another markerSymbol.setSomething(true).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just mentioned the above idea with the hopes that the developers of ESRI&amp;nbsp;might read it and consider implementing this idea if it is feasible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2019 12:15:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768894#M71</guid>
      <dc:creator>BrianRoscher</dc:creator>
      <dc:date>2019-05-03T12:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can I render a markerSymbol image without having to define the width and height manually?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768895#M72</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Have you ever used &lt;A href="https://community.esri.com/space/2167"&gt;ArcGIS Ideas&lt;/A&gt;‌? This is exactly what it is intended for.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2019 12:35:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768895#M72</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-03T12:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can I render a markerSymbol image without having to define the width and height manually?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768896#M73</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; Because you showed me that link, I just posted this idea in there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2019 12:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/can-i-render-a-markersymbol-image-without-having/m-p/768896#M73</guid>
      <dc:creator>BrianRoscher</dc:creator>
      <dc:date>2019-05-03T12:49:16Z</dc:date>
    </item>
  </channel>
</rss>

