}
Handlebars.registerHelper({
+ shortOSMType: function(sType) {
+ if (sType === 'node') return 'N';
+ if (sType === 'way') return 'W';
+ if (sType === 'relation') return 'R';
+ return '';
+ },
isaddresses_unused: function (aAddressLine) {
return ((aAddressLine.isaddress && aAddressLine.isaddress === 'f') ? 'notused' : '');
},
return s && s[0].toUpperCase() + s.slice(1);
}
- if (aPlace.type && aPlace.type === 'yes') {
+ if (aPlace.type && aPlace.type === 'yes' && aPlace.class) {
return capitalize(aPlace.class.replace(/_/g, ' '));
+ } else if (aPlace.class) {
+ return capitalize(aPlace.type.replace(/_/g, ' '));
}
- return capitalize(aPlace.type.replace(/_/g, ' '));
+ return '';
},
formatSearchRank: function (iRank) {
// same as