|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html>">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="<head>http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><meta http-equiv='Content-Script-Type' content='text/javascript' /><meta http-equiv='Content-Style-Type' content='text/css' /><SCRIPT language='JavaScript' type='text/javascript' src='http" map.vworld.kr="map.vworld.kr" js="js" sopmapinit.js.do="sopMapInit.js.do" apikey="01CFB355-75CD-321E-BC87-C8AD8206D0D1'">http://www.google.co.kr/jsapi?key=ABQIAAAAwbkbZLyhsmTCWXbTcjbgbRSzHs7K5SvaUdm8ua-Xxy_-2dYwMxQMhnagaawTo7L1FE1-amhuQxIlXw"></script><script> djConfig = { parsexxxxxxxxxxxxxxxxxxOnLoad: true }; google.load('dojo', '1.1.1'); google.load('maps', '2.x'); google.load('earth', '1.x'); window.xxxxxxxxxxxxxxxxxxonload = function () { document.getElementById("id_latlong").innerHTML = ""; setTimeout(function () { google.earth.createInstance("map3d", initCall, failureCall); }, 1); }; var g_ge; function initCall(obj) { document.getElementById("id_latlong").innerHTML = ""; g_ge = obj; g_ge.getWindow().setVisibility(true); google.earth.addEventListener(g_ge.getView(), "viewchange", eventListener); g_ge.getNavigationControl().setVisibility(g_ge.VISIBILITY_SHOW); g_ge.getLayerRoot().enableLayerById(g_ge.LAYER_ROADS, true); g_ge.getLayerRoot().enableLayerById(g_ge.LAYER_BUILDINGS, true); SOPMapMove(37.5745691818808, 126.976865410295, 5972); var camera = g_ge.getView().copyAsCamera(g_ge.ALTITUDE_RELATIVE_TO_GROUND); camera.setTilt(45); g_ge.getView().setAbstractView(camera); } ; function failureCall(msg) { } ; function SOPMapMove(SLat, SLong, SDistance) { if (g_ge) { var lookAt = g_ge.getView().copyAsLookAt(g_ge.ALTITUDE_RELATIVE_TO_GROUND); lookAt.setLatitude(SLat); lookAt.setLongitude(SLong); lookAt.setRange(SDistance); g_ge.getView().setAbstractView(lookAt); var SLL = SLat + ":" + SLong + "/" + SDistance; document.getElementById("id_latlong").innerHTML = SLL; } ; } ; function eventListener(event) { var camera = g_ge.getView().copyAsCamera(g_ge.ALTITUDE_RELATIVE_TO_GROUND); document.getElementById("id_lat_cam").innerHTML = camera.getLatitude().toFixed(5); document.getElementById("id_lng_cam").innerHTML = camera.getLongitude().toFixed(5); document.getElementById("id_alt_cam").innerHTML = camera.getAltitude().toFixed(2); document.getElementById("id_Direct_cam").innerHTML = camera.getHeading(); } ; function SOPCamMove(SLat, SLong, SAngle, SElevation, STilt) { if (g_ge) { var camera = g_ge.getView().copyAsLookAt(g_ge.ALTITUDE_RELATIVE_TO_GROUND); camera.setLatitude(SLat); camera.setLongitude(SLong); if (SAngle != -9999) camera.setHeading(SAngle); if (SElevation != -9999) camera.setRange(SElevation); camera.setAltitudeMode(g_ge.ALTITUDE_ABSOLUTE); if (STilt != -9999) camera.setTilt(STilt); g_ge.getView().setAbstractView(camera); var features = g_ge.getFeatures(); while (features.getFirstChild()) features.removeChild(features.getFirstChild()); var placemark = g_ge.createPlacemark(""); placemark.setName(""); var icon = g_ge.createIcon(""); icon.setHref("http://www.vworld.kr/images/op02/map_point.png"); var style = g_ge.createStyle(""); style.getIconStyle().setIcon(icon); placemark.setStyleSelector(style); var point = g_ge.createPoint(""); point.setLatitude(SLat); point.setLongitude(SLong); placemark.setGeometry(point); g_ge.getFeatures().appendChild(placemark); } ; } ; </script><body> <div id="map3d" style="width:1002px;height:325px;"></div> <table> <td id='id_latlong'></td> <td id='id_lat_cam'></td> <td id='id_lng_cam'></td> <td id='id_Direct_cam'></td> <td id='id_alt_cam'></td> </table></body></html> |
* 로드뷰 Html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <style type="text/css"> </style> <head> <script type="text/javascript" src="http://apis.daum.net/maps/maps3.js?apikey=6b9bf1e1be50f31a3032c05db3b679e1886966dd" charset="utf-8"></script> var mapWalker = null; function SOPCamMove(SLat, SLong, SAngle){ MapWalker.prototype.setAngle = function(angle){ //map walker의 위치를 변경시키는 함수 //map walker를 지도위에 올리는 함수 mapWalker.setMap(map); }; //map walker를 구성하는 각 노드들의 class명을 지정 - style셋팅을 위해 필요 content.appendChild(angleBack); //커스텀 오버레이 객체를 사용하여, map walker 아이콘을 생성 this.walker = customoverlay; addEventHandle(content, 'mousedown', xxxxxxxxxxxxxxxxxxonMouseDown); var proj = map.getProjection(), </script> <body xxxxxxxxxxxxxxxxxxonload="init()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="no"> |
* 브이월드(구글어스)와 로드뷰 위치/방향 연동
//브이월드 => 로드뷰 보기 try if(id_lat_cam <> '')and(id_lng_cam <> '')then begin end; try if(id_lat_cam <> '')and(id_lng_cam <> '')then begin StrResult := Format('SOPCamMove("%s", "%s", "%s", "%s", "%s");', [FloatToStr(CY), FloatToStr(CX), FloatToStr(CAngle), '250', '45']); end; |
|