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
0254f4fe
Commit
0254f4fe
authored
1 year ago
by
Rhys Evans
Browse files
Options
Downloads
Patches
Plain Diff
Began adding map iframe for each trail
parent
94ea2461
No related branches found
Branches containing commit
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
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/resources/data.sql
+1
-1
1 addition, 1 deletion
src/main/resources/data.sql
src/main/resources/templates/landmarks/trailsPage.html
+36
-10
36 additions, 10 deletions
src/main/resources/templates/landmarks/trailsPage.html
src/test/java/testTwo.java
+52
-52
52 additions, 52 deletions
src/test/java/testTwo.java
with
89 additions
and
63 deletions
src/main/resources/data.sql
+
1
−
1
View file @
0254f4fe
...
...
@@ -74,7 +74,7 @@ insert into locationCoordinates(locationID, locationCoordsLat, locationCoordsLon
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
3
,
51
.
575372
,
-
3
.
219186
);
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
4
,
51
.
576363
,
-
3
.
220712
);
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
9
,
51
.
57239
,
-
3
.
21992
);
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
10
,
51
.
572
29
,
-
3
.
2193
7
);
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
10
,
51
.
572
30
,
-
3
.
2193
8
);
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
13
,
51
.
57168
,
-
3
.
21861
);
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
14
,
51
.
57465
,
-
3
.
22022
);
insert
into
locationCoordinates
(
locationID
,
locationCoordsLat
,
locationCoordsLong
)
value
(
17
,
51
.
61117
,
-
3
.
10198
);
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/templates/landmarks/trailsPage.html
+
36
−
10
View file @
0254f4fe
...
...
@@ -8,6 +8,33 @@
<main>
<div
th:each=
"trail, indexValue:${trails}"
>
<H1
th:text=
"*{trail.getTrailName()}"
></H1>
<div
th:if=
"*{trail.getTrailName()=='Caerphilly Castle Trail'}"
>
<iframe
width=
"600"
height=
"400"
frameborder=
"0"
scrolling=
"yes"
marginheight=
"0"
marginwidth=
"0"
src=
"https://www.google.com/maps/dir/51.57623,-3.21910/51.575372,-3.219186/51.576363,-3.220712//@11z"
>
</iframe>
</div>
<div
th:if=
"*{trail.getTrailName()=='Caerphilly Pub Trail'}"
>
<iframe
width=
"600"
height=
"400"
frameborder=
"0"
scrolling=
"yes"
marginheight=
"0"
marginwidth=
"0"
th:src=
"'https://www.google.com/maps/dir/51.57239,-3.21992/51.57230,-3.21938//@11z'"
>
</iframe>
</div>
<div
th:each=
"locationCoord, indexValue2:${locationCoords}"
>
<div
th:if=
"${locations[indexValue2.index].getLocationTrailID()==trail.getTrailsId()}"
>
<li>
...
...
@@ -16,16 +43,15 @@
</li>
<iframe
width=
"600"
height=
"400"
frameborder=
"0"
scrolling=
"yes"
marginheight=
"0"
marginwidth=
"0"
th:src=
"'https://maps.google.com/maps?q='+ ${coord.getLocationCoordsLat()} +','+ ${coord.getLocationCoordsLong()} +'&hl=en&z=20&output=embed'"
>
</iframe>
<!-- <iframe-->
<!-- width="600"-->
<!-- height="400"-->
<!-- frameborder="0"-->
<!-- scrolling="yes"-->
<!-- marginheight="0"-->
<!-- marginwidth="0"-->
<!-- th:src="'https://maps.google.com/maps?q='+ ${coord.getLocationCoordsLat()} +','+ ${coord.getLocationCoordsLong()} +'&hl=en&z=20&output=embed'">-->
<!-- </iframe>-->
...
...
This diff is collapsed.
Click to expand it.
src/test/java/testTwo.java
+
52
−
52
View file @
0254f4fe
//package Team5.SmartTowns.data;
//import org.junit.platform.commons.util.Preconditions;
//
import
Team5.SmartTowns.data.Location
;
import
Team5.SmartTowns.data.LocationRepository
;
import
Team5.SmartTowns.data.LocationRepositoryJDBC
;
import
org.junit.jupiter.api.BeforeAll
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.jdbc.core.RowMapper
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
//@SpringBootTest
public
class
testTwo
{
private
JdbcTemplate
jdbcTemplate
;
private
LocationRepositoryJDBC
locationRepositoryJDBC
;
private
RowMapper
<
Location
>
locationMapper
;
@Autowired
private
LocationRepository
locationRepository
;
@Autowired
public
void
LocationRepositoryJDBC
(
JdbcTemplate
jdbc
){
this
.
jdbcTemplate
=
jdbc
;
locationRepositoryJDBC
=
new
LocationRepositoryJDBC
(
jdbc
);
}
@BeforeAll
public
static
void
setUp
(){
locationRepository
=
new
LocationRepositoryJDBC
.
getAllLocation
();
// locationRepository = (LocationRepositoryJDBC) locationRepository.getAllLocation();
}
@Test
public
void
test
(){
int
aa
=
1
;
assertEquals
(
1
,
aa
);
}
}
//
//package Team5.SmartTowns.data;
//
//
//import org.junit.platform.commons.util.Preconditions;
//
//
//
import Team5.SmartTowns.data.Location;
//
import Team5.SmartTowns.data.LocationRepository;
//
import Team5.SmartTowns.data.LocationRepositoryJDBC;
//
import org.junit.jupiter.api.BeforeAll;
//
import org.junit.jupiter.api.Test;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.boot.test.context.SpringBootTest;
//
import org.springframework.jdbc.core.JdbcTemplate;
//
import org.springframework.jdbc.core.RowMapper;
//
//
import static org.junit.jupiter.api.Assertions.assertEquals;
//
//
//
//@SpringBootTest
//
public class testTwo {
//
//
private JdbcTemplate jdbcTemplate;
//
private LocationRepositoryJDBC locationRepositoryJDBC;
//
//
private RowMapper<Location> locationMapper;
//
//
@Autowired
//
private LocationRepository locationRepository;
//
//
//
@Autowired
//
public void LocationRepositoryJDBC(JdbcTemplate jdbc){
//
this.jdbcTemplate = jdbc;
//
locationRepositoryJDBC = new LocationRepositoryJDBC(jdbc);
//
}
//
//
//
@BeforeAll
//
public static void setUp(){
//
locationRepository = new LocationRepositoryJDBC.getAllLocation();
//
// locationRepository = (LocationRepositoryJDBC) locationRepository.getAllLocation();
//
}
//
//
@Test
//
public void test(){
//
int aa=1;
//
assertEquals(1,aa);
//
//
}
//
//
//
//
}
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