AnsweredAssumed Answered

PictureMarkerSymbol default width and height

Question asked by greenkarmic on May 14, 2014
Latest reply on May 14, 2014 by JUihlein-esristaff

I'm wondering how to create a PictureMarkerSymbol by using the default width and height of the image.

Even in the documentation it says the default values are the actual dimensions of the image, but at the same time the width and height are required values to enter.

I tried entering null or empty string but that just generates undefined javascript errors for width and height

Can't the API can read those values from the image source itself?

I really would prefer not having to enter a specific size myself since the image sources dimensions can vary quite a bit from symbol to symbol (by 1 to 5 pixels for width and/or height) and I don't want them to be distorted. On top of that the image sources might change from time to time.

Btw I currently generate images PNG sources by doing batch exporting in Inkscape with a single SVG that contains all the symbols. The exporter does not allow to specify a constant size (e.g. 20px x 20px) for the resulting images, it takes the size of the object itself. Thus my question here.