I am mapping all relevant amenities with --add-pois-to-areas to a POI, that’s working fine.
But when I try to change the name for such a POI, eg
tourism=hotel { name ‘${name} (${stars}-Stars)’ | ‘${name}’ | ‘${stars}-Stars’ } [0x2B01 resolution 22]
only hotels which are originaly placed as point will get this name.
All hotels placed as polygon and converted to a point will keep their unchanged name.
Also when I’m using the continue command, it’s not working for POIs mapped from areas.
I have added an equivalent rule in the polygons file now.
The name replacement is now working, but I have still a problem with the continue command.
I am trying to place an overlay icon over the original garmin icon.
The garmin icon shall be common to all POIs of this type, the overlay icon shall be unique to a single brand.
All car_repair with name ADAC shall get an overlay icon of 0x7003 (I have some more overlay icons for other brands).
Additional there shall be an icon of 0x2F0D which is also part of the Garmin POI-List.
This is working fine for all car_repairs tagged as point.
car_repairs tagged as polygon are getting the polygon 0x0B and the POI 0x2F0D, but no overlay_icon 0x7003.
Is there any error in my commands, or is there is bug in the continue statement?
The output behaviour you describe doesn’t really make sense. As you describe it, mkgmap is skipping the first points rule for “polygon” POIs and just applying the second one. But if it’s applying the second points rule for your “polygon” POIs then there’s no reason why it isn’t also matching the first rule as the key/tag combination to match is the same.
Some thoughts:
Are you sure you’ve quoted the rules in the right order?
Try using continue rather than continue with_actions
The style files are processed in a specific order (http://www.cferrero.net/maps/mkgmap_tiddlywiki.html#styleFile). For your POI overlays to work properly, you would need the --add-pois-to-areas switch (and associated polygon rules) to be processed before mkgmap starts processing the points style file. I’m not sure if mkgmap works like that, but it may well not.
Try putting the second points rule[1] first, and adding the continue statement to it.
When the processing order is really like that: 5.points, 6.lines, 7.polygons
then I don’t know how --add-pois-to-areas really works.
The polygon adds a poi but the points style was already processed.
I have tried with_actions and with only continue but it makes no difference.
I have also tried other orders, but this is the only way that POIs are added (only the overlay is missing now).
You are right, it makes no sense that POIs are working and overlays not.
So I hope there is someone who is using a similar logic to add brand specific icons to e.g. fuel-stations, shops, …
and has solved this for polygon POIs also.
Otherwise it can also be an unwanted behavior of mkgmap.
Processing this on a very simple OSM file containing one polygon tagged shop=car_repair and one point tagged shop=car_repair, using the --add-pois-to-areas switch, I see:
One polygon of type 0x12, with a 0x2c09 POI in the centre
Two POIs consisting of one of type 0x2c09 overlain on top of another of type 0x2c14
So this is a bug in --add-pois-to-areas: it somehow skips the first rule match in the points file and goes straight to the second. Would you like to post this to the mkgmap-dev mailing list?