logo separator

[mkgmap-dev] overlays file for POIs

From Felix Hartmann extremecarver at googlemail.com on Sat Jan 16 22:15:51 GMT 2010


On 16.01.2010 22:45, Marko Mäkelä wrote:
> On Sat, Jan 16, 2010 at 07:37:01PM +0100, Felix Hartmann wrote:
>    
>> Hi, would it be possible to integrate an overlays file for POIs? The
>> current overlays file (inside the style-file) only works for polylines.
>> I would like to do the same for POIs. (I don't think it is needed for
>> polygons, but maybe someone has creative ideas in his head and would
>> like to have it for polygons too).
>>
>> I don't manage to program this, but I hope that it proves easy as we
>> already have that functionality for lines. Would be great if it could be
>> integrated. I tried to do it by using "continue" but this does not work.
>> (continue will only work if the key or value is different).
>>      
> Could the "continue" action be made to work?  Such rules might be easier
> to follow than overlay definitions, but I guess it is a matter of taste.
>    
I like that the "continue" command will not continue for the same key on 
one object so:
keya=123 {set;do...} [continue]
keya=123 {do...}      [continue] ... will not be used
keyb=123                 []

the overlays howerever just duplicates something to a second or third 
id, which is useful for combinations.

Both for me serve a different purpose. There is some overlap, but some 
things can only be done using "continue" (or better it saves you many 
lines in your style-file), while duplicating can only be done by the 
overlays file.
> As far as I can tell from the source code, the following pieces of code
> implement the line overlays:
>
> StyleImpl.getOverlays(LineAdder)
>   * called by StyledConverter constructor
>   * wraps calls to the passed LineAdder.addLine() by OverlayReader.addLine()
>   * the passed LineAdder would be this one defined in StyledConverter:
> 	private LineAdder lineAdder = new LineAdder() {
> 		public void add(MapLine element) {
> 			if (element instanceof MapRoad)
> 				collector.addRoad((MapRoad) element);
> 			else
> 				collector.addLine(element);
> 		}
> 	};
>
> You would have to implement something similar around StyledConverter.addPoint()
> or StyledConverter.collector.addPoint().
>
> I find your example use case of symbols for public transportation stops
> extremely useful.  I hope that someone will make this happen.  Sorry,
> there are only so many hours in my days, and the top priority on my "roadmap"
> is to create multi-layered maps.
>
> By the way, house numbers and bike route numbers could be useful to put on
> user-selectable map layers.  Couldn't you actually create the numbers as
> text labels?  Could the addresslayer_style of
> http://wiki.openstreetmap.org/wiki/DE:All_in_one_Garmin_Map
> be doing exactly that?
>    
No that is in my eyes rubbish and trying to circumvent that mkgmap 
cannot yet correctly write the address search. It makes it possible to 
search for addresses as POI and places a POI for each address (yes you 
see a number, but you cannot controll whether Mapsource/GPS shows a text 
or not), but can never replace a fully working address index.

I'm not really a fan of using a map being composed by several mapsets, 
if it can be put into one layer or mapset, as setting tiles transparent 
often causes problems and mapsource can only display one mapset at a time.

My example for the numbers would be always shown at the resolutions 
specifed and not at the mercy of what Mapsource/GPS deems important 
(label shown, label dropped).
> Best regards,
>
> 	Marko
> _______________________________________________
> 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