Hi
Can anyone tell me how to place a PictureMarkerSymbol with fixed size (p.e. with a fixed width of 50meters)?
Is there an alternative way to place pictures with fixed dimensions?
I've tried it also with PictureFillSymbol, but this will repeat the attached picture in the polygon - as expected... (->api description)
Thank you for your help
Hi Stefan,
Do you mean you want to place the PictureMarkerSymbol with a fixed pixel size or a fixed occupation on the map? I'm a little bit confused about 50 meters... does it means you want the PictureMarkerSymbol to occupy a 50 meters square/width no matter the zoom level?
Hi Mengyi
Thank you for your fast reply.
Yes, I mean a PictureMarkerSymbol with a fixed occupation on the map. (if I zoom out, this marker should "shrink")
I don't think PictureMarkerSymbol has that capability. It's defined in pixel, not a fixed occupation on the map. We should still consider to use PictureFillSymbol.
As you already known, If the image is smaller than the fill area, it will be tiled. I would have the following two suggestions for your case:
1.Call setSize(int width, int height) to set the size for the image so that it will fill the area rather than be smaller than it.
2. Call setOffsetX(float offsetX) and setOffsetY(float offsetY) on the image. In this way, even the image is smaller than the area, it will not be tiled. I'm not sure if this meets your requirement because it won't occupy the whole area(I assume you may want the image to stretch when it's not big enough), but at least it will stay at the center.