전수민

font link

This diff is collapsed. Click to expand it.
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
23 <!-- Custom styles for this template--> 23 <!-- Custom styles for this template-->
24 <link href="css/sb-admin.css" rel="stylesheet"> 24 <link href="css/sb-admin.css" rel="stylesheet">
25 25
26 + <link href="https://fonts.googleapis.com/css?family=Do+Hyeon&amp;subset=korean" rel="stylesheet">
27 +
26 </head> 28 </head>
27 29
28 <body id="page-top"> 30 <body id="page-top">
......
1 +var entName = '';
2 +var entType = '';
3 +var entPhoto = '';
4 +var card = '';
5 +
1 function initMap() { 6 function initMap() {
2 // Try HTML5 geolocation. 7 // Try HTML5 geolocation.
3 if (navigator.geolocation) { 8 if (navigator.geolocation) {
...@@ -17,28 +22,28 @@ function initMap() { ...@@ -17,28 +22,28 @@ function initMap() {
17 } 22 }
18 } 23 }
19 24
20 -function searchPlace(str, placeType) { 25 +async function searchPlace(str, placeType) {
21 switch(placeType) { 26 switch(placeType) {
22 case 'food': 27 case 'food':
23 service.nearbySearch({ 28 service.nearbySearch({
24 location: pos, 29 location: pos,
25 radius: 500, 30 radius: 500,
26 type: [str] 31 type: [str]
27 - }, callback_foods); 32 + }, await callback_foods);
28 break; 33 break;
29 case 'entertainment': 34 case 'entertainment':
30 service.nearbySearch({ 35 service.nearbySearch({
31 location: pos, 36 location: pos,
32 radius: 500, 37 radius: 500,
33 type: [str] 38 type: [str]
34 - }, callback_entertainment); 39 + }, await callback_entertainment);
35 break; 40 break;
36 case 'room': 41 case 'room':
37 service.nearbySearch({ 42 service.nearbySearch({
38 location: pos, 43 location: pos,
39 radius: 500, 44 radius: 500,
40 type: [str] 45 type: [str]
41 - }, callback_rooms); 46 + }, await callback_rooms);
42 break; 47 break;
43 default: 48 default:
44 break; 49 break;
...@@ -48,6 +53,7 @@ function searchPlace(str, placeType) { ...@@ -48,6 +53,7 @@ function searchPlace(str, placeType) {
48 function callback_entertainment(results, status) { 53 function callback_entertainment(results, status) {
49 if (status === google.maps.places.PlacesServiceStatus.OK) { 54 if (status === google.maps.places.PlacesServiceStatus.OK) {
50 for (var i = 0; i < results.length; i++) { 55 for (var i = 0; i < results.length; i++) {
56 + console.log(results[i]);
51 result_entertainment.push(result[i]) 57 result_entertainment.push(result[i])
52 } 58 }
53 } 59 }
...@@ -62,4 +68,29 @@ function callback_entertainment(results, status) { ...@@ -62,4 +68,29 @@ function callback_entertainment(results, status) {
62 // const image = "default" 68 // const image = "default"
63 // const rating = result.rating; 69 // const rating = result.rating;
64 // const lng = result.geometry.viewport.ea.j; 70 // const lng = result.geometry.viewport.ea.j;
65 - const lat =result.geometry.viewport.la.j; 71 + // const lat =result.geometry.viewport.la.j;
72 +
73 +
74 +for(var i=0; i<entList.size(); i++){
75 + entName = result_entertainment[i][name];
76 + entType = result_entertainment[i][category];
77 + // if(result_entertainment[i][photo]==undefined){
78 + // entPhoto = "noimage.png";
79 + // }
80 + // else{
81 + // entPhoto = entList[i][photo];
82 + }
83 +
84 + var tmp = '<div class="col-xl-6 col-sm-6 mb-3">'+
85 + '<div class="card text-white bg-light o-hidden h-100">'+
86 + '<div class="card-body"' + ' style="height:350px; background-image:url(' + "'2.jpg'" + '); background-size: 100% 100%; background-repeat: no-repeat;">' + // place photo
87 + // '<div class="mr-5" id="nameDiv">'+entName+'</div>'+ // place name
88 + // '<div class="mr-5" id="typeDiv">'+entType+'</div>'+ // place type
89 + '<div class="mr-5" id="nameDiv">가게이름</div>'+ // place name
90 + '<div class="mr-5" id="typeDiv">타입</div>'+ // place type
91 + '</div>'+
92 + '</div>'+
93 + '</div>';
94 + //card+=tmp;
95 +
96 +document.getElementById("cardBody").innerHTML=tmp;
...\ No newline at end of file ...\ No newline at end of file
......