diff --git a/src/main/java/org/springframework/samples/kidclinic/doctor/DoctorController.java b/src/main/java/org/springframework/samples/kidclinic/doctor/DoctorController.java index 88f0a8f43..cfc99d4e9 100644 --- a/src/main/java/org/springframework/samples/kidclinic/doctor/DoctorController.java +++ b/src/main/java/org/springframework/samples/kidclinic/doctor/DoctorController.java @@ -48,6 +48,18 @@ class DoctorController { return "doctors/doctorList"; } + @RequestMapping(value = { "/map.html" }) + public String showDoctorLists(Map model) { + // Here we are returning an object of type 'Doctors' rather than a collection of Doctor + // objects so it is simpler for Object-Xml mapping + Doctors doctors = new Doctors(); + doctors.getDoctorList().addAll(this.doctors.findAll()); + model.put("doctors", doctors); + return "mapList"; + } + + + @RequestMapping(value = { "/doctors.json", "/doctors.xml" }) public @ResponseBody Doctors showResourcesVetList() { // Here we are returning an object of type 'Doctors' rather than a collection of Doctor diff --git a/src/main/resources/templates/doctors/doctorList.html b/src/main/resources/templates/doctors/doctorList.html index bab58028b..f1ccb408c 100644 --- a/src/main/resources/templates/doctors/doctorList.html +++ b/src/main/resources/templates/doctors/doctorList.html @@ -29,6 +29,8 @@ - +

This is a test let me know if this works.

+ + diff --git a/src/main/resources/templates/fragments/layout.html b/src/main/resources/templates/fragments/layout.html index a9ab00422..0c378d789 100755 --- a/src/main/resources/templates/fragments/layout.html +++ b/src/main/resources/templates/fragments/layout.html @@ -47,6 +47,7 @@
  • Reviews
  • Errors
  • +
  • Map
  • diff --git a/src/main/resources/templates/fragments/map.html b/src/main/resources/templates/fragments/map.html new file mode 100644 index 000000000..7bb893b94 --- /dev/null +++ b/src/main/resources/templates/fragments/map.html @@ -0,0 +1,10 @@ + + + + + +

    Map

    +

    We are currently curating our Map.

    + + + \ No newline at end of file diff --git a/src/main/resources/templates/map.html b/src/main/resources/templates/map.html new file mode 100644 index 000000000..c58cc463f --- /dev/null +++ b/src/main/resources/templates/map.html @@ -0,0 +1,53 @@ + + + + + +

    Map

    +

    We are currently curating our Map

    + + + + + + + + + + + + + + + + + + + + +
    NameAddressCityStateSpecialties
    none
    + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/mapList.html b/src/main/resources/templates/mapList.html new file mode 100644 index 000000000..e069ccc98 --- /dev/null +++ b/src/main/resources/templates/mapList.html @@ -0,0 +1,106 @@ + + + + + + +

    Map

    + +
    + + +
    + +
    + See Doctors + See Your Address +
    + + + + + +
    + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/parents/parentDetails.html b/src/main/resources/templates/parents/parentDetails.html index 0d94c61d1..084dccced 100644 --- a/src/main/resources/templates/parents/parentDetails.html +++ b/src/main/resources/templates/parents/parentDetails.html @@ -1,7 +1,8 @@ + + th:replace="~{fragments/layout :: layout (~{::body},'parents')}" > @@ -136,6 +137,8 @@ // }) // } + + function codeAddress() { var address1 = /*[[${parent.address}]]*/; var city = (/*[[${parent.city}]]*/); @@ -147,6 +150,7 @@ var address = addressHelpHelp.concat(state); console.log(/*[[${parent.state}]]*/) console.log(/*[[${parent.address}]]*/); + geocoder.geocode( { 'address': address}, function(results, status) { if (status == 'OK') { map.setCenter(results[0].geometry.location); @@ -221,12 +225,13 @@ - - +//////////////////////////////////////////////////////////////////////////////////// +
    + + + + + + + +