Created
November 27, 2016 08:23
-
-
Save MBAustin/ad3c26b3991e1eb38c6b573d7bc00e8d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Plot selected lines on map | |
| */ | |
| private void plotLines() { | |
| StationManager stationManager = StationManager.getInstance(); | |
| Station stationObject = stationManager.getSelected(); | |
| if (stationObject != null) { | |
| for (Line line : stationObject.getLines()) { | |
| int color = line.getColour(); | |
| Set<Branch> setOfLineBranches = line.getBranches(); | |
| for (Branch lineBranch : setOfLineBranches) { | |
| Polyline plotLine = new Polyline(mapView.getContext()); | |
| List<LatLon> listOfLatLonFromBranch = lineBranch.getPoints(); | |
| List<GeoPoint> geoPointConversions = new ArrayList<>(); | |
| for (LatLon latlonObject : listOfLatLonFromBranch) { | |
| double branchLat = latlonObject.getLatitude(); | |
| double branchLon = latlonObject.getLongitude(); | |
| GeoPoint geoPointConversion = new GeoPoint(branchLat, branchLon); | |
| geoPointConversions.add(geoPointConversion); | |
| } | |
| plotLine.setWidth(getLineWidth(mapView.getZoomLevel())); | |
| plotLine.setPoints(geoPointConversions); | |
| plotLine.setColor(color); | |
| tubeLineOverlays.add(plotLine); | |
| updateOverlays(); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment