Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale bar in bottom corner too small to be useful #5114

Open
VolkerRaab opened this issue Aug 24, 2024 · 14 comments
Open

Scale bar in bottom corner too small to be useful #5114

VolkerRaab opened this issue Aug 24, 2024 · 14 comments
Labels
enhancement Improvements and new feature requests mapview Related to the map view features ui User Interface

Comments

@VolkerRaab
Copy link

Problem

Measuring distances on the map requires a scale. This is present in principle in the bottom corner given both in metric and imperial units. However, I find it way too small to be useful.
When I try to measure the distance between two points I try to zoom in for best precision which means that the two are in approximately opposite corners.
(Quick try: image width 1780px, scale bar 69px. That is not even 4% of the width or 3% of the diagonal.)
To estimate the distance I then have to guess whether it is more like 15 times the scale bar or more like 20 times. This frequently does not really help.
NB: google maps has the same issue.

Description

The scale bar should be at least 1/3 of the image width.
Being in the bottom corner I don't see issues with it covering up more important information even when considerably bigger.

Screenshots

No response

@mmd-osm
Copy link
Contributor

mmd-osm commented Aug 24, 2024

To measure distances, I find scales fairly unreliable, regardless of their length on the map. You always have the issue that you cannot rotate the map to align it with horizontal scales. With web mercator projection, this is even getting worse when trying to measure long distances across oceans (spoiler: it's not a straight line, if your longitude differs!)

image

Maybe you could try out if something like https://ppete2.github.io/Leaflet.PolylineMeasure/demo1.html would cover your requirement?

Part of https://ppete2.github.io/Leaflet.PolylineMeasure/

@VolkerRaab
Copy link
Author

Oh, that was quick!

As I am not a "flat-earther" I get your point with the curvatures ;-)
However this is not an issue for getting to the next-best pizza-place within the county.

Commenting on your suggestion:
(a) it is very nice, particularly when segments are involved! Good to know.
(b) but it is an external app which may not have all features of the "general" openstreetmap.org, like POI, Hospitals, etc.
(c) having such a feature on the "regular" openstreetmap would be great but a lot more work than just enlarging the existing bar.

So I insist that it wouldn't hurt to enlarge the existing scale bar even though it obviously has its deficiencies.

@mmd-osm
Copy link
Contributor

mmd-osm commented Aug 24, 2024

Well, I'm assuming that you're not using your helicopter to get to your pizza place and would need to know the straightline distance. Why don't you use one of the available routing options instead? They support walking, bike and car across 3 different routing engines.

@VolkerRaab
Copy link
Author

In fact I prefer a catapult to a helicopter (which brings back the issue of curved trajectories).
But to see how wide Monterey-Bay is or how long Death Valley would involve straight lines.
I am not saying there are no alternative ways to find out. But the bar in its present state is unusable IMHO.

@mmd-osm mmd-osm added ui User Interface enhancement Improvements and new feature requests mapview Related to the map view features labels Aug 24, 2024
@AntonKhorev
Copy link
Collaborator

For testing I have some code that replaces actual routing engines in the directions mode with fake ones that just tell the distance between from/to points. Maybe we can make it an actual selectable routing engine? Then you'll be able to measure distances using the "directions from/to here" context menu.

@VolkerRaab
Copy link
Author

That would already be a very viable compromise: a "routing" just straight from a starting point to an end point. Thanks.

@mmd-osm
Copy link
Contributor

mmd-osm commented Aug 24, 2024

Maybe one of the routing engines already supports direct line routing out of the box. That would make this even easier to build.

@mmd-osm
Copy link
Contributor

mmd-osm commented Aug 24, 2024

By the way, Leaflet also has a param to set the max width of the scale:

In app/assets/javascripts/index.js:

  // L.control.scale()
  //   .addTo(map);

  L.control.scale ({maxWidth:400}).addTo (map);

@tomhughes
Copy link
Member

Can somebody explain how any of this helps with mapping? It sounds like you want it as an end user feature which would be out of scope....

@AntonKhorev
Copy link
Collaborator

How does the existing scale bar help with mapping?

@VolkerRaab
Copy link
Author

Thanks to @tomhughes: programming is probably out of scope and I am not asking for any.
As opposed to programming my first suggestion (as I understand it) is essentially changing one parameter for the existing map display: the length of the scale bar.
If I want to (roughly) know the distance between New York and Washington I open the map and zoom in to see the distance is "three thumbs". But then the scale bar is too short to convert "three thumbs" into miles...
Most of the times for a quick info this is enough and fiddling with routing, start and end points and the question of car/train/bicycle and the routing engine much too inconvenient...

@HolgerJeromin
Copy link
Contributor

If I want to (roughly) know the distance between New York and Washington I open the map and zoom in to see the distance is "three thumbs".

Tom asked the question "Can somebody explain how any of this helps with mapping?"
The main philosophy of this website is to make openstreetmap mapping better and easier but not to produce tools for "generic useful map stuff". Routing was for example included to find routing errors in osm data.

@gravitystorm
Copy link
Collaborator

How does the existing scale bar help with mapping?

It can help in sparsely mapped areas, or at high latitudes, to figure out whether features (like forests or coastlines) have been mapped to a reasonable accuracy. For example, if the coastline has corners around 1km apart, that suggests more detail could be added.

But in general it's not super important, which is why having a small scale bar in the corner is proportionate. It's there to indicate roughly what scale of map you are looking at, for when you have no further context. It's not supposed to be a measuring tool.

As above, we need some reasonable mapping use-case (and we mean, a use-case for OpenStreetMap volunteer mappers) to consider adding more functionality.

@AntonKhorev
Copy link
Collaborator

Tom asked the question "Can somebody explain how any of this helps with mapping?"

Last time I wanted to measure distances was when I wanted to know how far away certain contributors place pois from where they really are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements and new feature requests mapview Related to the map view features ui User Interface
Projects
None yet
Development

No branches or pull requests

6 participants