Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iTasks-SDK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
73
Issues
73
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
6b80b3f2
Commit
6b80b3f2
authored
May 07, 2019
by
Steffen Michels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend Leaflet example with option to add window
parent
132937a4
Pipeline
#22591
passed with stage
in 9 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
Examples/GIS/LeafletMapExample.icl
Examples/GIS/LeafletMapExample.icl
+13
-1
No files found.
Examples/GIS/LeafletMapExample.icl
View file @
6b80b3f2
...
...
@@ -3,7 +3,7 @@ import iTasks
import
iTasks
.
Extensions
.
GIS
.
Leaflet
import
iTasks
.
Extensions
.
GIS
.
LeafletNavalIcons
import
iTasks
.
UI
.
Definition
import
Data
.
List
import
Data
.
List
,
Text
.
HTML
playWithMaps
::
Task
()
playWithMaps
=
withShared
{
defaultValue
&
icons
=
shipIcons
}
(\
m
->
...
...
@@ -38,6 +38,7 @@ where
,(
"Polygon from current markers"
,
addMarkerConnectingPolygon
m
)
,(
"Circle at cursor position"
,
addCircleAtCursor
m
)
,(
"Rectangle around current perspective"
,
addRectangleAroundCurrentPerspective
m
)
,(
"Some window"
,
addWindow
m
)
]
addRandomMarker
m
...
...
@@ -93,4 +94,15 @@ where
withRectangleAroundCurrentPerspective
Nothing
objects
=
objects
withRectangleAroundCurrentPerspective
(
Just
bounds
)
objects
=
objects
++
[
Rectangle
{
rectangleId
=
LeafletObjectID
"RECT_PERSPECTIVE"
,
bounds
=
bounds
,
editable
=
True
,
style
=
[]}]
addWindow
m
=
upd
(\
l
=:{
LeafletMap
|
objects
}
->
{
LeafletMap
|
l
&
objects
=
[
Window
window
:
objects
]})
m
where
window
=
{
windowId
=
LeafletObjectID
"WINDOW"
,
initPosition
=
{
x
=
100
,
y
=
100
}
,
title
=
"Test Window"
,
content
=
H1Tag
[]
[
Text
"This is test content!"
]
,
relatedMarkers
=
[(
LeafletObjectID
"home"
,
[])]
}
Start
world
=
doTasks
playWithMaps
world
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment