Skip to content

Commit

Permalink
feature map added to features and feature go template
Browse files Browse the repository at this point in the history
  • Loading branch information
JLSchaap committed Nov 20, 2023
1 parent dfbdb3c commit 507826f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
22 changes: 20 additions & 2 deletions ogc/features/templates/feature.go.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,26 @@ <h2 class="title">{{ .Config.Title }} - {{ if and .Params.Metadata .Params.Metad
</table>
</div>

<div class="col-8" style="background-color: lightblue">
TODO: Display map with feature here
<div class="col4">


<link rel="stylesheet" type="text/css" href="view-component/styles.css">
<script type="text/javascript" src="view-component/main.js"></script>
<script type="text/javascript" src="view-component/polyfills.js"></script>
<script type="text/javascript" src="view-component/runtime.js"></script>
<app-feature-view
id="featuresmap"
>
</app-feature-view>

<script>
const jsonurl = new URL(window.location.href)
jsonurl.searchParams.set('f','json');
const map = document.getElementById('featuresmap');
map.setAttribute('items-url', jsonurl );
</script>

</div>
</div>

</section>
Expand Down
24 changes: 21 additions & 3 deletions ogc/features/templates/features.go.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
url.searchParams.set(name, value);
window.location.href = url.toString();
}

</script>

<hgroup>
Expand All @@ -33,9 +34,26 @@ <h5 class="card-header">
</div>
</div>
</div>
{{ $collId := .Params.CollectionID }}

<div class="col-4" >

<link rel="stylesheet" type="text/css" href="view-component/styles.css">
<script type="text/javascript" src="view-component/main.js"></script>
<script type="text/javascript" src="view-component/polyfills.js"></script>
<script type="text/javascript" src="view-component/runtime.js"></script>
<app-feature-view
id="featuresmap"
>
</app-feature-view>

<script>
const jsonurl = new URL(window.location.href)
jsonurl.searchParams.set('f','json');
const map = document.getElementById('featuresmap');
map.setAttribute('items-url', jsonurl );
</script>

<div class="col-4" style="background-color: lightblue">
TODO: Display map with features here
</div>

<div class="col-8">
Expand Down Expand Up @@ -63,7 +81,7 @@ <h5 class="card-header">
</ul>
</nav>

{{ $collId := .Params.CollectionID }}

{{ range $feat := .Params.Features }}
<table class="table table-striped">
<thead>
Expand Down

0 comments on commit 507826f

Please sign in to comment.