-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print Widget Scale Error #682
Comments
@rick-gse thanks for the detailed description of your issue! At first blush this seems like an issue with the AGS Print Service. If you don't explicitly provide a spatial reference as you did, the spatial reference of the map/basemap will be passed to the service. Here's an example: "mapOptions": {
"showAttribution": false,
"extent": {
"xmin": -13015085.680169962,
"ymin": 2663677.561681053,
"xmax": -8490013.605688732,
"ymax": 6807175.990962787,
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
}
},
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
},
"scale": 18489297.737236
}, What Print Service are you using - your own or the Esri example? I suppose also the dpi sent with the request could make a difference but it shouldn't! |
I am using the default from CMV, the ArcGIS Online one - printTaskURL: 'https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task', my client is using their own PrintService on their 10.3 server, but we both have the problem. And no, the DPI doesn't matter, or the size of the page, or the output type. |
Using the out-of-the-box CMV, if I zoom in to a location and use the Print widget, the scale bar is incorrect - It didn't matter if I chose PDF or JPG....
I copied the scale bar and moved it to the location on the map, and used the measurement widget to create ticks at one mile increments:
I noticed that the scale bar was about 1.3 times shorter than it should be which is 1/cos(40°), my latitude.
So I looked at Quito, Ecuador, and sure enough, the scale is correct:
The only way I found to fix it was to set the outSpatialReference in printParamerters to Colorado North State Plane
Changes to print.js:
Seems like the scale bar should always be correct, and I shouldn't have to set the SpatialReference, or am I missing something?
Thanks.
I'm attaching the full size images of the output.....
The text was updated successfully, but these errors were encountered: