while (SQLITE_ROW == sqlite3_step(_stmt_select_poi)) {
lat1 = sqlite3_column_double(_stmt_select_poi, 0);
lon1 = sqlite3_column_double(_stmt_select_poi, 1);
- gchar *poi_label = g_utf8_strdown(sqlite3_column_text(_stmt_select_poi, 3), -1);
+ gchar *poi_label = sqlite3_column_text(_stmt_select_poi, 3);
gchar *cat_label = g_utf8_strdown(sqlite3_column_text(_stmt_select_poi, 6), -1);
latlon2unit(lat1, lon1, unitx, unity);
poiy = unit2bufy(unity);
pixbuf=map_poi_get_icon(cat_label);
+ g_free(cat_label);
if (!pixbuf) {
/* No icon for POI or for category - draw default. */
poiy - (gint) (1.5f * _draw_width),
3 * _draw_width,
3 * _draw_width);
- if (_zoom<3)
- map_poi_title(poix, poiy + 4, poi_label);
+ if (_zoom<3 && poi_label)
+ map_poi_title(poix - 10, poiy + _draw_width, poi_label);
} else {
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, -1, -1, GDK_RGB_DITHER_NONE,
+ poix - gdk_pixbuf_get_width(pixbuf) / 2,
+ poiy - gdk_pixbuf_get_height(pixbuf) / 2,
+ -1, -1, GDK_RGB_DITHER_NONE,
0, 0);
}
-
- g_free(poi_label);
- g_free(cat_label);
}
sqlite3_reset(_stmt_select_poi);