Skip to content

Print scale needs a default value #175

@seansweeney

Description

@seansweeney

I'm pretty sure this is the same as #138, but I can't re-open that one and it doesn't seem like the fix is in place.

At 5.1.0, the default contents of the print scale text box changed from a value to a placeholder. The backing code does not have a default value, so if you click the Create button in 5.1.0 thinking that the placeholder is the default value you get an error:

Our apologies: an error has unexpectedly occurred while starting the viewer.

Please notify the administrator of this website.  Provide a brief description of what you were doing when the problem occurred.  Thank you!

Here's the element definition in 5.1.0:

<input type="text" id="tboPrintScale" name="scale" class="frmInput ratting" placeholder="100" /></span>

And in 5.0.0:

<input type="text" id="tboPrintScale" name="scale" value="100" style="width: 60px" /> ft<br/>

You can (at the time of this writing) see the working older version on the Amherst 5.0.0 site:

http://gis.amherstma.gov/public/Viewer.aspx

Here's where the code tries to divide by the scale, which has no default defined:

originalWidth = extentWidth * 96 / scale;

I thought about submitting this as a pull request but I'm not sure if you want to change the element or the code. For now I've changed the element back to value in my instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions