return s && s[0].toUpperCase() + s.slice(1);
}
- if (aPlace.type && aPlace.type === 'yes' && aPlace.class) {
- return capitalize(aPlace.class.replace(/_/g, ' '));
+ if (aPlace.type && aPlace.type === 'yes' && aPlace.category) {
+ return capitalize(aPlace.category.replace(/_/g, ' '));
}
if (aPlace.type) {
return capitalize(aPlace.type.replace(/_/g, ' '));
// Any over 15 are invalid data in OSM anyway
function formatAdminLevel(iLevel) {
- return (iLevel < 15 ? iLevel : '');
+ return (iLevel && iLevel < 15 ? iLevel : '');
}
function formatDistance(fDistance, bInMeters) {