156 |
int type = semi?ICON_CACHE_TYPE_SEMI:ICON_CACHE_TYPE; |
int type = semi?ICON_CACHE_TYPE_SEMI:ICON_CACHE_TYPE; |
157 |
|
|
158 |
GdkPixbuf *icon = icon_get(type, cache->type); |
GdkPixbuf *icon = icon_get(type, cache->type); |
159 |
|
GdkPixbuf *over = NULL; |
160 |
|
|
161 |
|
if(cache->mine) over = icon_get(type, 14); |
162 |
|
else if(cache->found) over = icon_get(type, 12); |
163 |
|
else if(cache->notes) { |
164 |
|
if(cache->notes->found) over = icon_get(type, 12); |
165 |
|
else if(cache->notes->override) over = icon_get(type, 11); |
166 |
|
else over = icon_get(type, 13); |
167 |
|
} |
168 |
|
|
169 |
|
pos_t *pos = &cache->pos; |
170 |
/* check if there's also an overwritten coordinate */ |
/* check if there's also an overwritten coordinate */ |
171 |
if(cache->notes && cache->notes->override) { |
if(cache->notes && cache->notes->override) |
172 |
GdkPixbuf *over = icon_get(type, 11); |
pos = &cache->notes->pos; |
173 |
|
|
174 |
|
if(!isnan(pos->lat) && !isnan(pos->lon)) { |
175 |
osm_gps_map_add_image(OSM_GPS_MAP(map), |
osm_gps_map_add_image(OSM_GPS_MAP(map), |
176 |
cache->notes->pos.lat, cache->notes->pos.lon, icon); |
pos->lat, pos->lon, icon); |
177 |
|
if(over) |
178 |
osm_gps_map_add_image(OSM_GPS_MAP(map), |
osm_gps_map_add_image(OSM_GPS_MAP(map), |
179 |
cache->notes->pos.lat, cache->notes->pos.lon, over); |
pos->lat, pos->lon, over); |
|
} else { |
|
|
if(!isnan(cache->pos.lat) && !isnan(cache->pos.lon)) |
|
|
osm_gps_map_add_image(OSM_GPS_MAP(map), |
|
|
cache->pos.lat, cache->pos.lon, icon); |
|
180 |
} |
} |
181 |
} |
} |
182 |
|
|