osmid: search_params.get('osmid'),
keywords: search_params.get('keywords'),
addressdetails: 1,
- hierarchy: 1,
+ hierarchy: (search_params.get('hierarchy') === '1' ? 1 : 0),
group_hierarchy: 1,
polygon_geojson: 1,
format: 'json'
if (api_request_params.place_id || (api_request_params.osmtype && api_request_params.osmid)) {
fetch_from_api('details', api_request_params, function (aFeature) {
- var context = { aPlace: aFeature };
+ var context = { aPlace: aFeature, base_url: location.search };
render_template($('main'), 'detailspage-template', context);
{{/each}}
{{/if}}
+ {{> partial_h2 'Parent Of'}}
{{#if aPlace.hierarchy}}
- {{> partial_h2 'Parent Of'}}
{{#each aPlace.hierarchy as |lines type|}}
{{> partial_h3 type}}
{{> partial_details_one_row}}
{{/each}}
{{/each}}
+ {{else}}
+ <tr>
+ <td>
+ <a class="btn btn-default btn-xs" href="{{base_url}}&hierarchy=1">display child places</a>
+ </td>
+ </tr>
{{/if}}
{{tooManyHierarchyLinesWarning aPlace}}
</tbody>