<?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 PictureMarkerSymbol throws IllegalArgumentException in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/picturemarkersymbol-throws/m-p/12697#M78</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just started trying to upgrade from the beta. Everything was fairly easy to fix until I went to add a drawable to the map. This is all it will tell me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514): Caused by: java.lang.IllegalArgumentException: width and height must be &amp;gt; 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at android.graphics.Bitmap.nativeCreate(Native Method)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at android.graphics.Bitmap.createBitmap(Bitmap.java:477)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at com.esri.core.symbol.PictureMarkerSymbol.toJson(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at com.esri.android.map.GraphicsLayer.addGraphic(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried setting the bounds on the drawable but appears that the dimensions it is looking at are not affected by these. Here's code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PictureMarkerSymbol symbol = new PictureMarkerSymbol(item);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Graphic graphic = new Graphic(pt, symbol);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layer layer = this.getLayer(overlayName);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if(layer != null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; layer.graphics.addGraphic(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where "item" is a procedurally drawn class derived from Drawable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jan 2012 17:53:37 GMT</pubDate>
    <dc:creator>DerekBurnett</dc:creator>
    <dc:date>2012-01-11T17:53:37Z</dc:date>
    <item>
      <title>PictureMarkerSymbol throws IllegalArgumentException</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/picturemarkersymbol-throws/m-p/12697#M78</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just started trying to upgrade from the beta. Everything was fairly easy to fix until I went to add a drawable to the map. This is all it will tell me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514): Caused by: java.lang.IllegalArgumentException: width and height must be &amp;gt; 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at android.graphics.Bitmap.nativeCreate(Native Method)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at android.graphics.Bitmap.createBitmap(Bitmap.java:477)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at com.esri.core.symbol.PictureMarkerSymbol.toJson(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01-11 13:49:56.905: E/AndroidRuntime(10514):&amp;nbsp; at com.esri.android.map.GraphicsLayer.addGraphic(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried setting the bounds on the drawable but appears that the dimensions it is looking at are not affected by these. Here's code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PictureMarkerSymbol symbol = new PictureMarkerSymbol(item);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Graphic graphic = new Graphic(pt, symbol);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layer layer = this.getLayer(overlayName);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if(layer != null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; layer.graphics.addGraphic(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where "item" is a procedurally drawn class derived from Drawable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 17:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/picturemarkersymbol-throws/m-p/12697#M78</guid>
      <dc:creator>DerekBurnett</dc:creator>
      <dc:date>2012-01-11T17:53:37Z</dc:date>
    </item>
  </channel>
</rss>

