Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProgGis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Jakob Severin Steffensen Hjelseth
ProgGis
Commits
aade9604
Commit
aade9604
authored
1 year ago
by
Jakob Severin Steffensen Hjelseth
Browse files
Options
Downloads
Patches
Plain Diff
Begynne så smått med layerControl
parent
3333a4b7
Loading
Loading
2 merge requests
!20
Resolve "Lage sidebar for kartlagene"
,
!19
Resolve "Lage sidebar for kartlagene"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
index.html
+2
-2
2 additions, 2 deletions
index.html
javascript/geoJSON.js
+0
-3
0 additions, 3 deletions
javascript/geoJSON.js
javascript/leafletLayerControl.js
+9
-0
9 additions, 0 deletions
javascript/leafletLayerControl.js
with
11 additions
and
5 deletions
index.html
+
2
−
2
View file @
aade9604
...
...
@@ -156,12 +156,12 @@
<script
src=
"javascript/openFileExplorer.js"
></script>
<script
src=
"javascript/fileHandler.js"
></script>
<script
src=
"javascript/geoJSON.js"
></script>
<script
src=
"/js/leaflet-0.7.2/leaflet.ajax.min.js"
></script>
<script
src=
"javascript/leafletLayerControl.js"
></script>
<!-- Imported js -->
<script
src=
"/js/leaflet-0.7.2/leaflet.ajax.min.js"
></script>
<!-- <script src="https://unpkg.com/shpjs@latest/dist/shp.js"></script> -->
</body>
...
...
This diff is collapsed.
Click to expand it.
javascript/geoJSON.js
+
0
−
3
View file @
aade9604
...
...
@@ -13,9 +13,6 @@ fetch("javascript/exampleData/TrainingCenters.geojson").then(function(response)
layer2
.
addData
(
data
);
})
document
.
getElementById
(
"
layers
"
).
innerHTML
+=
layer1
.
name
+
"
<br>
"
;
document
.
getElementById
(
"
layers
"
).
innerHTML
+=
layer2
.
name
;
// Hvordan slå av og på et lag:
/*
...
...
This diff is collapsed.
Click to expand it.
javascript/leafletLayerControl.js
+
9
−
0
View file @
aade9604
var
htmlObject
=
layer1
.
getContainer
();
var
a
=
document
.
getElementById
(
"
layers
"
);
function
setParent
(
el
,
newParent
)
{
newParent
.
appendChild
(
el
);
}
setParent
(
htmlObject
,
a
);
\ No newline at end of file
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