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 576055 - Implement advanced markers
Implement advanced markers
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: markers
unspecified
Other Linux
: Normal enhancement
: 0.4
Assigned To: Pierre-Luc Beaudoin
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2009-03-20 09:43 UTC by Pierre-Luc Beaudoin
Modified: 2009-04-12 02:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pierre-Luc Beaudoin 2009-03-20 09:43:53 UTC
As suggested by Michael Sheldon, it would be nice if the text markers had a "text" property.  When that property is updated, the marker would be updated.

Same for image based markers.
Comment 1 Pierre-Luc Beaudoin 2009-03-22 07:51:35 UTC
A new GObject, inheriting from ChamplainMarker, should implement the default marker look with these additions.

ChamplainMarker should grow a "text" property and a "image" property (passing a GdkPixbuf).  Get and set functions should be added.

An overridable internal function should be used to draw the marker when the text or the image change.

The default look implemented should have an optional background drawn.  The default look should take into account if there is an image or not, text or not. (At lease one of the 2 should be set).
Comment 2 Pierre-Luc Beaudoin 2009-04-03 22:26:52 UTC
I am working on this.
Comment 3 Emmanuel Rodriguez 2009-04-04 04:36:46 UTC
It would be nice if the markers that a background and foreground color could have this implemented as properties also.

The capitals demo has to go through a hack (removing the previous label and recreating it) in order to highlight the current capital through a color change.
Comment 4 Pierre-Luc Beaudoin 2009-04-04 07:36:30 UTC
Hehe so the plan right now:
Move the current ChamplainMarker to ChamplainBaseMarker which will have these properties:
* Latitude
* Longitude

A new ChamplainMarker object will inherit from it and have these properties:
* text (gchar*)
* image (ClutterActor*)
* use-markup (has label some pango markup)
* ellipsize (PangoEllipsizeMode)
* attributes (PangoAttrList*)
* font-name (gchar*)
* line-wrap (bool)
* line-wrap-mode (PangoWrapMode)
* single-line-mode (gboolean)
* color (ClutterColor*) the background color of the marker
* text-color (ClutterColor*) the color of the text
* has-background (bool) whether to draw the bubble background or not

I can't think of anything else right now.. do you guys have other ideas?

Comment 5 Pierre-Luc Beaudoin 2009-04-12 02:09:19 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

I merged the new-markers branch.  It contains a new ChamplainBaseMarker object which only contains the longitude and latitude position of markers.  ChamplainMarker now inherit from it and implement new properties such as text, image, color and others text properties.

The marker's style can be changed by reimplementing the draw_marker function in ChamplainMarkerClass.