Hi ,
I have defined a picture marker which is properly coming on the map.
stopSymbol = {
type: "picture-marker",
url: _globalGISUrl + "Images/marker/inspection-map-markers-no-status.png",
width: "22px",
height: "22px"
};
But when I try to take a print of the picture marker is not available in the print pdf.
I am working with JavaScript 4. At some discussion I saw a similar problem where it was told to check if the picture marker is accessible to the print but I am not sure how to check that.
Thanks
Aditya Kumar
Solved! Go to Solution.
Hi Aditya,
The symbols in the screenshot can be implemented using cimsymbol, for which I wrote a demo, see:https://jsbin.com/magobotole/edit?html,output
Modify the symbol code a bit more, it will be closer to the symbol in your screenshot.
@Lerman Thanks for the reply. I just checked the logs of ArcGIS Server and could not find anything related to print. In case the Server is not able to access the image is there a way how to fix it.
Hi, if the arcgis server cannot access the image, then the image cannot be printed out.
The image symbol in the screenshot looks very simple, a circle, I think you can use SimpleMarkerSymbol or CIMSymbol to symbolize the point.
Hi @Lerman ,
Thanks for the suggestion. I tried with CIMSymbol but that also didnt helped. For the above layer I changed it to Simple marker and it does worked as expected. But I do have another icons which are not possible through Simple marker.
Thanks
Aditya Kumar
Hi Aditya,
The symbols in the screenshot can be implemented using cimsymbol, for which I wrote a demo, see:https://jsbin.com/magobotole/edit?html,output
Modify the symbol code a bit more, it will be closer to the symbol in your screenshot.
@Lerman Thanks for the demo link. This has really helped me and now I am able to print the marker.
BUt I have some more picture marker and I m trying to convert them into CIM Symbol. For this I am converting the png to svg and then uploading this in the CIM builder. After that I am getting a JSON but this is bringing a black dot marker on my map. The actual color or design is not coming. Any idea where I am doing mistake?
Hi Aditya,
I uploaded a svg file in the CIM builder site then converted to Cimsymbnol and the color was not lost. So at which step did you lose the color, png to svg?
If you can't solve the color loss problem, I think you can reassign the color in CIM builder website.
@Lerman i checked it and found there was problem with the svg file. The color were turning into black. As suggested by you I did the changes in the symbol builder and now it's workitas expected.
Thanks
Aditya kumar
I used the picture maker with no issues. You have to make sure that the png is accessible by everyone.
So, copy the url by expanding the : _globalGISUrl and append the rest of the string to the browser url.
Not sure, if the variable _globalGISUrl contains a '/' at the end, otherwise you will need to add it like:
"/Images/marker/inspection-map-markers-no-status.png
In my case, I copied and pasted the url:
var graphic = new Graphic({
geometry: {
type: "point",
latitude: evt.mapPoint.latitude,
longitude: evt.mapPoint.longitude,
spatialReference: view.spatialReference,
},
symbol: {
type: "picture-marker",
url: "https://static.arcgis.com/images/Symbols/Animated/EnlargeRotatingRedMarkerSymbol.png",
height: "20px",
width: "20px",
},
});