송효섭

favicon.ico updated

This diff is collapsed. Click to expand it.
No preview for this file type
<!DOCTYPE html>
<html>
<head>
<head>
<title>
<%= title%>
<script>
......@@ -8,30 +9,32 @@
</script>
</title>
<link rel="stylesheet" href='/stylesheets/mapPage_style.css' type="text/css">
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="icon" href="/images/favicon.ico">
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
<script>
Kakao.init('0678e32dab56db1c52ac63ab4ccb7663')
function sendLink(id){
var data=[];
function sendLink(id) {
var data = [];
var strData = "<%= data %>";
var splitData=strData.split(',');
for(var i=0;i<splitData.length;i+=5){
data.push([Number(splitData[i]),splitData[i+1],Number(splitData[i+2]),Number(splitData[i+3]),splitData[i+4],splitData[i+5]]);
var splitData = strData.split(',');
for (var i = 0; i < splitData.length; i += 5) {
data.push([Number(splitData[i]), splitData[i + 1], Number(splitData[i + 2]), Number(splitData[i + 3]), splitData[i + 4], splitData[i + 5]]);
}
var index;
for(var i=0;i<data.length;i++){
for (var i = 0; i < data.length; i++) {
console.log(data.length);
if(data[i][0]===id){
index=i;
if (data[i][0] === id) {
index = i;
Kakao.Link.sendDefault({
objectType: 'location',
address: `${data[i][5]}`,
addressTitle: `${data[i][1]}`,
content:{
content: {
title: `공연 이름: ${data[i][1]}\n공연 위치: ${data[i][5]}`,
description: `${splitData[i+2]}`,
imageUrl:'https://ifh.cc/g/aEvr86.png',
link:{
description: `${splitData[i + 2]}`,
imageUrl: 'https://ifh.cc/g/aEvr86.png',
link: {
mobileWebUrl: 'http://naver.com',
webUrl: 'http://naver.com',
},
......@@ -51,8 +54,9 @@
}
</script>
</head>
<body>
</head>
<body>
<header>
<div class="nav-bar">
<img src="../images/icon.png" alt="" class="logo">
......@@ -72,9 +76,8 @@
</div>
<div class= "box1">
<div id="map"
style="
<div class="box1">
<div id="map" style="
position: absolute;
border-radius: 5%;
width:500px; height:60vh;
......@@ -89,7 +92,7 @@
<div style="position:absolute; top: 110vh; width:100%; color: #000;">
<h2 style="text-align:center;"> 찾은 공연 </h2>
</div>
<table class="table" >
<table class="table">
<tr>
<th>id</th>
<th>행사 이름</th>
......@@ -106,22 +109,23 @@
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=a3386042ab2e0550ea06d265855b452c"></script>
<script>
var dataContainer=document.getElementById('map-data');
var mapContainer = document.getElementById('map'), // 지도를 표시할 div
<script type="text/javascript"
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=a3386042ab2e0550ea06d265855b452c"></script>
<script>
var dataContainer = document.getElementById('map-data');
var mapContainer = document.getElementById('map'), // 지도를 표시할 div
mapOption = {
center: new kakao.maps.LatLng(33.450701, 126.570667), // 지도의 중심좌표
level: 10 // 지도의 확대 레벨
};
var map = new kakao.maps.Map(mapContainer, mapOption); // 지도를 생성합니다
var map = new kakao.maps.Map(mapContainer, mapOption); // 지도를 생성합니다
// HTML5의 geolocation으로 사용할 수 있는지 확인합니다
if (navigator.geolocation) {
// HTML5의 geolocation으로 사용할 수 있는지 확인합니다
if (navigator.geolocation) {
// GeoLocation을 이용해서 접속 위치를 얻어옵니다
navigator.geolocation.getCurrentPosition(function(position) {
navigator.geolocation.getCurrentPosition(function (position) {
var lat = position.coords.latitude, // 위도
lon = position.coords.longitude; // 경도
......@@ -129,23 +133,23 @@ if (navigator.geolocation) {
var locPosition = new kakao.maps.LatLng(lat, lon), // 마커가 표시될 위치를 geolocation으로 얻어온 좌표로 생성합니다
message = '<div style="padding:5px;">내 위치</div>'; // 인포윈도우에 표시될 내용입니다
displayMarker(locPosition, message);
function funcA(){
function funcA() {
alert("hi");
}
var data=[];
var data = [];
var strData = "<%= data %>";
var splitData=strData.split(',');
for(var i=0;i<splitData.length;i+=5){
data.push([Number(splitData[i]),splitData[i+1],Number(splitData[i+2]),Number(splitData[i+3]),splitData[i+4],splitData[i+5]]);
var splitData = strData.split(',');
for (var i = 0; i < splitData.length; i += 5) {
data.push([Number(splitData[i]), splitData[i + 1], Number(splitData[i + 2]), Number(splitData[i + 3]), splitData[i + 4], splitData[i + 5]]);
}
for (var i = 0; i < data.length; i++) {
var latgap = (lat - data[i][2]) * 110;
var longap = (lon - data[i][3]) * 91;
var cal = latgap * latgap + longap * longap;
if (cal <= 1600) {
var locP=new kakao.maps.LatLng(data[i][2], data[i][3]),
var locP = new kakao.maps.LatLng(data[i][2], data[i][3]),
message = `${data[i][0]} : ${data[i][1]}`;
displayShowMarker(locP,message);
displayShowMarker(locP, message);
var row = `<tr>
<td> ${data[i][0]}</td>
<td> ${data[i][1]}</td>
......@@ -155,7 +159,7 @@ if (navigator.geolocation) {
<td> <input type="button" onclick="sendLink(${data[i][0]})" value="전송하기"> </td>
</tr>`
dataContainer.innerHTML+=row;
dataContainer.innerHTML += row;
}
}
//
......@@ -164,21 +168,21 @@ if (navigator.geolocation) {
});
} else { // HTML5의 GeoLocation을 사용할 수 없을때 마커 표시 위치와 인포윈도우 내용을 설정합니다
} else { // HTML5의 GeoLocation을 사용할 수 없을때 마커 표시 위치와 인포윈도우 내용을 설정합니다
var locPosition = new kakao.maps.LatLng(33.450701, 126.570667),
message = 'geolocation을 사용할수 없어요..'
displayMarker(locPosition, message);
}
function displayShowMarker(locPosition,message){
}
function displayShowMarker(locPosition, message) {
var imageSrc = "https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/markerStar.png";
var imageSize = new kakao.maps.Size(24, 35);
// 마커 이미지를 생성합니다
var markerImage = new kakao.maps.MarkerImage(imageSrc, imageSize);
// 마커 이미지를 생성합니다
var markerImage = new kakao.maps.MarkerImage(imageSrc, imageSize);
var marker = new kakao.maps.Marker({
map: map,
position: locPosition,
......@@ -189,9 +193,9 @@ var markerImage = new kakao.maps.MarkerImage(imageSrc, imageSize);
// 지도 중심좌표를 접속위치로 변경합니다
map.setCenter(locPosition);
}
// 지도에 마커와 인포윈도우를 표시하는 함수입니다
function displayMarker(locPosition, message) {
}
// 지도에 마커와 인포윈도우를 표시하는 함수입니다
function displayMarker(locPosition, message) {
// 마커를 생성합니다
var marker = new kakao.maps.Marker({
......@@ -204,8 +208,8 @@ function displayMarker(locPosition, message) {
// 인포윈도우를 생성합니다
var infowindow = new kakao.maps.InfoWindow({
content : iwContent,
removable : iwRemoveable
content: iwContent,
removable: iwRemoveable
});
// 인포윈도우를 마커위에 표시합니다
......@@ -213,10 +217,10 @@ function displayMarker(locPosition, message) {
// 지도 중심좌표를 접속위치로 변경합니다
map.setCenter(locPosition);
}
</script>
}
</script>
<div style="position:absolute; top:200vh"> _ </div>
</body>
<div style="position:absolute; top:200vh"> _ </div>
</body>
</html>
\ No newline at end of file
......
......@@ -8,6 +8,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href='/stylesheets/mapPage_style.css' type="text/css">
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="icon" href="/images/favicon.ico">
</head>
<body>
......
......@@ -3,6 +3,8 @@
<head>
<title>Culture Gallery</title>
<link rel="stylesheet" href='/stylesheets/login_style.css' type="text/css">
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="icon" href="/images/favicon.ico">
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
</head>
......
......@@ -3,6 +3,9 @@
<head>
<title>Culture Gallery</title>
<link rel="stylesheet" href='/stylesheets/main_style.css' type="text/css">
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="icon" href="/images/favicon.ico">
</head>
<body>
......@@ -18,9 +21,7 @@
<li><a href="">Contact</a></li>
</ul>
</div>
<div class="title">
<h1>Culture Gallery</h1>
</div>
<div class="welcome">
<h1>어떤 공연을 찾으시나요?</h1>
<div class="search-box">
......
......@@ -6,6 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Culture Gallery</title>
<link rel="stylesheet" href='/stylesheets/login_style.css' type="text/css">
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="icon" href="/images/favicon.ico">
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
</head>
......
......@@ -5,6 +5,8 @@
<meta charset="utf-8" />
<title>send page title</title>
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="icon" href="/images/favicon.ico">
<script src="../javascripts/send.js"></script>
</head>
......