GNOME Bugzilla – Bug 576055
Implement advanced markers
Last modified: 2009-04-12 02:09:19 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.
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).
I am working on this.
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.
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?
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.