Markup for address search

Folks: Is there any documentation for how to mark up areas so that mkgmap (with help from MapSource) can make the streets searchable? So far I gather that you need to mark areas (containing streets) with: 1) A relation of "type=multiploygon" with at least one way (with the "role" of "outer") where the way has minimal tags of: "is_in=", "place=", "place_name=" plus (optionally) "postal_code=". It seems that "landuse=residential" can also be present, but I think this only affects the shading on a rendered map, nothing to do with address searching. Alternatively: 2) A relation of "type=multiploygon" where the relation also carries tags of: "is_in=", "place=", "place_name=" plus (optionally) "postal_code=". As above, it seems that "landuse=residential" can also be present, but I think this only affects the shading on a rendered map, nothing to do with address searching. The relation needs at least one way (with the "role" of "outer") where the way doesn't need any other tags. Alternatively: 3) A relation of "type=boundary" with other tags of "admin_level=", "boundary=administrative" and "name=". It must contain at least one way (whose "role" can be missing) where the way has minimal tags of: "is_in=", "place=", "place_name=" plus (optionally) "postal_code=". As above, it seems that "landuse=residential" can also be present, but I think this only affects the shading on a rendered map, nothing to do with address searching. Alternatively: 4) A relation of "type=boundary" with other tags of "admin_level=", "boundary=administrative" and "name=" plus tags of: "is_in=", "place=", "place_name=" plus (optionally) "postal_code=". As above, it seems that "landuse=residential" can also be present, but I think this only affects the shading on a rendered map, nothing to do with address searching. The relation needs at least one way (whose "role" can be missing) where the way doesn't need any other tags. Am I anywhere close? Steve

Folks:
Is there any documentation for how to mark up areas so that mkgmap (with help from MapSource) can make the streets searchable?
Hi Steve, my answer is a bit unpolite but I think your question is wrong. Please don't markup areas so that they can be searched with mkgmap! (Don't tag for renderers!) Better tag your countries, regions and cities as described in the OSM wiki: * http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative * http://wiki.openstreetmap.org/wiki/Key:is_in * http://wiki.openstreetmap.org/wiki/Addr * etc. Then you come to the question: How can I use this data in mkgmap for address search? In the style file you have to add special mkgmap tags which assign the address fields of your POI, line or polygon. The tags to be assigned are: mkgmap:country mkgmap:region etc. (see http://wiki.openstreetmap.org/wiki/Mkgmap/help/usage#Address_search_options for a complete list) The default style file contains some rules how to do that, e.g.: 1. mkgmap:country!=* & mkgmap:admin_level2=* { set mkgmap:country='${mkgmap:admin_level2}' } 2. mkgmap:country!=* & addr:country=* { set mkgmap:country='${addr:country}' } 3. mkgmap:country!=* & is_in:country=* { set mkgmap:country='${is_in:country}' } Rule 1 assigns the country name to the value of the admin-level 2. If rule 1 doesn't match rule 2 assigns it to the addr:country tag. If rule 2 doesn't match either the country name is taken from the is_in:country tag (rule 3). The mkgmap:admin_levelX tags are added by mkgmap if the parameter location-autofill contains the value bounds (--location-autofill=bounds,is_in,nearest). See http://wiki.openstreetmap.org/wiki/Mkgmap/help/usage#Address_search_options. Additionally you have to provide mkgmap with precompiled bounds which you can download at http://www.navmaps.eu/index.php/developers/bound or create them yourself (http://wiki.openstreetmap.org/wiki/Mkgmap/help/usage#Using_precompiled_bound...). So to get address search working you should have the following mkgmap parameters set: --index --bounds=<directory of your precompiled bounds> --location-autofill=bounds,nearest,is_in WanMil
participants (2)
-
Steve Hosgood
-
WanMil