A request we get now and then, is to add a readout of the current map scale denominator, e.g. a readout that changes from "1:24K" to "1:12K" as you zoom in a notch. These are handy for cartographers who still think in terms of scale, instead of zoom levels.
OpenLayers had the handy-dandy OpenLayers.Control.Scale but I couldn't find a similar such control for Leaflet. So I wrote it.
http://greeninfo-network.github.io/L.Control.CartographicScale/
https://github.com/GreenInfo-Network/L.Control.CartographicScale
I should point out that the accuracy of this sort of thing, has always been dubious. Between the projection itself (a "square degree" in Lagos is not the same area as in Barrow, and Greenland is not that big in real life) and the realities of screen resolution (96dpi is for mid-90s CRTs) these scale readouts have always had very poor accuracy and always will. It's the mathematics of a world that isn't flat, you know?
Still, the control is accurate enough for cartographers to get the sense of "2K or 20K?" and that's what was really needed here.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.