-
Notifications
You must be signed in to change notification settings - Fork 49
/
FeaturesDemoModel.kt
59 lines (53 loc) · 1.82 KB
/
FeaturesDemoModel.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package jetbrains.livemap.demo
import jetbrains.datalore.base.values.Color
import jetbrains.datalore.visualization.base.canvas.CanvasControl
import jetbrains.livemap.LiveMapSpec
import jetbrains.livemap.api.*
import jetbrains.livemap.demo.model.Cities.BOSTON
import jetbrains.livemap.demo.model.Cities.MOSCOW
import jetbrains.livemap.demo.model.Cities.SPB
import jetbrains.livemap.demo.model.GeoObject
class FeaturesDemoModel(canvasControl: CanvasControl): DemoModelBase(canvasControl) {
override fun createLiveMapSpec(): LiveMapSpec {
return basicLiveMap {
layers {
points {
point {
lon = 0.0
lat = 0.0
shape = 21
radius = 10.0
fillColor = Color.MAGENTA
}
}
paths {
path {
geodesic = true
coordinates = listOf(BOSTON, SPB).map(GeoObject::geoCoord)
strokeWidth = 1.0
}
}
polygons {
polygon {
coordinates = listOf(BOSTON, SPB, MOSCOW).map(GeoObject::geoCoord)
fillColor = Color.LIGHT_CYAN
}
}
hLines {
line {
lon = MOSCOW.lon
lat = MOSCOW.lat
lineDash = listOf(8.0, 8.0)
}
}
vLines {
line {
lon = BOSTON.lon
lat = BOSTON.lat
lineDash = listOf(8.0, 8.0)
}
}
}
}
}
}