I am already aware of PictureMarkerSymbol and PictureFillSymbol. But what I need is a different kind of symbol that I can use to fill a polygon. Ideally I want to be able to keep the aspect ratio. unlike PictureMarkerSymbol, I need the image moves with the polygon... does such symbol exist in JavaScript SDK?
Thanks but PictureFillSymbol also repeatedly fills the area. I need to keep only on image so that I just reshape the polygon to fit the image.
I don't think there is straightforward way to achieve this. I would achieve this by using the following steps:
1) Create a temp Graphic or Point Layer.
2) For every polygon, get the centroid of the polygon and add as point feature.
3) Use the PictureMarkerSymbol to symbolise the point feature.
Hope this helps.