|
44 | 44 | c = color.ok |
45 | 45 | if (!a.tags['building:levels']) c = color.warn; |
46 | 46 | if (!a.tags['addr:housenumber']) c = color.error; |
| 47 | + if (a.tags['addr:city'] != 'Зеленоград') |
47 | 48 | if (!a.tags['addr:street']) c = color.error; |
48 | 49 | if (!a.entrances.length) c = color.error; |
49 | 50 | return c |
|
145 | 146 | c = color.warn; |
146 | 147 | comment += '<br>Нужно проставить номера квартир <b>addr:flats</b>'; |
147 | 148 | } |
| 149 | + else |
| 150 | + { |
| 151 | + c = color.warn; |
| 152 | + comment += '<br>Нужно проставить номер подъезда <b>ref</b> и номера квартир <b>addr:flats</b>'; |
| 153 | + } |
148 | 154 |
|
149 | 155 | comment = '<br><i>'+comment+'</i>'; |
150 | 156 |
|
|
204 | 210 | else |
205 | 211 | st += 'Этажей: <i>'+a.tags['building:levels']+'</i><br>' |
206 | 212 |
|
207 | | - if (!a.tags['addr:housenumber']) |
208 | | - st += 'Укажите номер дома <b>addr:housenumber</b><br>' |
209 | | - else |
210 | | - st += 'Номер дома: <i>'+a.tags['addr:housenumber']+'</i><br>' |
| 213 | + if (a.tags['addr:city']) |
| 214 | + st += 'Город: <i>'+a.tags['addr:city']+'</i><br>' |
211 | 215 |
|
| 216 | + if (a.tags['addr:city'] != 'Зеленоград') // у Зеленограда нумерация без улицы |
212 | 217 | if (!a.tags['addr:street']) |
213 | 218 | st += 'Укажите улицу <b>addr:street</b><br>' |
214 | 219 | else |
215 | 220 | st += 'Улица: <i>'+a.tags['addr:street']+'</i><br>' |
216 | 221 |
|
| 222 | + if (!a.tags['addr:housenumber']) |
| 223 | + st += 'Укажите номер дома <b>addr:housenumber</b><br>' |
| 224 | + else |
| 225 | + st += 'Номер дома: <i>'+a.tags['addr:housenumber']+'</i><br>' |
| 226 | + |
217 | 227 | if (!a.entrances.length) |
218 | 228 | st += 'В жилом доме не найдено ни одного подъезда!<br>' |
219 | 229 | else |
220 | 230 | { |
221 | 231 | st += 'Подъездов '+a.entrances.length+': ' |
222 | 232 | a.entrances.sort(function(x,y){ return x.ref - y.ref }) |
223 | 233 | for (i=0; i<a.entrances.length; i++) |
224 | | - st += '<i title="Подъезд №'+a.entrances[i].ref+'">' + a.entrances[i]['addr:flats'] + '</i> ' |
| 234 | + st += '<i title="Подъезд №'+a.entrances[i].ref+'">' + (a.entrances[i]['addr:flats'] || '?') + '</i> ' |
225 | 235 | st += '<br>' |
226 | 236 | } |
227 | 237 |
|
|
0 commit comments