logo separator

[mkgmap-dev] Markup for address search

From WanMil wmgcnfg at web.de on Fri Nov 18 16:48:10 GMT 2011

> 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:
etc. (see 
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 
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 

So to get address search working you should have the following mkgmap 
parameters set:
--index --bounds=<directory of your precompiled bounds> 


More information about the mkgmap-dev mailing list