Hello, is it possible to fill Graphic objects with tiled pictures (PictureFillSymbol) like that was on 10.2.x in Java runtime 100.0? Or any other possibilities to fill Graphic object with pictures?
Hi Daysie,
Well, as far as I know, it is not possible to fill polygon graphics with pictures. Although, you may work with marker symbol for points. Here is the snippet from the guide Symbols and renderers—ArcGIS Runtime SDK for Java | ArcGIS for Developers
<SPAN class="comment token">//create a picture marker symbol</SPAN> Image image <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Image</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"file:RedShinyPin.png"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">final</SPAN> PictureMarkerSymbol pictureMarker <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">PictureMarkerSymbol</SPAN><SPAN class="punctuation token">(</SPAN>image<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//load the symbol</SPAN> pictureMarker<SPAN class="punctuation token">.</SPAN><SPAN class="token function">loadAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//once the symbol is loaded it can be used to add to a graphic</SPAN> pictureMarker<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addDoneLoadingListener</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Runnable</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> @Override <SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">run</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">//create graphic</SPAN> Graphic graphic <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Graphic</SPAN><SPAN class="punctuation token">(</SPAN>location<SPAN class="punctuation token">,</SPAN> pictureMarker<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//add the graphic to the graphics overlay</SPAN> graphicsOvelay<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getGraphics</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">add</SPAN><SPAN class="punctuation token">(</SPAN>graphic<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Regards,
Adam
thanks for reply)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.