[gnome-maps] userLocationMarker: Show heading
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] userLocationMarker: Show heading
- Date: Thu, 18 Jun 2015 20:44:16 +0000 (UTC)
commit 18c5a6bcb56547817080554de5c7ec4a469477f8
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jun 3 12:25:09 2015 +0100
userLocationMarker: Show heading
When heading information is available, use the directional user location
icon and rotate it to indicate the heading.
src/userLocationMarker.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/userLocationMarker.js b/src/userLocationMarker.js
index 7ae3362..155599f 100644
--- a/src/userLocationMarker.js
+++ b/src/userLocationMarker.js
@@ -70,7 +70,14 @@ const UserLocationMarker = new Lang.Class({
_init: function(params) {
this.parent(params);
- this.add_actor(Utils.CreateActorFromIconName('user-location', 0));
+ if (this.place.location.heading > -1) {
+ let actor = Utils.CreateActorFromIconName('user-location-compass', 0);
+ actor.set_pivot_point(0.5, 0.5);
+ actor.set_rotation_angle(Clutter.RotateAxis.Z_AXIS, this.place.location.heading);
+ this.add_actor(actor);
+ } else {
+ this.add_actor(Utils.CreateActorFromIconName('user-location', 0));
+ }
if (this.place.location.accuracy > 0) {
this._accuracyMarker = new AccuracyCircleMarker({ place: this.place });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]