123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <meta charset="utf-8" />
- <script type="text/javascript" src="../../config/config.js"></script>
- <script type="text/javascript" src="../jquery/jquery.js"></script>
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript" src="leadorStreetViewAPI.js"></script>
- <style type="text/css">
- * {padding:0px; margin:0px;}
- html,body {
- width:100%;
- height:100%;
- font-size:12px;
- }
- #mapView {
- width:100%;
- height:100%;
- }
- .install-flash-player {
- position:absolute;
- left:50%;
- top:50%;
- width:300px;
- height:200px;
- text-align:center;
- margin:-100px 0 0 -150px;
- }
- .install-flash-player p {
- padding:5px;
- }
- .install-flash-player img {
- border:none;
- }
- .install-flash-player a {
- display:block;
- color:#00b7ef;
- }
- .install-flash-player a span {
- display:block;
- }
- </style>
- </head>
- <body>
- <!-- <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&TrueVisionSeverUrl=192.168.8.152&Port=22222&DataName=BJQIAN&TrueVisionImageUrl=http://192.168.8.152:843&UIUrl=IShowChinaTVUIBJ.swf&LogoUrl=ld-logo.png"></object> -->
- <div id="mapView"></div>
- <script type="text/javascript">
- function getParam(paramName){
- var reg = new RegExp("(^|&)" + paramName + "=([^&]*)(&|$)","i");
- var r = window.location.search.substr(1).match(reg);
- if(r != null) return decodeURI(r[2]);
- return '';
- };
- function setStreetViewShowByLatlon(lat,lng){
- /** 配置 **/
- var more = {};
- more.flashvars = {};
- LeadorStreetView.useHash = false;
- /** 设置服务信息 **/
- more.flashvars.TrueVisionSeverUrl = MapplusUrlConfig.leadorStreetBaseUrl;
- more.flashvars.Port = "22222";
- more.flashvars.DataName = "BJQIAN";
- more.flashvars.TrueVisionImageUrl = MapplusUrlConfig.leadorStreetImageUrl;
- more.flashvars.UIUrl = "IShowChinaTVUIBJ.swf";
- more.flashvars.LogoUrl = 'ld-logo.png';
- /** 绑定DIV **/
- LeadorStreetView.bindingDIV("mapView",null,more);
- LeadorStreetView.showFullScreenUI(false);
- /** 根据经纬度加载 **/
- if(lat && lng){
- LeadorStreetView.loadStreetViewByPosition(lng,lat);
- }else {
- LeadorStreetView.loadStreetViewByPosition(0,0);
- }
- //位置改变
- LeadorStreetView.addCompleteEvent(streetViewComplete);
- //视角改变
- LeadorStreetView.addAngleChangeEvent(streetAngleChange);
- };
- function streetViewComplete(info){
- window.parent.leadorStreetViewChange(info);
- };
- function streetAngleChange(info){
- window.parent.leadorStreetAngleViewChange(info);
- };
- function flashChecker(){
- var hasFlash = 0;
- var flashVersion =0;
- try{
- if(document.all){
- var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
- if(swf){
- hasFlash = 1;
- VSwf = swf.GetVariable('$version');
- flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0]);
- }
- }else {
- if(navigator.plugins && navigator.plugins.length > 0){
- var swf = navigator.plugins["Shockwave Flash"];
- }
- if(swf){
- hasFlash = 1;
- var words = swf.description.split(" ");
- for(var i=0;i<words.length; i++){
- if(isNaN(parseInt(words[i]))) continue;
- flashVersion = parseInt(words[i]);
- }
- }
- }
- }catch (e) {
- }
- return {
- f:hasFlash,
- v:flashVersion
- };
- };
- $(function(){
- var flashPlayerInfo = flashChecker();
- if(flashPlayerInfo && flashPlayerInfo.v > 10){
- setStreetViewShowByLatlon(39.942910023503146,116.35311126708986);
- }else {
- if(document.all){
- var flashPlayerLink = 'static/soft/flashplayer11_8r800_94_winax.exe';
- }else {
- var flashPlayerLink = 'static/soft/flashplayer11_8r800_94_win.exe';
- }
- var installFlashHtml = '<div class="install-flash-player">' +
- '<p><strong>请安装Adobe flash player 11以上版本的播放器。</strong></p>' +
- '<a href="'+flashPlayerLink+'"><img src="static/images/get_flash.png"/><span>Adobe Flash Player 11</span></a>' +
- '</div>';
- document.getElementById('mapView').innerHTML = installFlashHtml;
- }
- });
- </script>
- </body>
- </html>
|