123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <!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%;
- }
- #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>
- <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 setStreetViewShow(stationID, hYaw, hPitch) {
- var tvID = "mapView";
- LeadorStreetView.bindingDIV(tvID, null, {flashvars: {
- TrueVisionSeverUrl: MapplusUrlConfig.leadorStreetBaseUrl,
- LogoUrl: 'ld-logo.png',
- Port: 22222,
- UIUrl: "IShowChinaTVUIBJ.swf",
- DataName: 'BJQIAN',
- TrueVisionImageUrl: MapplusUrlConfig.leadorStreetImageUrl}});
- LeadorStreetView.loadStreetViewByID(stationID);
- if (hYaw && hPitch) {
- LeadorStreetView.setStreetViewAngle({yaw: hYaw, pitch: hPitch});
- }
- LeadorStreetView.showFullScreenUI(false);
- }
- 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){
- var stationID = getParam('stationID');
- var yaw = getParam('yaw');
- var pitch = getParam('pitch');
- setStreetViewShow(stationID, yaw, pitch);
- }else {
- if(document.all){
- var flashPlayerLink = map23DConfig.map23DAssetsUrl+"/soft/flashplayer_winax.exe";
- }else {
- var flashPlayerLink = map23DConfig.map23DAssetsUrl+"/soft/flashplayer_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>
|