Skip to main content

Print scale not accurate

Comments

3 comments

  • Dan Giersz
    Have you made the adjustment for web mercator?

     

    Look in the code gallery for "Print Template with Web Mercator distance and scale correction"
    0
  • Permanently deleted user
    Ah, no I have not.  Thanks Dan.  I will try that.
    0
  • Permanently deleted user
    I found another way to do this, but it requires changing a line of code in the Essentials.js file in the {location of html5 in wwwroot}\Resources\Compiled\

     

    BEFORE MAKING CHANGES...ALWAYS DO A BACKUP!

     

    In Essentials.js do a search for ‘_getPrintingObjectForEssentials()', and inside of that method I find 'l.targetSpatialReference && (n.mapOptions.spatialReference = l.targetSpatialReference);'  (which you can do a search on that too).  and I replace it with the following code using our spatial reference (2253 - NAD_1983_StatePlane_Michigan_South_FIPS_2113_Feet_Intl) as the output spatial reference when exporting a map image for printing: new esri.SpatialReference({wkid:2253})&&(n.mapOptions.spatialReference=new esri.SpatialReference({wkid:2253})); You can change this wkid to whatever is more accurate for your region.

     

    The only issue I run into is graphics are offset by a slight margin:User-added image

     

    You can test it out here: https://gis.miottawa.org/ottawa/geocortex/propertymapping.

     

    I wish this option could be added to the Essentials Manager when setting up your print templates.  Just enter what output spatial reference you would like it to be instead of edit the code.

     

    Hope this helps,

     

    Marshall

     

     
    0

Please sign in to leave a comment.