Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Team 5 - Smart Towns
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rhys Evans
Team 5 - Smart Towns
Commits
1e155ad9
Commit
1e155ad9
authored
1 year ago
by
Rhys Evans
Browse files
Options
Downloads
Patches
Plain Diff
Very minor code cleanup
parent
2fd0f99d
No related branches found
No related tags found
1 merge request
!40
Resolve "As a user I would like to see a map containing all landmarks for a trail and a suggested path between them, so that I can easily follow the trail"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/Team5/SmartTowns/placeswithcoordinates/PlacesController.java
+3
-10
3 additions, 10 deletions
...m5/SmartTowns/placeswithcoordinates/PlacesController.java
with
3 additions
and
10 deletions
src/main/java/Team5/SmartTowns/placeswithcoordinates/PlacesController.java
+
3
−
10
View file @
1e155ad9
...
...
@@ -32,16 +32,10 @@ public class PlacesController {
@GetMapping
(
"/checkpoints"
)
public
ModelAndView
getLocationPages
(){
ModelAndView
modelAndView
=
new
ModelAndView
(
"landmarks/locationPage.html"
);
List
<
Location
>
locations
=
locationRepo
.
getAllLocation
();
// List<Location> approvedLocations = locationRepo.getApprovedLocations2(locations);
List
<
LocationsCoordinates
>
locCoords
=
placeRepo
.
getAllLocationCoords
();
List
<
Integer
>
locationIDIndex
=
new
ArrayList
<
Integer
>();
List
<
Location
>
locationCoordsWorkaround
=
new
ArrayList
<
Location
>();
for
(
LocationsCoordinates
coord:
locCoords
){
locationIDIndex
.
add
(
coord
.
getLocationID
()-
1
);
locationCoordsWorkaround
.
add
(
locations
.
get
(
coord
.
getLocationID
()-
1
));
}
modelAndView
.
addObject
(
"location"
,
locationCoordsWorkaround
);
List
<
Location
>
approvedLocations
=
locationRepo
.
getAllApprovedLocations
();
modelAndView
.
addObject
(
"location"
,
approvedLocations
);
modelAndView
.
addObject
(
"locationCoords"
,
locCoords
);
return
modelAndView
;
}
...
...
@@ -68,7 +62,6 @@ public class PlacesController {
}
String
trailName
=
trailsRepo
.
getTrailNameWithID
(
approvedLocations
.
get
(
locationID
).
getLocationTrailID
()).
replace
(
' '
,
'-'
).
trim
();
System
.
out
.
println
(
trailName
);
ModelAndView
modelAndView
=
new
ModelAndView
(
"fragments/locationPageFrags :: locationSection"
);
modelAndView
.
addObject
(
"locCoord"
,
locCoords
.
get
(
locationID
));
modelAndView
.
addObject
(
"trail"
,
trailName
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment