Skip to content

Commit e421e69

Browse files
committed
Hacking around to introduce a sidebar
1 parent 21df745 commit e421e69

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

asset/js/MappingModule.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ const MappingModule = {
123123
if (!options.excludeFitBoundsControl) {
124124
map.addControl(new L.Control.FitBounds(features));
125125
}
126+
const sidebar = L.control.sidebar({
127+
autopan: true,
128+
closeButton: true,
129+
container: '#mapping-sidebar',
130+
position: 'left',
131+
}).addTo(map);
126132

127133
// Set the initial view to the geographical center of world.
128134
map.setView([20, 0], 2);

view/mapping/site/index/browse.phtml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ $query['mapping_basemap_provider'] = $query['mapping_basemap_provider'] ?? '';
2929
data-features-query="<?php echo $this->escapeHtml(json_encode($featuresQuery)); ?>">
3030
</div>
3131

32+
<div id="mapping-sidebar-wrapper">
33+
<p>sidebar</p>
34+
<div id="mapping-sidebar">
35+
</div>
36+
</div>
37+
3238
<form id="advanced-search">
3339
<?php echo $this->partial('common/advanced-search', ['query' => $query, 'resourceType' => 'item']); ?>
3440
<button type="submit"><?php echo $this->translate('Search Map'); ?></button>

0 commit comments

Comments
 (0)