Picture Marker not visible in print

1089
12
Jump to solution
02-17-2023 07:59 AM
ADITYAKUMAR1
Occasional Contributor III

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.

ADITYAKUMAR1_0-1676649340122.pngADITYAKUMAR1_1-1676649359266.png 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

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Lerman
by
Occasional Contributor

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.

View solution in original post

12 Replies
Lerman
by
Occasional Contributor

HI, log into the arcgis server machine and then test whether the image address is accessible from the arcgis server machine.

ADITYAKUMAR1
Occasional Contributor III

@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. 

 

 

0 Kudos
Lerman
by
Occasional Contributor

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.

0 Kudos
ADITYAKUMAR1
Occasional Contributor III

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.

ADITYAKUMAR1_0-1676976268084.png

 

Thanks

Aditya Kumar

0 Kudos
Lerman
by
Occasional Contributor

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.

ADITYAKUMAR1
Occasional Contributor III

@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?

0 Kudos
Lerman
by
Occasional Contributor

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.

cim.png

ADITYAKUMAR1
Occasional Contributor III

@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

0 Kudos
LefterisKoumis
Occasional Contributor III

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",
      },
    });

  

0 Kudos