I am trying to print a map which contains some PictureMarkerSymbols,but the symbols are not shown in the print page, instead a small purple marker is displayed. Is there any way to display the PictureMarkerSymbol when printing the map?
Hi,
In order to be able to make use of the PictureMarkerSymbol, you will need to change the image to byte array example:
var symbol = new PictureMarkerSymbol({ "angle": forFitPointResFeat.attributes.ANGLE, "xoffset": 0, "yoffset": 0, "type": "esriPMS", "url": myImagePath, "imageData": "iVBORw0KGgoAAAANSUhEUgAAAIwAAABFCAYAAACYJw5CAAADtElEQVR42u2dSUsjQRiGcxQEwYN3RdwXNPEgGHDfMQcvIxhMBDdcwEOEmCgBUXE9uGAIRlGJaDDi8ge/oaanmR5GM+n0VlX9PvCeO/3Vg6aqvqp4PAAAAAAAAAAAALCLl5cX8ngS1NvbS6iGmNzd3VF3d/evcbRNGDXswZ+fn5BHAI6OjqixsfGv8bNdGDXNzc2UTCYhDofE4/Evx8xRYdRUVlbSyckJxOGAaDSad6y4EEab/f19iOMAwWCw4DHiShg16+vrEMdi3t/fqaenR/fYcCmMmsnJSYhjMul0mkZHR4seE66FUdPf308fHx+QxwCZTIZaW1sNj4UQwqjx+XyQRienp6dUU1Nj2hgIJYxWnPPzc8iTh729PdPrLqwwapqamujg4ADiaAiFQlRaGrCs5kILo83m5qarxZmbm7OlztIIo2ZjY8NV4vzZ40lAGCOZnZ2VVpz7+3vy+/2O1FVaYdR0dXVJI87NzQ21tLQ4Wk/phVEjcnvF4eGhSWsoEEZ3vF4v3d7eCiEP2zW2dsYDYQpOfX09nZ2dcSnO8vIylzVztTDaKP0fzrO0tMR9rSCMJrFYzBFx2F6ZKDWCMF9kenra8sI8PT39/iKeECwQ5tsoax3mcnl5SQMDA8LWBMLYtJZzcXFBdXV1wtcCwuhIdXW17oLt7OxI8/4QxsC/qv+t5SwsLEj33hDGhGxtbZE7RIEwpmZkZMQV7wlhTEogEIAwECZ/Kip89Pb2RuKt1kIY2/P6+pq3eMp3mwSVl/shjBuFKSn5QR0dHboLxo4Bl5UNQhg3CdPX10e5XM5wsRoaGiCMzMIsLi6aXiB2IG9iYgLCyCTM2tqaLbvWw8PDEEY0YbQdbeyUoBPtDVNTUxBGFGHYLOb6+pqLBiq+O+1cLgy7Aev5+ZnLFk2lkQvCcBGl+14MWEtEVVUVhHEiY2Njwh4zYX8Ji7v8B8Jw2W5pJ52dnRDGiszPz0t7VJZtSwwNDUEYM5JKpVx1GN++WxskEqatrY3bQ2l2sbKyAmEKuYnq6uoKFwppiEQiFs+sBBRGaVYC+djd3bXolIJAwlhxTkh22Cp2e3u7u4RRlsyBUcw5acmxMKurqxDFAoxNyTkUZnt7G6LYALtxkzthHh8fC/ogtbW1uELVIWZmZvgRRrny/fsPwKaA+N0kPjg+PnZeGKW7/t8HK5tpgNeZFVsMdUSYbDYrzeWEbuPh4eGLO2wshv0uD3tQOByGKAIzPj5ujzAAAAAAAAAAAAAAoCh+Ah+PEEZZipXjAAAAAElFTkSuQmCC", "contentType": "image/png", "width": 18, "height": 18 });
var graphic = new Graphic(geometry, symbol, attribute);
Hope this helps.
Regards
I also found this site which let me convert my own graphic, rather than relying on something published at arcgis.com. I had to fiddle a bit with the size, which was originally too large. I pasted the base64 output in the imageData parameter.
Base64 image encoder online - base64 converter
Does this look like it would do it? Marker Symbols
There are some online tools which can do it for you. The idea is to convert the image into base64 string.
How do you convert the image to a byte array?
Thanks for your answer. I have tried the image as a byte array and it worked.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.