#2 code from SVN mapsymbols