logo separator

[mkgmap-dev] Style include files

From WanMil wmgcnfg at web.de on Fri Aug 31 18:06:48 BST 2012

Hi Steve,

thanks! I've made a basic test and it worked fine for me.

I think it would be nice to be able to include files from other styles. 
One example are the rules for address tagging to set the mkgmap:country 
etc. tags. They are required in each style that should create indexed maps.

WanMil

> Hi
>
> In the style-include branch (pre-built jar files available at
> http://www.mkgmap.org.uk/snapshots/) you can now include files
> from the same style.
>
> The syntax is:
>
> 	include "filename";
>
> You can put this anywhere where you can start a new rule. The contents
> of the file "filename" are included at that point in the file, just as
> you would expect.
>
> You can (and probably should) put the files in a subdirectory and
> access it as:
>
> 	include "inc/filename";
>
> A forward slash should be used, even on windows (untested - will fix if
> it doesn't work).
>
> You don't strictly need the quotes around the filename if it is only
> letters, but its best to always use them since common filename
> characters such as '.' and '/' will require the quotes anyway.
>
> An included file can include another file and this can be arbitrarily
> nested. The name of the file is always relative to the top of the
> style and not relative to the location of the file that includes it.
> So if you have a sub-directory 'inc' with files 'first' and 'second'
> and 'inc/first' wants to include 'second' then it is written as:
> 	include "inc/second";
> and not:
> 	include "second";
>
> You can't yet include files from other styles, maybe that is not
> really so useful, what do you think?
>
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>




More information about the mkgmap-dev mailing list