After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739363 - Scale should be displayed
Scale should be displayed
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: map view
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
: 760775 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-10-29 17:12 UTC by yvan
Modified: 2016-02-01 20:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add scale ruler (3.37 KB, patch)
2016-02-01 09:48 UTC, Jonas Danielsson
committed Details | Review
Cast of scale (1.15 MB, video/webm)
2016-02-01 09:49 UTC, Jonas Danielsson
  Details
Cast of scale with imperial units and help overlay (538.79 KB, video/webm)
2016-02-01 09:52 UTC, Jonas Danielsson
  Details

Description yvan 2014-10-29 17:12:36 UTC
Hi,

I think it would be great to display the scale of the displayed map :
  - this is one of the more important data about a map
  - if I 

Thanks,
Yvan
Comment 1 yvan 2015-07-22 11:14:57 UTC
Hi,

I just thought again to this enhancement request, and I saw that I forgot to finish the second sentence to justify it. Sorry for that.Here it is:

If, say, I want to know if my destination is within walking distance or if I have to go by car, it is very difficult without scale. The remaining solution would be to ask for a route in Maps, but many times it returns a different path that the one I want, and it needs the user to ask for it. Anyway, in my opinion, a map without scale is very frustrating.

And the second thing I wanted to say is that this bug report is still concerning version 3.14, although it is still valid for 3.16. Correct me if I do wrong, but I set the version to 3.16.

Regards,
Yvan
Comment 2 Jonas Danielsson 2016-01-31 12:18:06 UTC
We can now click one point chose route from here, and another point and chose route to here, this will show you distance and time for walk, bike car.
Comment 3 yvan 2016-01-31 15:21:53 UTC
Thanks for you explanation Jonas.

Even if I understand you point of view, I do not think that asking for a route to get a distance can provide the same information than having the scale of the map :
 - What if I want the approximate distance between Europe and North America ?
 - What if I want an approximate distance between two mountains ?
 - What if I want the approximate length of a lake ?
  -What if the route suggested is not the one I want to take ?

I set this to "reopened", but feel free to close if you think the "asking for a route" is sufficient.

Regards,
Yvan
Comment 4 yvan 2016-01-31 15:23:39 UTC
Oh and I forgot to say that this bug affects now gnome-maps 3.18.2.
Comment 5 Jonas Danielsson 2016-01-31 15:53:50 UTC
(In reply to yvan.masson from comment #3)
> Thanks for you explanation Jonas.
> 
> Even if I understand you point of view, I do not think that asking for a
> route to get a distance can provide the same information than having the
> scale of the map :
>  - What if I want the approximate distance between Europe and North America ?
>  - What if I want an approximate distance between two mountains ?
>  - What if I want the approximate length of a lake ?
>   -What if the route suggested is not the one I want to take ?
> 

Well, I do not mean to sound harsh, but then I think Maps is not the application for you right now. Maps wants to remain a simple map application and I do not want any feature creep. I do not feel there is enough of push for a feature like this to warrant its inclusion.

> I set this to "reopened", but feel free to close if you think the "asking
> for a route" is sufficient.

I will close it. But I would recommend you to file a similar bug on the libchamplain product in this bugzilla. That is the library that provides the map widget that we use. Maybe you can get champlain to implement a scale that you can activate via some keybinding?

Thank you!

> 
> Regards,
> Yvan
Comment 6 Hashem Nasarat 2016-01-31 16:05:21 UTC
Right now perhaps not, but showing the scale on a map is a pretty common thing. Google maps does it Bing maps does it, and mapquest does it. For feature parity we should have it, and it is useful from time to time.

http://imgur.com/a/pjAtX
Comment 7 Jonas Danielsson 2016-01-31 16:16:57 UTC
(In reply to Hashem Nasarat from comment #6)
> Right now perhaps not, but showing the scale on a map is a pretty common
> thing. Google maps does it Bing maps does it, and mapquest does it. For
> feature parity we should have it, and it is useful from time to time.
> 
> http://imgur.com/a/pjAtX

Sure, but I do not think the code belongs in Maps eitherway. It is libchamplain who should do such calculations!

Thanks
Comment 8 Hashem Nasarat 2016-01-31 16:23:02 UTC
Instead of opening a new bug we can just move it :)
Comment 9 q8311692 2016-01-31 22:08:13 UTC
*** Bug 760775 has been marked as a duplicate of this bug. ***
Comment 10 Jiri Techet 2016-02-01 08:41:00 UTC
Hmm, maybe I miss something but libchamplain contains an implementation of scale:

https://developer.gnome.org/libchamplain/unstable/ChamplainScale.html

You can just check the launcher-gtk demo to see it in action and to see how to use it.
Comment 11 q8311692 2016-02-01 08:47:24 UTC
Hello Jiri,

I opened a similar ticket in the GNOME-Maps tracker. Subsequently I was asked to file a bug/enhancement against libchaplain.

https://bugzilla.gnome.org/show_bug.cgi?id=760775

I will move my duplicate report back to the Maps queue with a reference to your comment.
Comment 12 Jonas Danielsson 2016-02-01 08:54:39 UTC
(In reply to Jiri Techet from comment #10)
> Hmm, maybe I miss something but libchamplain contains an implementation of
> scale:
> 
> https://developer.gnome.org/libchamplain/unstable/ChamplainScale.html
> 
> You can just check the launcher-gtk demo to see it in action and to see how
> to use it.

Hah! Sorry for this Jiri! Will move back to Maps!
Comment 13 Jonas Danielsson 2016-02-01 09:04:47 UTC
*** Bug 760775 has been marked as a duplicate of this bug. ***
Comment 14 Jonas Danielsson 2016-02-01 09:48:58 UTC
Created attachment 320172 [details] [review]
Add scale ruler

Champlain has support for adding a scale ruler. It also supports
different units. Miles vs Kilometers. This commit adds a scale to Maps
and checks the LC_MEASUREMENT locale to determine the unit.
Comment 15 Jonas Danielsson 2016-02-01 09:49:36 UTC
Created attachment 320173 [details]
Cast of scale
Comment 16 Jonas Danielsson 2016-02-01 09:52:11 UTC
Created attachment 320174 [details]
Cast of scale with imperial units and help overlay
Comment 17 Mattias Bengtsson 2016-02-01 11:14:15 UTC
I like this! I was hesitant at first but it seems low profile enough to not take focus off the map. Andreas what do you think?
Comment 18 Marcus Lundblad 2016-02-01 12:18:57 UTC
(In reply to Mattias Bengtsson from comment #17)
> I like this! I was hesitant at first but it seems low profile enough to not
> take focus off the map. Andreas what do you think?

I agree!
One thing, though. Maybe the scale should only show up higher zoom levels?
The scale will for example only be accurate around the equator when showing the whole world, I think…
Comment 19 Jonas Danielsson 2016-02-01 12:29:07 UTC
(In reply to Marcus Lundblad from comment #18)
> (In reply to Mattias Bengtsson from comment #17)
> > I like this! I was hesitant at first but it seems low profile enough to not
> > take focus off the map. Andreas what do you think?
> 
> I agree!
> One thing, though. Maybe the scale should only show up higher zoom levels?
> The scale will for example only be accurate around the equator when showing
> the whole world, I think…

Fair point! Any suggestions on zoom-level?
Comment 20 Jonas Danielsson 2016-02-01 12:32:06 UTC
(In reply to Jonas Danielsson from comment #19)
> (In reply to Marcus Lundblad from comment #18)
> > (In reply to Mattias Bengtsson from comment #17)
> > > I like this! I was hesitant at first but it seems low profile enough to not
> > > take focus off the map. Andreas what do you think?
> > 
> > I agree!
> > One thing, though. Maybe the scale should only show up higher zoom levels?
> > The scale will for example only be accurate around the equator when showing
> > the whole world, I think…
> 
> Fair point! Any suggestions on zoom-level?

Google seems to always have one tho.
Comment 21 Hashem Nasarat 2016-02-01 16:19:46 UTC
Review of attachment 320172 [details] [review]:

Looks good to me apart from the indentation.

::: data/ui/help-overlay.ui
@@ +64,3 @@
+                 <property name="accelerator">&lt;Primary&gt;S</property>
+               </object>
+             </child>

The indenting in this block is off
Comment 22 yvan 2016-02-01 17:58:22 UTC
I know it might not be the right place to do so, but thanks very much for implementing this!

And about zoom-level, my opinion would be to display the scale anyway: it is done on Google Maps, on OpenStreetMap, on mappy.com, on viamichelin.fr... and I suppose they provide "good" maps.
Comment 23 Jonas Danielsson 2016-02-01 20:01:40 UTC
Attachment 320172 [details] pushed as ec85127 - Add scale ruler