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
I want my maps to have a fixed scale, i.e. 1" = x ft or mi (ideally for printing, but that's another issue altogether). It looks like this was discussed in the initial scale control topic and mentioned in a way here.
I see this as something that could be added to the scale-control options. I have a working demo of this for devices where 1" equals 96px.
static: true,
maxWidth: 96
The adjustment to the scale control looks like this
However I think this breaks down with different device PPI. Ideally units to pixels would be worked out in the control, but maybe this is not possible with JavaScript:
static: true,
staticWidth: 1,
staticUnits: 'in' //inches, pixels, centimeters, millimeters, throw an error is this would be larger than the map container
Going a bit deeper, it would be great to have this integrated into the map if possible so that calling
map.setScale(['1', '2000', 'in', 'ft']) //or something like that
would zoom the map to the appropriate zoom level that matches this scale.
The text was updated successfully, but these errors were encountered:
this breaks down with different device PPI. Ideally units to pixels would be worked out in the control, but maybe this is not possible with JavaScript:
Based on this stackoverflow post, it seems that it is not possible to accurately determine the real DPI for a screen in the browser. Print may be another matter.
Static Scale Control
I want my maps to have a fixed scale, i.e. 1" = x ft or mi (ideally for printing, but that's another issue altogether). It looks like this was discussed in the initial scale control topic and mentioned in a way here.
I see this as something that could be added to the scale-control options. I have a working demo of this for devices where 1" equals 96px.
The adjustment to the scale control looks like this
However I think this breaks down with different device PPI. Ideally units to pixels would be worked out in the control, but maybe this is not possible with JavaScript:
Going a bit deeper, it would be great to have this integrated into the map if possible so that calling
would zoom the map to the appropriate zoom level that matches this scale.
The text was updated successfully, but these errors were encountered: