Skip to content

Commit

Permalink
#15 latitude and longitude of Company gotten. Styles applied.
Browse files Browse the repository at this point in the history
  • Loading branch information
Treblast committed Mar 16, 2017
1 parent 1a815a1 commit a8e1e70
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
21 changes: 19 additions & 2 deletions src/main/webapp/app/entities/contact/contact.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
ContactController.$inject = ['$scope', '$state', 'Contact', 'Company'];

function ContactController ($scope, $state, Contact, Company) {

var vm = this;

vm.contacts = [];
Expand All @@ -17,7 +18,9 @@
"name": "",
"phone": "",
"email": "",
"cif": ""
"cif": "",
"lat": "",
"long": ""
};

loadAll();
Expand All @@ -32,8 +35,22 @@
vm.companyInfo.phone = vm.companies[0].phone;
vm.companyInfo.email = vm.companies[0].email;
vm.companyInfo.cif = vm.companies[0].cif;
vm.companyInfo.lat = vm.companies[0].location.latitude;
vm.companyInfo.long = vm.companies[0].location.longitude;

$("#map").gmap3({
map: {
options: {
center: [vm.companyInfo.lat,vm.companyInfo.long],
zoom: 15,
scrollwheel: false
}
},
marker:{
latLng: [vm.companyInfo.lat,vm.companyInfo.long]
}
});
});
}

}
})();
12 changes: 12 additions & 0 deletions src/main/webapp/content/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2202,3 +2202,15 @@ video#bgvid {
@media (min-width: 1200px) {

}

/*
==================
[13. CONTACT]
==================
*/

/* MAP */
#map {
border: 1px solid #6b6e80;
margin-bottom: 50px;
}
20 changes: 0 additions & 20 deletions src/main/webapp/content/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,26 +120,6 @@ $(document).ready(function(){
$('[rel="tooltip"]').tooltip();


/* map contact */
$("#map").gmap3({
map: {
options: {
center: [41.3579495,1.9810097],
zoom: 12,
scrollwheel: false
}
},
marker:{
latLng: [41.3579495,1.9810097]/*,
options: {
icon: new google.maps.MarkerImage(
"https://dl.dropboxusercontent.com/u/29545616/Preview/location.png",
new google.maps.Size(48, 48, "px", "px")
)
}*/
}
});


/* carousel single */
$('#slider-property').carousel({
Expand Down

0 comments on commit a8e1e70

Please sign in to comment.