El 14/04/17 a las 10:55, Gerd Petermann escribió:
Hi all,

got no feedback on this:
http://gis.19327.n8.nabble.com/Possible-problem-with-global-search-index-since-r3875-tp5894963p5895076.html

The patch changes the default style so that road refs are no longer added to 
the road name, instead they are added as an additional label,

So, a way like this
http://www.openstreetmap.org/way/115469125
with name=Hamburger Straße, ref=B 105
will appear as "Hamburger Straße" in the map and will be found when searching for "B 
105".

Without the patch the road appears as "B 105 Hamburger Straße" (the B 105 in a 
highway shield) in the map
and as "Hamburger Straße (B105) or "Hamburger Straße" or "B 105 Hamburger 
Straße" (without shield) when searching for Hamburger.
I always found that very irritating.

Please comment or propose improvements.
Gerd

I'd prefer to display highway shields if the road has a ref, rather than name. See attached patch. Note that with both proposed patches the line
highway=* & ref=* { addlabel '${ref}' }
would add a duplicate entry to index for mayor roads having a ref. Perhaps it should be changed to (highway!=motorway | highway!=trunk | highway!=primary | highway!=secondary | highway!=tertiary) & highway=* & ref=* { addlabel '${ref}' }
Index: resources/styles/default/lines
===================================================================
--- resources/styles/default/lines	(revisión: 3894)
+++ resources/styles/default/lines	(copia de trabajo)
@@ -70,13 +70,6 @@
   {	name '${exit_hint} ${dest_hint}' | 	'${dest_hint}' | 		'${exit_hint}' }
 # end of rules for process-exits and process-destination options
 
-# Set highway names to include the reference if there is one
-highway=motorway { name '${ref|highway-symbol:hbox} ${name}' | '${ref|highway-symbol:hbox}' | '${name}' }
-highway=trunk {name '${ref|highway-symbol:hbox} ${name}' | '${ref|highway-symbol:hbox}' | '${name}'; addlabel '${name} (${ref})' }
-highway=primary {name '${ref|highway-symbol:box} ${name}' | '${ref|highway-symbol:box}' | '${name}'; addlabel '${name} (${ref})' }
-highway=secondary | highway=tertiary {name '${ref|highway-symbol:oval} ${name}' | '${ref|highway-symbol:oval}' | '${name}'; addlabel '${name} (${ref})' }
-highway=* {name '${name}' | '${ref}' }
-
 # Flag paved roads
 highway=* & (surface=asphalt | surface=paved | surface=sett | 
     surface=concrete | surface=concrete:lanes | surface=concrete:plates | 
@@ -233,6 +226,11 @@
 # don't add house numbers to unnamed or artifical bicycle ways
 mkgmap:bicycle=yes & (mkgmap:foot=no & mkgmap:car=no & mkgmap:street!=* | mkgmap:synthesised=yes) {set mkgmap:numbers=false}
 
+# Display highway shield for mayor roads if they have a ref and make them searchable by their name
+(highway=motorway | highway=trunk) & ref=* { name '${ref|highway-symbol:hbox}'; addlabel '${name}' }
+highway=primary & ref=* { name  '${ref|highway-symbol:box}'; addlabel '${name}' }
+(highway=secondary | highway=tertiary) & ref=* { name '${ref|highway-symbol:oval}'; addlabel '${name}' }
+
 name=* { name '${name}' }
 
 highway=* & ref=* { addlabel '${ref}' }
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to