[libchamplain] launcher.js: add sample marker
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] launcher.js: add sample marker
- Date: Thu, 17 Mar 2016 15:39:43 +0000 (UTC)
commit 5ac5c5ae503caf734c332638e1e14755a84ec1d0
Author: Nayan Deshmukh <nayan26deshmukh gmail com>
Date: Tue Mar 15 19:38:43 2016 +0530
launcher.js: add sample marker
created a sample marker and a marker layer
and attached it to the view.
https://bugzilla.gnome.org/show_bug.cgi?id=763690
demos/launcher.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/demos/launcher.js b/demos/launcher.js
index f2f9e30..6b6fa6c 100755
--- a/demos/launcher.js
+++ b/demos/launcher.js
@@ -118,7 +118,14 @@ button.connect ("button-release-event", Lang.bind (view,
stage.add_child (buttons);
/* Create the markers and marker layer */
-// TODO
+let orange= Clutter.Color.new(0xf3,0x94,0x07,0xbb);
+let layer=new Champlain.MarkerLayer();
+let marker=Champlain.Label.new_with_text("Sample Marker","Serif 14",null,orange);
+marker.set_location(45.466, -73.75);
+layer.add_marker(marker);
+marker.set_reactive(true);
+layer.show();
+view.add_layer(layer);
/* Connect to the click event */
view.set_reactive (true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]