]> err.no Git - mapper/commitdiff
Output POI text even if we have an icon.
authorKaj-Michael Lang <milang@angel.tal.org>
Wed, 3 Oct 2007 16:18:56 +0000 (19:18 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Wed, 3 Oct 2007 16:18:56 +0000 (19:18 +0300)
src/map-poi.c

index ebb4ea37c2c3de08b490924a9cc5b09e83eec662..d3852a621692a2a03a220e20bff9bee114434ca7 100644 (file)
@@ -132,17 +132,22 @@ while (SQLITE_ROW == sqlite3_step(poisql.select_poi)) {
                        poix - _draw_width, poiy - _draw_width, 
                        (MAX_ZOOM-_zoom)/6 * _draw_width, (MAX_ZOOM-_zoom)/6 * _draw_width, 0, 360 * 64);
 
-               if (_zoom<3 && poi_label) {
-                       map_poi_title(poix, poiy, poi_label);
-               }
        } else {
+               guint w,h;
+               w=gdk_pixbuf_get_width(pixbuf);
+               h=gdk_pixbuf_get_height(pixbuf);
                gdk_draw_pixbuf(_map_pixmap,
                                _gc[COLORABLE_POI],
                                pixbuf, 0, 0,
-                               poix - gdk_pixbuf_get_width(pixbuf) / 2,
-                               poiy - gdk_pixbuf_get_height(pixbuf) / 2, 
+                               poix-w/2,
+                               poiy-h/2, 
                                -1, -1, GDK_RGB_DITHER_NONE,
                                0, 0);
+               if (_zoom<2)
+                       gdk_draw_rectangle(_map_pixmap, _gc[COLORABLE_POI], FALSE, poix-w/2-1, poiy-h/2-1, w+1, h+1);
+       }
+       if (_zoom<3 && poi_label) {
+               map_poi_title(poix, poiy, poi_label);
        }
 }
 sqlite3_reset(poisql.select_poi);