-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.ego.go
43 lines (37 loc) · 1.22 KB
/
map.ego.go
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
// Generated by ego.
// DO NOT EDIT
//line map.ego:1
package main
import "fmt"
import "html"
import "io"
import "context"
func (m *Map) renderPolylines(w io.Writer, t *Track) {
//line map.ego:6
_, _ = io.WriteString(w, "\n<svg width=\"")
//line map.ego:6
_, _ = io.WriteString(w, html.EscapeString(fmt.Sprint(m.w)))
//line map.ego:6
_, _ = io.WriteString(w, "\" height=\"")
//line map.ego:6
_, _ = io.WriteString(w, html.EscapeString(fmt.Sprint(m.h)))
//line map.ego:6
_, _ = io.WriteString(w, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <style type=\"text/css\" >\n <![CDATA[\n .segment { fill: none; stroke: blue; stroke-width: 3 }\n .segment:hover { stroke: red }\n ]]>\n </style>\n ")
//line map.ego:13
for i := range t.gpx.Segments {
//line map.ego:14
_, _ = io.WriteString(w, "\n <polyline class=\"segment\" points=\"")
//line map.ego:14
_, _ = io.WriteString(w, html.EscapeString(fmt.Sprint(m.polylinePoints(t.Segment(i)))))
//line map.ego:14
_, _ = io.WriteString(w, "\"/>\n\t")
//line map.ego:15
}
//line map.ego:16
_, _ = io.WriteString(w, "\n</svg>\n")
//line map.ego:17
}
var _ fmt.Stringer
var _ io.Reader
var _ context.Context
var _ = html.EscapeString