navit  0.5.6
About: NavIt is a car navigation system with GPS tracking and a routing engine.
  Fossies Dox: navit-0.5.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

item.h File Reference
#include <stdio.h>
#include "item_def.h"
#include "attr.h"
Include dependency graph for item.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  item_methods
 
struct  item_id
 
struct  item
 Represents an object on a map. More...
 
struct  item_range
 

Macros

#define ITEM2(x, y)   type_##y=x,
 
#define ITEM(x)   type_##x,
 
#define route_item_first   type_street_0
 
#define route_item_last   type_street_parking_lane
 
#define item_type_is_area(type)   ((type) >= type_area)
 
#define item_is_town(item)   ((item).type >= type_town_label && (item).type <= type_district_label_1e7)
 
#define item_is_district(item)   ((item).type >= type_district_label && (item).type <= type_district_label_1e7)
 
#define item_is_poly_place(item)   ((item).type >= type_poly_place1 && (item).type <= type_poly_place6)
 
#define item_is_point(item)   ((item).type < type_line)
 
#define item_is_custom_poi(item)   ((item).type >= type_poi_customg && (item).type < type_line)
 
#define item_is_street(item)
 
#define item_is_equal_id(a, b)   ((a).id_hi == (b).id_hi && (a).id_lo == (b).id_lo)
 
#define item_is_equal(a, b)   (item_is_equal_id(a,b) && (a).map == (b).map)
 
#define ITEM_ID_FMT   "(0x%x,0x%x)"
 
#define ITEM_ID_ARGS(x)   (x).id_hi,(x).id_lo
 

Enumerations

enum  item_type
 
enum  change_mode { change_mode_delete , change_mode_modify , change_mode_append , change_mode_prepend }
 

Functions

void item_create_hash (void)
 
void item_destroy_hash (void)
 
intitem_get_default_flags (enum item_type type)
 
void item_coord_rewind (struct item *it)
 Resets the "coordinate pointer" of an item. More...
 
int item_coords_left (struct item *it)
 Gets the number of coordinates left for this item. More...
 
int item_coord_get (struct item *it, struct coord *c, int count)
 Gets the next coordinates from an item. More...
 
int item_coord_set (struct item *it, struct coord *c, int count, enum change_mode mode)
 Sets coordinates of an item. More...
 
int item_coord_get_within_selection (struct item *it, struct coord *c, int count, struct map_selection *sel)
 Get coordinates within selection This function returns the coordinates of an item if at least one coordinate of that item is inside the selection. If the given buffer is too small, it returns the buffer size if at least one coordinate intersects with the selection, otherwise it returnes 0. More...
 
int item_coord_get_within_range (struct item *i, struct coord *c, int max, struct coord *start, struct coord *end)
 Gets all the coordinates of an item within a specified range. More...
 
int item_coord_get_pro (struct item *it, struct coord *c, int count, enum projection to)
 Gets the next coordinates from an item and reprojects them. More...
 
int item_coord_is_node (struct item *it)
 Whether the current coordinates of an item correspond to a node. More...
 
void item_attr_rewind (struct item *it)
 Resets the "attribute pointer" of an item. More...
 
int item_attr_get (struct item *it, enum attr_type attr_type, struct attr *attr)
 Gets the next matching attribute from an item. More...
 
int item_attr_set (struct item *it, struct attr *attr, enum change_mode mode)
 Sets an attribute of an item. More...
 
int item_type_set (struct item *it, enum item_type type)
 Sets the type of a map item. More...
 
struct itemitem_new (char *type, int zoom)
 
enum item_type item_from_name (const char *name)
 
char * item_to_name (enum item_type item)
 
unsigned int item_id_hash (const void *key)
 
int item_id_equal (const void *a, const void *b)
 
void item_id_from_ptr (struct item *item, void *id)
 Derive item id_lo and id_hi from pointer, considering pointer could be 32 or 64 bit wide but both ids are 32 bit. More...
 
struct item_hashitem_hash_new (void)
 
void item_hash_insert (struct item_hash *h, struct item *item, void *val)
 
int item_hash_remove (struct item_hash *h, struct item *item)
 
void * item_hash_lookup (struct item_hash *h, struct item *item)
 
void item_hash_destroy (struct item_hash *h)
 
int item_range_intersects_range (struct item_range *range1, struct item_range *range2)
 
int item_range_contains_item (struct item_range *range, enum item_type type)
 
void item_dump_attr (struct item *item, struct map *map, FILE *out)
 
void item_dump_filedesc (struct item *item, struct map *map, FILE *out)
 
void item_cleanup (void)
 

Variables

int default_flags []
 
struct item_range item_range_all
 
struct item busy_item
 An item indicating that the map driver is busy fetching more items. More...
 

Macro Definition Documentation

◆ ITEM

#define ITEM (   x)    type_##x,

Definition at line 31 of file item.h.

◆ ITEM2

#define ITEM2 (   x,
 
)    type_##y=x,

Definition at line 30 of file item.h.

◆ ITEM_ID_ARGS

#define ITEM_ID_ARGS (   x)    (x).id_hi,(x).id_lo

Definition at line 95 of file item.h.

◆ ITEM_ID_FMT

#define ITEM_ID_FMT   "(0x%x,0x%x)"

Definition at line 94 of file item.h.

◆ item_is_custom_poi

#define item_is_custom_poi (   item)    ((item).type >= type_poi_customg && (item).type < type_line)

Definition at line 55 of file item.h.

◆ item_is_district

#define item_is_district (   item)    ((item).type >= type_district_label && (item).type <= type_district_label_1e7)

Definition at line 52 of file item.h.

◆ item_is_equal

#define item_is_equal (   a,
 
)    (item_is_equal_id(a,b) && (a).map == (b).map)

Definition at line 66 of file item.h.

◆ item_is_equal_id

#define item_is_equal_id (   a,
 
)    ((a).id_hi == (b).id_hi && (a).id_lo == (b).id_lo)

Definition at line 65 of file item.h.

◆ item_is_point

#define item_is_point (   item)    ((item).type < type_line)

Definition at line 54 of file item.h.

◆ item_is_poly_place

#define item_is_poly_place (   item)    ((item).type >= type_poly_place1 && (item).type <= type_poly_place6)

Definition at line 53 of file item.h.

◆ item_is_street

#define item_is_street (   item)
Value:
(((item).type >= type_street_nopass && (item).type <= type_roundabout) \
|| (item).type == type_street_service \
|| ((item).type >= type_street_pedestrian && (item).type <= type_track_grass) \
|| (item).type == type_living_street \
|| (item).type == type_street_construction \
|| (item).type == type_path \
|| (item).type == type_street_parking_lane \
|| (item).type == type_footway )
static struct item_bin item
Definition: osm.c:52
Represents an object on a map.
Definition: item.h:115

Definition at line 56 of file item.h.

◆ item_is_town

#define item_is_town (   item)    ((item).type >= type_town_label && (item).type <= type_district_label_1e7)

Definition at line 51 of file item.h.

◆ item_type_is_area

#define item_type_is_area (   type)    ((type) >= type_area)

Definition at line 50 of file item.h.

◆ route_item_first

#define route_item_first   type_street_0

Definition at line 37 of file item.h.

◆ route_item_last

#define route_item_last   type_street_parking_lane

Definition at line 38 of file item.h.

Enumeration Type Documentation

◆ change_mode

Enumerator
change_mode_delete 
change_mode_modify 
change_mode_append 
change_mode_prepend 

Definition at line 70 of file item.h.

◆ item_type

enum item_type

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition at line 29 of file item.h.

Function Documentation

◆ item_attr_get()

int item_attr_get ( struct item it,
enum attr_type  attr_type,
struct attr attr 
)

Gets the next matching attribute from an item.

This function returns the next attribute matching attr_type from an item and advances the "attribute pointer" accordingly, so that at the next call the next attribute will be returned.

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

Parameters
[in]itThe map item whose attribute to retrieve. This must be the active item, i.e. the last one retrieved from the . There can only be one active item per .
[in]attr_typeThe attribute type to retrieve, or attr_any to retrieve the next attribute
[out]attrReceives the attribute retrieved
Returns
True on success, false on failure

Definition at line 407 of file item.c.

References item_methods::item_attr_get, item::meth, and item::priv_data.

Referenced by NGQPoint::_coordName(), NGQPoint::_setUrl(), binmap_search_by_index(), binmap_search_new(), binmap_search_street_by_place(), bookmarks_load_hash(), country_id_from_iso2(), destination_address(), display_add(), display_add_holes(), do_draw(), duplicate_test(), Backend::get_bookmarks(), get_icon(), Backend::get_pois(), NGQProxyBookmarks::getBookmarks(), NGQPoint::getInformation(), NGQPoint::getPOI(), graphics_process_selection_item(), gui_gtk_bookmarks_update(), gui_gtk_destinations_update(), gui_internal_cmd_bookmarks(), gui_internal_cmd_formerdests(), gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_cmd_pois(), gui_internal_cmd_pois_item_selected(), gui_internal_cmd_position_do(), gui_internal_cmd_replace_bookmarks_from_waypoints(), gui_internal_cmd_show_satellite_status(), gui_internal_cmd_view_attribute_details(), gui_internal_cmd_view_attributes(), gui_internal_cmd_view_in_browser(), gui_internal_compose_item_address_string(), gui_internal_dbus_signal(), gui_internal_poi_icon(), gui_internal_populate_route_table(), gui_internal_search_list_set_default_country(), gui_internal_select_waypoint(), gui_qml_dbus_signal(), housenumber_attr_get(), item_dump_attr(), item_get_heightline(), Java_org_navitproject_navit_NavitGraphics_getDefaultCountry(), map_filter_attr_get(), map_route_occluded_attr_get(), map_search_setup(), model_poi(), navigation_get_attr(), navigation_itm_new(), navigation_itm_update(), navigation_itm_ways_update(), navigation_update_idle(), navigation_way_init(), navit_speak(), navit_window_roadbook_update(), NGQProxySearch::NGQProxySearch(), osd_route_guard_init(), osd_speed_cam_draw(), osd_text_draw(), phase1_map(), popup_show_attrs(), read_former_destination_map_as_list(), request_navit_route_export_geojson(), request_navit_route_export_gpx(), request_navit_traffic_export_gpx(), route_get_destination_description(), route_graph_add_street(), route_graph_add_traffic_distortion(), search_list_common_new(), search_list_country_new(), search_list_get_result(), search_list_house_number_new(), search_list_street_new(), search_list_town_new(), NGQProxyBookmarks::setPoint(), statusbar_route_update(), street_get_data(), street_name_attr_get(), tm_find_item(), tracking_get_attr(), traffic_location_match_attributes(), traffic_location_populate_route_graph(), traffic_message_restore_segments(), traffic_point_match_attributes(), and traffic_point_match_segment_attributes().

◆ item_attr_rewind()

void item_attr_rewind ( struct item it)

Resets the "attribute pointer" of an item.

This function resets the "attribute pointer" of an item to point to the first attribute, so that at the next call to

int item_attr_get(struct item *it, enum attr_type attr_type, struct attr *attr)
Gets the next matching attribute from an item.
Definition: item.c:407

the first attribute will be returned.

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

Parameters
itThe map item whose pointer is to be reset. This must be the active item, i.e. the last one retrieved from the . There can only be one active item per .

Definition at line 387 of file item.c.

References item_methods::item_attr_rewind, item::meth, and item::priv_data.

Referenced by display_add(), display_add_holes(), gui_internal_cmd_pois(), map_filter_attr_rewind(), map_route_occluded_attr_rewind(), request_navit_traffic_export_gpx(), and route_graph_add_traffic_distortion().

◆ item_attr_set()

int item_attr_set ( struct item it,
struct attr attr,
enum change_mode  mode 
)

Sets an attribute of an item.

This function supports different modes:

  • change_mode_delete: Deletes the attribute
  • change_mode_modify: Replaces an attribute
  • change_mode_append: Appends an attribute
  • change_mode_prepend: Prepends an attribute

TODO which attribute is deleted/modified? The last one retrieved, the next one, the first matching one?

TODO where are attributes appended/prepended? Beginning/end or current position?

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

Parameters
itThe map item whose coordinates to retrieve. This must be the active item, i.e. the last one retrieved from the . There can only be one active item per .
attrTODO new attr, also store for old attr (delete/modify)? Required in delete mode (type of attr to delete)?
modeThe change mode, see description

Definition at line 433 of file item.c.

References item_methods::item_attr_set, item::meth, and item::priv_data.

Referenced by navit_cmd_map_item_set_attr(), and navit_populate_search_results_map().

◆ item_cleanup()

void item_cleanup ( void  )

Definition at line 120 of file item.c.

References default_flags_hash, and g_hash_table_destroy().

◆ item_coord_get()

int item_coord_get ( struct item it,
struct coord c,
int  count 
)

Gets the next coordinates from an item.

This function returns a list of coordinates from an item and advances the "coordinate pointer" by the number of coordinates returned, so that at the next call the next coordinates will be returned.

Coordinates are stored in the projection of the item's map. If you need them in a different projection, call

int item_coord_get_pro(struct item *it, struct coord *c, int count, enum projection to)
Gets the next coordinates from an item and reprojects them.
Definition: item.c:347

instead.

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

Parameters
itThe map item whose coordinates to retrieve. This must be the active item, i.e. the last one retrieved from the . There can only be one active item per .
cPoints to a buffer that will receive the coordinates. The buffer must be at least
count * sizeof(struct coord)
Definition: coord.h:34
bytes in size.
countThe number of coordinates to retrieve. Attempts to read past the end are handled gracefully and only the available number of coordinates is returned.
Returns
The number of coordinates actually retrieved and stored in
c
static struct pcoord c
Definition: popup.c:375

Definition at line 163 of file item.c.

References c, item_methods::item_coord_get, item::meth, and item::priv_data.

Referenced by binmap_get_estimated_boundaries(), binmap_search_get_item(), binmap_search_new(), binmap_search_street_by_place(), bookmarks_load_hash(), duplicate_test(), Backend::get_bookmarks(), NGQProxyBookmarks::getBookmarks(), graphics_process_selection_item(), gui_gtk_bookmarks_update(), gui_gtk_destinations_update(), gui_internal_cmd2_route_height_profile(), gui_internal_cmd_bookmarks(), gui_internal_cmd_formerdests(), gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_populate_route_table(), gui_internal_select_waypoint(), item_coord_get_pro(), item_coord_get_within_range(), item_coord_get_within_selection(), item_inside_poly_list(), map_filter_coord_get(), map_route_occluded_bbox(), map_selection_contains_item_rect(), model_poi(), navigation_itm_new(), navigation_way_get_max_delta(), navigation_way_init(), navit_add_former_destinations_from_file(), navit_zoom_to_route(), osd_route_guard_init(), osd_speed_cam_draw(), pedestrian_draw_arrows(), phase1_map(), popup_show_item(), popup_traffic_distortion(), read_former_destination_map_as_list(), request_navit_route_export_geojson(), request_navit_route_export_gpx(), request_navit_traffic_export_gpx(), route_graph_add_street(), route_graph_add_traffic_distortion(), route_graph_add_turn_restriction(), route_graph_remove_traffic_distortion(), search_house_number_coordinate(), search_list_street_new(), search_list_town_new(), NGQProxyBookmarks::setPoint(), street_get_data(), traffic_location_get_matching_points(), traffic_location_populate_route_graph(), and traffic_message_restore_segments().

◆ item_coord_get_pro()

int item_coord_get_pro ( struct item it,
struct coord c,
int  count,
enum projection  to 
)

Gets the next coordinates from an item and reprojects them.

This function returns a list of coordinates from an item and advances the "coordinate pointer" by the number of coordinates returned, so that at the next call the next coordinates will be returned.

Parameters
itThe map item whose coordinates to retrieve. This must be the active item, i.e. the last one retrieved from the . There can only be one active item per .
cPoints to a buffer that will receive the coordinates. The buffer must be at least
count * sizeof(struct coord)
bytes in size.
countThe number of coordinates to retrieve. Attempts to read past the end are handled gracefully and only the available number of coordinates is returned.
projectionThe projection into which the coordinates will be transformed
Returns
The number of coordinates actually retrieved and stored in
c

Definition at line 347 of file item.c.

References c, i, item_coord_get(), item::map, map_projection(), and transform_from_to().

Referenced by Backend::get_pois(), NGQPoint::getPOI(), gui_internal_cmd_delete_waypoint(), and gui_internal_cmd_pois().

◆ item_coord_get_within_range()

int item_coord_get_within_range ( struct item i,
struct coord c,
int  max,
struct coord start,
struct coord end 
)

Gets all the coordinates of an item within a specified range.

This will get all the coordinates of the item i, starting with start and ending with end, and return them in c, up to max coordinates.

If i does not contain the coordinates in start, no coordinates are retrieved and zero is returned.

If i contains the coordinates in start but not those in end, all coordinates beginning with start are retrieved, ending with the last coordinate of i or after max coordinates have been retrieved, whichever occurs first.

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

@important Make sure that c points to a buffer large enough to hold max coordinates!

Parameters
iThe item to get the coordinates of
cPointer to memory allocated for holding the coordinates
maxMaximum number of coordinates to return
startFirst coordinate to get
endLast coordinate to get
Returns
The number of coordinates stored in c

Definition at line 304 of file item.c.

References c, c1, i, item, item_coord_get(), map_rect_destroy(), map_rect_get_item_byid(), map_rect_new(), max, NULL, coord::x, and coord::y.

Referenced by route_path_add_item_from_graph(), and traffic_message_add_segments().

◆ item_coord_get_within_selection()

int item_coord_get_within_selection ( struct item it,
struct coord c,
int  count,
struct map_selection sel 
)

Get coordinates within selection This function returns the coordinates of an item if at least one coordinate of that item is inside the selection. If the given buffer is too small, it returns the buffer size if at least one coordinate intersects with the selection, otherwise it returnes 0.

If the return value equals count, the content of c is undefined.

Parameters
itrequested item
cpreallocated buffer for the result
countnumber of coordinates in c
selcurrent map selection
Returns
number of coordinates read to c, or count if out of space, or 0 if not intersecting, or <0 on read error.

Definition at line 228 of file item.c.

References bbox(), c, map_selection::c_rect, i, item_coord_get(), coord_rect::lu, map_selection::next, coord_rect::rl, map_selection::u, coord::x, pcoord::x, coord::y, and pcoord::y.

Referenced by do_draw().

◆ item_coord_is_node()

int item_coord_is_node ( struct item it)

Whether the current coordinates of an item correspond to a node.

TODO which coordinates? Last retrieved or next (to be) retrieved?

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

Parameters
itThe item
Returns
True on success, false on failure

Definition at line 369 of file item.c.

References item_methods::item_coord_is_node, item::meth, and item::priv_data.

Referenced by route_graph_add_street(), and traffic_location_populate_route_graph().

◆ item_coord_rewind()

void item_coord_rewind ( struct item it)

Resets the "coordinate pointer" of an item.

This function resets the "coordinate pointer" of an item to point to the first coordinate pair, so that at the next call to

int item_coord_get(struct item *it, struct coord *c, int count)
Gets the next coordinates from an item.
Definition: item.c:163

the first coordinates will be returned.

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

Parameters
itThe map item whose pointer is to be reset. This must be the active item, i.e. the last one retrieved from the . There can only be one active item per .

Definition at line 137 of file item.c.

References item_methods::item_coord_rewind, item::meth, and item::priv_data.

Referenced by binmap_search_get_item(), do_draw(), item_inside_poly_list(), map_filter_coord_rewind(), map_route_occluded_coord_rewind(), navigation_way_get_max_delta(), request_navit_traffic_export_gpx(), route_graph_add_street(), route_graph_add_traffic_distortion(), route_graph_add_turn_restriction(), route_graph_remove_traffic_distortion(), search_house_number_coordinate(), traffic_location_populate_route_graph(), and traffic_message_restore_segments().

◆ item_coord_set()

int item_coord_set ( struct item it,
struct coord c,
int  count,
enum change_mode  mode 
)

Sets coordinates of an item.

This function supports different modes:

  • change_mode_delete: Deletes the specified number of coordinates
  • change_mode_modify: Replaces existing coordinates with new ones
  • change_mode_append: Appends new coordinates
  • change_mode_prepend: Prepends new coordinates

TODO which coordinates are deleted/modified? Starting from the last coordinate retrieved, or the one after, or...?

TODO what if count in delete or modify mode is bigger then the number of coordinates left?

TODO where are coordinates appended/prepended? Beginning/end or current position?

This function is not safe to call after destroying the item's map rect, and doing so may cause errors with some map implementations.

Parameters
itThe map item whose coordinates to retrieve. This must be the active item, i.e. the last one retrieved from the . There can only be one active item per .
cTODO new coordinates, also store for old coordinates (delete/modify)? Required in delete mode?
countTODO number of coordinates to add, delete or modify?
modeThe change mode, see description

Definition at line 208 of file item.c.

References c, item_methods::item_coord_set, item::meth, and item::priv_data.

Referenced by navit_cmd_map_add_curr_pos(), and navit_populate_search_results_map().

◆ item_coords_left()

int item_coords_left ( struct item it)

Gets the number of coordinates left for this item.

This function returnes the number of coordinates left to get for this item. It does not change the "coordinates pointer".

Parameters
itThe map item
Returns
The number of coordinates left. -1 if not supported by the actual map.

Definition at line 176 of file item.c.

References item_methods::item_coords_left, item::meth, and item::priv_data.

Referenced by do_draw().

◆ item_create_hash()

void item_create_hash ( void  )

◆ item_destroy_hash()

void item_destroy_hash ( void  )

Definition at line 104 of file item.c.

References g_hash_table_destroy(), and NULL.

Referenced by config_load().

◆ item_dump_attr()

void item_dump_attr ( struct item item,
struct map map,
FILE *  out 
)

◆ item_dump_filedesc()

void item_dump_filedesc ( struct item item,
struct map map,
FILE *  out 
)

Definition at line 592 of file item.c.

Referenced by map_dump_filedesc(), and popup_item_dump().

◆ item_from_name()

◆ item_get_default_flags()

◆ item_hash_destroy()

void item_hash_destroy ( struct item_hash h)

Definition at line 567 of file item.c.

References g_free(), g_hash_table_destroy(), and item_hash::h.

Referenced by navigation_destroy(), and route_path_destroy().

◆ item_hash_insert()

void item_hash_insert ( struct item_hash h,
struct item item,
void *  val 
)

◆ item_hash_lookup()

void* item_hash_lookup ( struct item_hash h,
struct item item 
)

◆ item_hash_new()

struct item_hash* item_hash_new ( void  )

◆ item_hash_remove()

int item_hash_remove ( struct item_hash h,
struct item item 
)

◆ item_id_equal()

int item_id_equal ( const void *  a,
const void *  b 
)

Definition at line 509 of file item.c.

References item_id::id_hi, and item_id::id_lo.

◆ item_id_from_ptr()

void item_id_from_ptr ( struct item item,
void *  id 
)

Derive item id_lo and id_hi from pointer, considering pointer could be 32 or 64 bit wide but both ids are 32 bit.

Parameters
itreference to the item.
idpointer to derive item id from.
Returns
Nothing.

Definition at line 522 of file item.c.

References item::id_hi, item::id_lo, int, and long.

Referenced by rm_get_item().

◆ item_id_hash()

unsigned int item_id_hash ( const void *  key)

Definition at line 504 of file item.c.

References item_id::id_hi.

◆ item_new()

struct item* item_new ( char *  type,
int  zoom 
)

Definition at line 453 of file item.c.

Referenced by csv_create_item(), and map_new_csv().

◆ item_range_contains_item()

int item_range_contains_item ( struct item_range range,
enum item_type  type 
)

Definition at line 579 of file item.c.

References max, range::min, and geojson-to-bbox::type.

Referenced by map_selection_contains_item().

◆ item_range_intersects_range()

int item_range_intersects_range ( struct item_range range1,
struct item_range range2 
)

Definition at line 572 of file item.c.

References item_range::max.

Referenced by map_selection_contains_item_range().

◆ item_to_name()

◆ item_type_set()

int item_type_set ( struct item it,
enum item_type  type 
)

Sets the type of a map item.

Parameters
itThe item
typeThe new type for the item. Setting it to type_none is expected to delete item from the map.
Returns
Non-zero if this action is supported by the map and type is set successfully, 0 on error.

Definition at line 447 of file item.c.

References item_methods::item_type_set, item::meth, item::priv_data, and geojson-to-bbox::type.

Referenced by navit_populate_search_results_map(), and tm_item_unref().

Variable Documentation

◆ busy_item

struct item busy_item
extern

An item indicating that the map driver is busy fetching more items.

This is a “magic” item which may be returned by one of the query methods of a map driver. Receiving this item means that the map driver is currently busy fetching more items, and they can be retrieved at a later point in time.

Definition at line 1 of file item.c.

Referenced by do_draw(), map_binfile_open(), and map_rect_get_item_binfile().

◆ default_flags

◆ item_range_all

struct item_range item_range_all