March 2019
Intermediate to advanced
336 pages
9h 9m
English
In the main method, the map layout is created by invoking the NewMapLayout method. Places are instantiated and added to the map layout. Then, the links are added between places:
// main methodfunc main() { var mapLayout *MapLayout mapLayout = NewMapLayout() var root Place = Place{"Algeria", 3, 28} var netherlands Place = Place{"Netherlands", 5.75, 52.5} var korea Place = Place{"Korea", 124.1, -8.36} var tunisia Place = Place{"Tunisia", 9, 34} mapLayout.AddPlace(root) mapLayout.AddPlace(netherlands) mapLayout.AddPlace(korea) mapLayout.AddPlace(tunisia) mapLayout.AddLink(root, netherlands) mapLayout.AddLink(root,korea) mapLayout.AddLink(root,tunisia) var singapore Place = Place{"Singapore",103.8,1.36} var uae Place = Place{"UAE",54,24} ...Read now
Unlock full access