A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/Script.php
Line Number: 99
Backtrace:
File: /home/basezon/application/controllers/Script.php
Line: 99
Function: _error_handler
File: /home/basezon/index.php
Line: 316
Function: require_once
var camera = new Object();
var scene = new Object();
var renderer = new Object();
var init_width = 0;
var init_height = 0;
var panorama_flag = 0;
var element_360 = [];
var zoom = 45;
var level; /* 지도 레벨 */
var section_scope = 300;
var isUserInteracting = false,
onMouseDownMouseX = 0, onMouseDownMouseY = 0,
lon = 0, onMouseDownLon = 0,
lati = 0, onMouseDownLat = 0,
phi = 0, theta = 0;
if(typeof kakao !== "undefined") {
var map;
var mapTypes = {
terrain : kakao.maps.MapTypeId.TERRAIN,
traffic : kakao.maps.MapTypeId.TRAFFIC,
bicycle : kakao.maps.MapTypeId.BICYCLE,
useDistrict : kakao.maps.MapTypeId.USE_DISTRICT
};
var placeOverlay = new kakao.maps.CustomOverlay({zIndex:1}),
contentNode = document.createElement('div'), // 커스텀 오버레이의 컨텐츠 엘리먼트 입니다
markers = [], // 마커를 담을 배열입니다
currCategory = ''; // 현재 선택된 카테고리를 가지고 있을 변수입니다
var ps;
contentNode.className = 'placeinfo_wrap';
// 커스텀 오버레이의 컨텐츠 노드에 mousedown, touchstart 이벤트가 발생했을때
// 지도 객체에 이벤트가 전달되지 않도록 이벤트 핸들러로 kakao.maps.event.preventMap 메소드를 등록합니다
addEventHandle(contentNode, 'mousedown', kakao.maps.event.preventMap);
addEventHandle(contentNode, 'touchstart', kakao.maps.event.preventMap);
// 커스텀 오버레이 컨텐츠를 설정합니다
placeOverlay.setContent(contentNode);
// 각 카테고리에 클릭 이벤트를 등록합니다
addCategoryClickEvent();
// 각 카테고리에 클릭 이벤트를 등록합니다
// area toggle 처리용
document.querySelectorAll('.toggle-area').forEach(item => {
item.addEventListener('click', function() {
let metric = this.getAttribute('data-metric') + '㎡';
let imperial = this.getAttribute('data-imperial') + '평';
let currentUnit = this.getAttribute('data-unit');
if (currentUnit === 'metric') {
this.childNodes[0].nodeValue = imperial;
this.setAttribute('data-unit', 'imperial');
} else {
this.childNodes[0].nodeValue = metric;
this.setAttribute('data-unit', 'metric');
}
});
});
}
// 엘리먼트에 이벤트 핸들러를 등록하는 함수입니다
function addEventHandle(target, type, callback) {
if (target.addEventListener) {
target.addEventListener(type, callback);
} else {
target.attachEvent('on' + type, callback);
}
}
/* 카테고리 검색을 요청하는 함수입니다 */
function searchPlaces() {
if (!currCategory) {
return;
}
// 커스텀 오버레이를 숨깁니다
placeOverlay.setMap(null);
// 지도에 표시되고 있는 마커를 제거합니다
removeMarker();
ps.categorySearch(currCategory, placesSearchCB, {useMapBounds:true});
}
/* 장소검색이 완료됐을 때 호출되는 콜백함수 입니다 */
function placesSearchCB(data, status, pagination) {
if (status === kakao.maps.services.Status.OK) {
// 정상적으로 검색이 완료됐으면 지도에 마커를 표출합니다
displayPlaces(data);
} else if (status === kakao.maps.services.Status.ZERO_RESULT) {
// 검색결과가 없는경우 해야할 처리가 있다면 이곳에 작성해 주세요
} else if (status === kakao.maps.services.Status.ERROR) {
// 에러로 인해 검색결과가 나오지 않은 경우 해야할 처리가 있다면 이곳에 작성해 주세요
}
}
// 지도에 마커를 표출하는 함수입니다
function displayPlaces(places) {
for ( var i=0; i