You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
this.printparams = new PrintParameters();
this.printparams.map = this.map;
this.printparams.outSpatialReference = new SpatialReference(2231); // Coloroado North State Plane
//this.printparams.outSpatialReference = this.map.spatialReference;
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:
@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:
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: