Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSLogic
Commits
2c5e22c2
Commit
2c5e22c2
authored
1 year ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: Now using a more detailed polygon service for municipality search
parent
5ab84f07
Branches
Branches containing commit
No related tags found
1 merge request
!174
Bugfix: Now using a more detailed polygon service for municipality search
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/webapp/templates/modules/barkbeetle/barkbeetleSeasonTrapsiteForm.ftl
+3
-2
3 additions, 2 deletions
...lates/modules/barkbeetle/barkbeetleSeasonTrapsiteForm.ftl
with
3 additions
and
2 deletions
src/main/webapp/templates/modules/barkbeetle/barkbeetleSeasonTrapsiteForm.ftl
+
3
−
2
View file @
2c5e22c2
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
<script type="text/javascript" src="/js/3rdparty/moment.min.js"></script>
<script type="text/javascript" src="/js/3rdparty/moment.min.js"></script>
<script type="text/javascript">
<script type="text/javascript">
var theForm = document.getElementById("$
{
formId
}
");
var theForm = document.getElementById("$
{
formId
}
");
const municipalityPolygonServiceUrl = "https://proxy03.nibio.no/municipality_cache_ws/kommuneListe/N5/4326";
$(document).ready(function()
{
$(document).ready(function()
{
//
M
ake
sure
that
there
is
a
date
picker
present
for
HTML
5
//
M
ake
sure
that
there
is
a
date
picker
present
for
HTML
5
//
date
input
fields
//
date
input
fields
...
@@ -73,7 +74,7 @@
...
@@ -73,7 +74,7 @@
})
;
})
;
//
G
et
C
ounty
and
municipality
//
G
et
C
ounty
and
municipality
fetch
(
"/corsproxy/
https://proxy1.nibio.no/municipality_cache_ws/kommuneListe/N2000/4326/
?lon="
+
lon
+
"&lat="
+
lat
)
fetch
(
"/corsproxy/
"
+
municipalityPolygonServiceUrl
+
"
?lon="
+
lon
+
"&lat="
+
lat
)
.then
(
response
=>
response
.json
())
.then
(
response
=>
response
.json
())
.then
(
municInfo
=>
{
.then
(
municInfo
=>
{
if
(
municInfo
.length
==
0
)
if
(
municInfo
.length
==
0
)
...
@@ -97,7 +98,7 @@
...
@@ -97,7 +98,7 @@
.catch
(
error
=>
console
.info
(
error
))
;
.catch
(
error
=>
console
.info
(
error
))
;
//
G
et
C
ounty
and
municipality
from
before
2018
//
G
et
C
ounty
and
municipality
from
before
2018
fetch
(
"/corsproxy/
https://proxy1.nibio.no/municipality_cache_ws/kommuneListe/N2000/4326
/2017?lon="
+
lon
+
"&lat="
+
lat
)
fetch
(
"/corsproxy/
/"
+
municipalityPolygonServiceUrl
+
"
/2017?lon="
+
lon
+
"&lat="
+
lat
)
.then
(
response
=>
response
.json
())
.then
(
response
=>
response
.json
())
.then
(
municInfo
=>
{
.then
(
municInfo
=>
{
if
(
municInfo
.length
==
0
)
if
(
municInfo
.length
==
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment