[gnome-maps] turnPointMarker: Use 5 decimals for dragged locations



commit 3ab9fefb35bf806b96a44b7b92359e291e7eb718
Author: Damián Nohales <damiannohales gmail com>
Date:   Mon Sep 8 11:05:48 2014 -0300

    turnPointMarker: Use 5 decimals for dragged locations
    
    It's visually better to use less decimals since the location coordinates
    will be displayed in sidebar place entries, which are quite small. Also,
    using more than 5 decimals doesn't contribute to precision for the
    routing user case.

 src/turnPointMarker.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/turnPointMarker.js b/src/turnPointMarker.js
index dc6093c..40aa793 100644
--- a/src/turnPointMarker.js
+++ b/src/turnPointMarker.js
@@ -111,8 +111,8 @@ const DestinationMarker = new Lang.Class({
     _onMarkerDrag: function() {
         let query = Application.routeService.query;
         let place = new Geocode.Place({
-                        location: new Geocode.Location({ latitude: this.latitude,
-                                                         longitude: this.longitude }) });
+                        location: new Geocode.Location({ latitude: this.latitude.toFixed(5),
+                                                         longitude: this.longitude.toFixed(5) }) });
 
         this._queryPoint.place = place;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]