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
8e630d66
Commit
8e630d66
authored
1 year ago
by
Rhys Evans
Browse files
Options
Downloads
Patches
Plain Diff
Furthjer work initilaizsing town lat/long feature for map embedding
parent
a41839a2
No related branches found
Branches containing commit
No related tags found
1 merge request
!30
Resolve "As a user I would like to see a map of the landmarks, so that I can figure out where to go"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/Team5/SmartTowns/data/LocationsCoordinatesRepositoryJDBC.java
+360
-2
360 additions, 2 deletions
...5/SmartTowns/data/LocationsCoordinatesRepositoryJDBC.java
src/main/resources/schema.sql
+11
-0
11 additions, 0 deletions
src/main/resources/schema.sql
with
371 additions
and
2 deletions
src/main/java/Team5/SmartTowns/data/LocationsCoordinatesRepositoryJDBC.java
+
360
−
2
View file @
8e630d66
...
...
@@ -5,7 +5,9 @@ import org.springframework.jdbc.core.JdbcTemplate;
import
org.springframework.jdbc.core.RowMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
@Repository
public
class
LocationsCoordinatesRepositoryJDBC
implements
LocationsCoordinatesRepository
{
...
...
@@ -50,9 +52,365 @@ public class LocationsCoordinatesRepositoryJDBC implements LocationsCoordinatesR
// public static void before2() {
// locationRepo = new locationRepositoryJDBC(jdbc); }
public
void
approveLocationAndAddCoords
(
String
town
,
String
longCoords
,
String
latCoords
){
// need list too
// Method used to approve and add locations with associated coordinates. List<Location> unapprovedLocations
public
void
approveLocationAndAddCoords
(
int
locationID
,
String
longCoords
,
String
latCoords
){
// need list too
String
// List<String> unapprovedLocationTowns = new ArrayList<String>();
// for (int i=1;unapprovedLocations.size()>i;i++ ){
// if (Objects.equals(unapprovedLocations.get(i).getLocationPlace(), town)){
// List<Location> needApprovalList = .unapprovedLocations();
}
}
//
// unapproved list
// if matches name, approve
// add long/lat coords
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/schema.sql
+
11
−
0
View file @
8e630d66
...
...
@@ -81,3 +81,14 @@ create table if not exists locationCoordinates
)
engine
=
InnoDB
;
drop
table
if
exists
townsWithTrails
;
create
table
if
not
exists
townsWithTrails
(
townID
bigint
auto_increment
primary
key
,
townName
varchar
(
128
),
townCoordsLong
varchar
(
128
),
townCoordsLat
varchar
(
128
)
)
engine
=
InnoDB
;
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