-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
66 lines (41 loc) · 2.24 KB
/
README
File metadata and controls
66 lines (41 loc) · 2.24 KB
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
60
61
62
63
64
65
66
All example data files are in the <<sample_input_files>> folder
Usage: See test.py for an example
1) Initialization
>> myMap = pyGmap(output_file)
output_file is where the map in HTML format will be created
2) Adding points to the map
>> myMap.add_points(input_file, pointOptions)
input_file:
contains locations in "<latitude> <longitude> <[color_info?]> <(extra_info+)?>" format
locations_I.txt is such a sample file with only the location information
pointOptions:
options are for color and extra information to be displayed for the point on map
The format of options is as follows: (True/False are boolean values)
[color_info=True/False, extra_info=True/False, polyline=True/False]
i) If color_info is True, then an extra column is required in the input file
where color codes are as follows
0 - 00FFFF (aqua)
1 - 99FF00 (flourescent green)
2 - blue
3 - CC9900 (brown)
4 - FF00FF (pink)
5 - FF0000 (red)
6 - FF9900 (orange)
7 - FFFF00 (yellow)
An example input is "locations_II.txt"
ii) If extra_info is True, then all columns after the color column (if exists),
will be concatenated into a string and used as a message for that points
marker(displayed as information box upon clicking marker in map)
An example input is "locations_color_extrainfo.txt" and "locations_extrainfo.txt"
eg: "myMap.add_points("./sample_input_files/locations_I.txt", [False, False])"
"myMap.add_points("./sample_input_files/locations_color.txt", [True, False])"
"myMap.add_points("./sample_input_files/locations_extrainfo.txt", [False, True])"
"myMap.add_points("./sample_input_files/locations_II_color_extrainfo.txt", [True, True])"
3) Adding polylines to the map
>> myMap.add_polyLine(input_file, pointOptions, polyLineOptions)
polyLineOptions:
[color as hex string, line opacity, line weight]
This adds lines between points in the order that they are in the input_file.
4) Termination
>> myMap.end_map()
output_file is ready for use