A PHP Error was encountered
Severity: Notice
Message: Undefined variable: danzi
Filename: custom/view.php
Line Number: 258
Backtrace:
File: /home/basezon/application/views/custom/view.php
Line: 258
Function: _error_handler
File: /home/basezon/application/controllers/Script.php
Line: 106
Function: view
File: /home/basezon/index.php
Line: 316
Function: require_once
},
dataType: 'html',
success: function(data){
$("#danzi-body").html(data);
danzi_init();
}
});
**/
if(typeof kakao !== "undefined") {
var mapContainer = document.getElementById('map_detail');
mapOption = {
center: new daum.maps.LatLng(lat, lng),
level: 4
};
map = new daum.maps.Map(mapContainer, mapOption);
map.setZoomable(false);
var zoomControl = new kakao.maps.ZoomControl();
map.addControl(zoomControl, kakao.maps.ControlPosition.RIGHT);
ps = new kakao.maps.services.Places(map);
var circle = new kakao.maps.Circle({
map: map,
center : new kakao.maps.LatLng(lat, lng),
radius: section_scope,
strokeWeight: 3,
strokeColor: '#75B8FA',
strokeOpacity: 1,
strokeStyle: 'dashed',
fillColor: '#CFE7FF',
fillOpacity: 0.7
});
$(".vr_wrapper").find("img").each(function(){
init_360($(this).attr("id"),$(this).attr("src"));
});
var position = new kakao.maps.LatLng(lat, lng);
/*줌 레벨이 설정된 이상으로는 확대되지 않도록 하는 기능*/
kakao.maps.event.addListener(map, 'zoom_changed', function() {
level = map.getLevel();
if(level<1){
alarm("지도 확대 제한","더 이상 지도가 확대되지 않습니다.");
zoomOut();
}
});
//setOverlayMapTypeId();
}
animate();
init_zzim();
$('.slider-for2').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.slider-nav2'
});
$('.slider-nav2').slick({
slidesToShow: 4,
slidesToScroll: 4,
vertical:true,
asNavFor: '.slider-for2',
dots: false,
focusOnSelect: true,
verticalSwiping:true
});
$('.portfolio-item').magnificPopup({
delegate: 'a',
type: 'image',
gallery:{enabled:true}
});
$("#ask_form input[name='phone']").click(function(){
$("#ask_form").attr("action","/ask/add_action");
});
$("#ask_form").ajaxForm({
success:function(text){
if(text.trim()=="1") {
alarm("문의 등록","문의가 등록되었습니다.
빠른 시간내에 연락드리겠습니다.");
if($("#ask_form").length>0) $("#ask_form")[0].reset();
} else {
alarm("등록실패","문의 내용을 정확하게 입력해 주세요.");
}
}
});
$(".content-body p img").each(function(index, item){
var watermarkImage = obje($config, "watermark") != "" ? "https://dungzi.kr.object.iwinv.kr/10118/fa1fbb87ec9cbb8c1a043086fd002d81.jpg" : "https://dungzi.kr.object.iwinv.kr/10118/fa1fbb87ec9cbb8c1a043086fd002d81.jpg";
var html = "";
$(this).replaceWith(html);
});
});
function zoomOut() {
level = level + 1;
map.setLevel(level);
}
function setOverlayMapTypeId() {
var chkTerrain = document.getElementById('chkTerrain'),
chkTraffic = document.getElementById('chkTraffic'),
chkBicycle = document.getElementById('chkBicycle'),
chkUseDistrict = document.getElementById('chkUseDistrict');
// 지도 타입을 제거합니다
for (var type in mapTypes) {
map.removeOverlayMapTypeId(mapTypes[type]);
}
// 지적편집도정보 체크박스가 체크되어있으면 지도에 지적편집도정보 지도타입을 추가합니다
if (chkUseDistrict.checked) {
map.addOverlayMapTypeId(mapTypes.useDistrict);
}
// 지형정보 체크박스가 체크되어있으면 지도에 지형정보 지도타입을 추가합니다
if (chkTerrain.checked) {
map.addOverlayMapTypeId(mapTypes.terrain);
}
// 교통정보 체크박스가 체크되어있으면 지도에 교통정보 지도타입을 추가합니다
if (chkTraffic.checked) {
map.addOverlayMapTypeId(mapTypes.traffic);
}
// 자전거도로정보 체크박스가 체크되어있으면 지도에 자전거도로정보 지도타입을 추가합니다
if (chkBicycle.checked) {
map.addOverlayMapTypeId(mapTypes.bicycle);
}
}
function mine(){ $(event.target).select(); }
function init_zzim(){
$(".property-zzim span").click(function(){
if(confirm("로그인하시겠습니까?")){
location.href="/member/signin";
}
});
}
function share_naver() {
var share_url = "https://share.naver.com/web/shareView.nhn?url=" + encodeURI(encodeURIComponent(url)) + "&title=" + title;
window.open(share_url,"_blank");
}
function share_facebook(){
var share_url="https://www.facebook.com/sharer/sharer.php?u="+url+"&display=popup&ref=plugin&src=share_button";
window.open(share_url,"_blank");
}
function share_band(){
var share_url="https://band.us/plugin/share?body="+title+"&route="+url;
window.open(share_url,"_blank");
}
function share_kakao(){
console.log(url);
Kakao.Link.sendDefault({
objectType: 'feed',
content: {
title: title,
//description: '자세히보기',
imageUrl: share_img,
link: {
//mobileWebUrl: encodeURI(encodeURIComponent(url)),
//webUrl: encodeURI(encodeURIComponent(url))
mobileWebUrl: url,
webUrl: url
}
},
buttons: [
{
title: '바로가기',
link: {
mobileWebUrl: url,
webUrl: url
//mobileWebUrl: encodeURI(encodeURIComponent(url)),
//webUrl: encodeURI(encodeURIComponent(url))
}
}
]
});
//var share_url="https://tbest.kr/property/kakaolink?title="+title+"&url="+encodeURI(encodeURIComponent(url))+"&key="+map_key;
// window.open(share_url,"_blank");
}
function share_link(){
$("#urlModal").modal("show");
}
function init_360(element_id,img_src) {
var container, mesh;
//view_modal이 아닌 view에서는 타이밍 문제로 인하여 아래와 같이 크기를 설정하도록 수정하였다.
if(init_width==0 && init_height==0){
init_width = $("#"+element_id).parent().width();
init_height = $("#"+element_id).parent().height();
}
container = document.getElementById("wrapper_"+element_id);
if(container && !($.inArray(element_id,element_360) > -1)){
element_360.push(element_id);
$("#"+element_id).hide();
camera[element_id] = new THREE.PerspectiveCamera(zoom, init_width / init_height, 1, 1000 );
camera[element_id].target = new THREE.Vector3( 0, 0, 0 );
camera[element_id].position.set(0,20,35);
scene[element_id] = new THREE.Scene();
var geometry = new THREE.SphereGeometry( 500, 60, 40 );
geometry.scale( - 1, 1, 1 );
var loader = new THREE.TextureLoader()
loader.setCrossOrigin( '' );
var material = new THREE.MeshBasicMaterial( {
map: loader.load( img_src )
} );
mesh = new THREE.Mesh( geometry, material );
scene[element_id].add( mesh );
//THREE.DefaultLoadingManager.onProgress = function ( item, loaded, total ) {
/** console.log( item, loaded, total ); **/
// $(".loading360").fadeOut();
//};
renderer[element_id] = new THREE.WebGLRenderer();
renderer[element_id].setPixelRatio( window.devicePixelRatio );
renderer[element_id].setSize( init_width, init_height*1.2 );
container.appendChild( renderer[element_id].domElement );
container.addEventListener( 'mousedown', onDocumentMouseDown, false );
container.addEventListener( 'mousemove', onDocumentMouseMove, false );
container.addEventListener( 'mouseup', onDocumentMouseUp, false );
container.addEventListener( 'touchstart', onDocumentTouchStart, false );
container.addEventListener( 'touchmove', onDocumentTouchMove, false );
container.addEventListener( 'touchend', onDocumentTouchEnd, false );
//window.addEventListener( 'resize', onWindowResize, false );
}
}
/**
* resize인데 모바일에서는 resize가 필요 없기 때문에 이 함수는 웹에서만 동작한다.
*/
function resize(){
for (var key in camera) {
camera[key].aspect = $(".rsContainer").width() / $(".rsContainer").height();
camera[key].updateProjectionMatrix();
renderer[key].setSize( $(".rsContainer").width(), $(".rsContainer").height() );
}
}
function onDocumentMouseDown( event ) {
event.preventDefault();
isUserInteracting = true;
onPointerDownPointerX = event.clientX;
onPointerDownPointerY = event.clientY;
onPointerDownLon = lon;
onPointerDownLat = lati;
}
function onDocumentMouseMove( event ) {
if ( isUserInteracting === true ) {
lon = ( onPointerDownPointerX - event.clientX ) * 0.1 + onPointerDownLon;
lati = ( event.clientY - onPointerDownPointerY ) * 0.1 + onPointerDownLat;
}
}
function onDocumentMouseUp( event ) {
panorama_flag = 1;
event.preventDefault();
setTimeout(function() {
panorama_flag = 0;
}, 1000);
isUserInteracting = false;
event.stopPropagation();
}
/**
* 모바일에서는 터치로 한다.
*/
function onDocumentTouchStart( event ) {
if ( event.touches.length === 1 ) {
event.preventDefault();
isUserInteracting = true;
onPointerDownPointerX = event.touches[ 0 ].pageX;
onPointerDownPointerY = event.touches[ 0 ].pageY;
onPointerDownLon = lon;
onPointerDownLat = lati;
}
}
/**
* 모바일에서는 터치로 한다.
*/
function onDocumentTouchMove( event ) {
if ( event.touches.length === 1 ) {
event.preventDefault();
lon = ( onPointerDownPointerX - event.touches[ 0 ].pageX ) * 0.1 + onPointerDownLon;
lati = ( event.touches[ 0 ].pageY - onPointerDownPointerY ) * 0.1 + onPointerDownLat;
}
}
function onDocumentTouchEnd( event ) {
isUserInteracting = false;
}
function animate() {
try {
ani = requestAnimationFrame( animate );
update();
}
catch(e) {
}
}
function update() {
if ( isUserInteracting === false ) {
lon += 0.07;
}
lati = Math.max( - 85, Math.min( 85, lati ) );
phi = THREE.Math.degToRad( 90 - lati );
theta = THREE.Math.degToRad( lon );
for (var key in camera) {
camera[key].target.x = 500 * Math.sin( phi ) * Math.cos( theta );
camera[key].target.y = 500 * Math.cos( phi );
camera[key].target.z = 500 * Math.sin( phi ) * Math.sin( theta );
camera[key].lookAt( camera[key].target );
// distortion
//camera.position.copy( camera.target ).negate();
renderer[key].render( scene[key], camera[key] );
}
}
$(".donginfo").on("click",function(){
var building_id = $(this).data("buildingid");
$(".donginfo").removeClass("donginfo_active");
$(this).addClass("donginfo_active");
$.ajax({
type: 'POST',
url: "/property/ajax_building/",
data: {
building_id:building_id
},
dataType: 'json',
success: function(data){
$("#building_nm_txt").html(data.building.building_nm);
$("#sede_cnt_txt").html(data.building.sede_cnt+"세대");
$("#build_date_txt").html(data.building.build_date);
$("#area_land_txt").html(data.building.area_land_txt);
$("#area_bld_txt").html(data.building.area_bld_txt);
$("#area_total_txt").html(data.building.area_total_txt);
$("#floor_txt").html("(지상) "+data.building.floor_up+"층 (지하) "+data.building.floor_down+"층 (높이) "+data.building.height+"m");
$("#elevator_txt").html("(승객용) "+data.building.elevator_ride+"대 (비상용) "+data.building.elevator_emgen+"대");
$("#park_txt").html("(옥내) 자주식 "+data.building.park_auto_in+"대, 기계식 "+data.building.park_mech_in+"대
(옥외) 자주식 "+data.building.park_auto_out+"대, 기계식 "+data.building.park_mech_out+"대");
$("#main_yongdo_txt").html(data.building.main_yongdo);
$("#sub_yongdo_txt").html(data.building.sub_yongdo);
$("#structure_txt").html(data.building.structure);
$("#property_floor").html(data.building_floor_table);
}
});
});