abc.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. <meta charset="utf-8" />
  6. <script type="text/javascript" src="../../config/config.js"></script>
  7. <script type="text/javascript" src="../jquery/jquery.js"></script>
  8. <script type="text/javascript" src="swfobject.js"></script>
  9. <script type="text/javascript" src="leadorStreetViewAPI.js"></script>
  10. <style type="text/css">
  11. * {padding:0px; margin:0px;}
  12. html,body {
  13. width:100%;
  14. height:100%;
  15. font-size:12px;
  16. }
  17. #mapView {
  18. width:100%;
  19. height:100%;
  20. }
  21. .install-flash-player {
  22. position:absolute;
  23. left:50%;
  24. top:50%;
  25. width:300px;
  26. height:200px;
  27. text-align:center;
  28. margin:-100px 0 0 -150px;
  29. }
  30. .install-flash-player p {
  31. padding:5px;
  32. }
  33. .install-flash-player img {
  34. border:none;
  35. }
  36. .install-flash-player a {
  37. display:block;
  38. color:#00b7ef;
  39. }
  40. .install-flash-player a span {
  41. display:block;
  42. }
  43. </style>
  44. </head>
  45. <body>
  46. <!-- <object type="application/x-shockwave-flash" id="LeadorStreetViewApp1" name="LeadorStreetViewApp1" align="middle" data="http://mapplus/static/js/lib/leadorStreet/TVApplication.swf" width="100%" height="100%"><param name="quality" value="high"><param name="wmode" value="direct"><param name="bgcolor" value="#ffffff"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="true"><param name="flashvars" value="key=D41D8CD98F00B204E9800998ECF8427E&amp;TrueVisionSeverUrl=192.168.8.152&amp;Port=22222&amp;DataName=BJQIAN&amp;TrueVisionImageUrl=http://192.168.8.152:843&amp;UIUrl=IShowChinaTVUIBJ.swf&amp;LogoUrl=ld-logo.png"></object> -->
  47. <div id="mapView"></div>
  48. <script type="text/javascript">
  49. function getParam(paramName){
  50. var reg = new RegExp("(^|&)" + paramName + "=([^&]*)(&|$)","i");
  51. var r = window.location.search.substr(1).match(reg);
  52. if(r != null) return decodeURI(r[2]);
  53. return '';
  54. };
  55. function setStreetViewShowByLatlon(lat,lng){
  56. /** 配置 **/
  57. var more = {};
  58. more.flashvars = {};
  59. LeadorStreetView.useHash = false;
  60. /** 设置服务信息 **/
  61. more.flashvars.TrueVisionSeverUrl = MapplusUrlConfig.leadorStreetBaseUrl;
  62. more.flashvars.Port = "22222";
  63. more.flashvars.DataName = "BJQIAN";
  64. more.flashvars.TrueVisionImageUrl = MapplusUrlConfig.leadorStreetImageUrl;
  65. more.flashvars.UIUrl = "IShowChinaTVUIBJ.swf";
  66. more.flashvars.LogoUrl = 'ld-logo.png';
  67. /** 绑定DIV **/
  68. LeadorStreetView.bindingDIV("mapView",null,more);
  69. LeadorStreetView.showFullScreenUI(false);
  70. /** 根据经纬度加载 **/
  71. if(lat && lng){
  72. LeadorStreetView.loadStreetViewByPosition(lng,lat);
  73. }else {
  74. LeadorStreetView.loadStreetViewByPosition(0,0);
  75. }
  76. //位置改变
  77. LeadorStreetView.addCompleteEvent(streetViewComplete);
  78. //视角改变
  79. LeadorStreetView.addAngleChangeEvent(streetAngleChange);
  80. };
  81. function streetViewComplete(info){
  82. window.parent.leadorStreetViewChange(info);
  83. };
  84. function streetAngleChange(info){
  85. window.parent.leadorStreetAngleViewChange(info);
  86. };
  87. function flashChecker(){
  88. var hasFlash = 0;
  89. var flashVersion =0;
  90. try{
  91. if(document.all){
  92. var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
  93. if(swf){
  94. hasFlash = 1;
  95. VSwf = swf.GetVariable('$version');
  96. flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0]);
  97. }
  98. }else {
  99. if(navigator.plugins && navigator.plugins.length > 0){
  100. var swf = navigator.plugins["Shockwave Flash"];
  101. }
  102. if(swf){
  103. hasFlash = 1;
  104. var words = swf.description.split(" ");
  105. for(var i=0;i<words.length; i++){
  106. if(isNaN(parseInt(words[i]))) continue;
  107. flashVersion = parseInt(words[i]);
  108. }
  109. }
  110. }
  111. }catch (e) {
  112. }
  113. return {
  114. f:hasFlash,
  115. v:flashVersion
  116. };
  117. };
  118. $(function(){
  119. var flashPlayerInfo = flashChecker();
  120. if(flashPlayerInfo && flashPlayerInfo.v > 10){
  121. setStreetViewShowByLatlon(39.942910023503146,116.35311126708986);
  122. }else {
  123. if(document.all){
  124. var flashPlayerLink = 'static/soft/flashplayer11_8r800_94_winax.exe';
  125. }else {
  126. var flashPlayerLink = 'static/soft/flashplayer11_8r800_94_win.exe';
  127. }
  128. var installFlashHtml = '<div class="install-flash-player">' +
  129. '<p><strong>请安装Adobe flash player 11以上版本的播放器。</strong></p>' +
  130. '<a href="'+flashPlayerLink+'"><img src="static/images/get_flash.png"/><span>Adobe Flash Player 11</span></a>' +
  131. '</div>';
  132. document.getElementById('mapView').innerHTML = installFlashHtml;
  133. }
  134. });
  135. </script>
  136. </body>
  137. </html>