使用php嵌入式地图激活触摸手势
我正在创建一个AIR应用程序。 我在这个地址有张地图: 此页面的代码位于MarineTraffic.com上。这是:使用php嵌入式地图激活触摸手势,php,android,ios,actionscript-3,air,Php,Android,Ios,Actionscript 3,Air,我正在创建一个AIR应用程序。 我在这个地址有张地图: 此页面的代码位于MarineTraffic.com上。这是: <script type="text/javascript"> width='100%'; // the width of the embedded map in pixels or percentage height='450'; // the height of the embedded map in pixels or p
<script type="text/javascript">
width='100%'; // the width of the embedded map in pixels or percentage
height='450'; // the height of the embedded map in pixels or percentage
border='1'; // the width of the border around the map (zero means no border)
shownames='false'; // to display ship names on the map (true or false)
latitude='37.4460'; // the latitude of the center of the map, in decimal degrees
longitude='24.9467'; // the longitude of the center of the map, in decimal degrees
zoom='9'; // the zoom level of the map (values between 2 and 17)
maptype='3'; // use 0 for Normal map, 1 for Satellite, 2 for Hybrid, 3 for Terrain
trackvessel='0'; // MMSI of a vessel (note: vessel will displayed only if within range of the system) - overrides "zoom" option
fleet=''; // the registered email address of a user-defined fleet (user's default fleet is used)
remember='false'; // remember or not the last position of the map (true or false)
language='en'; // the preferred display language
showmenu=true; // show or hide the map options menu
</script>
<script type="text/javascript" src="http://www.marinetraffic.com/js/embed.js"></script>
页面加载得非常好
问题:触摸手势不起作用。如果我在嵌入的地图上向左或任何方向滑动,它都不起作用
你知道我如何在这个嵌入式地图上使用触摸手势吗
ThxA不是UIComponent,实际上根本不是Flash显示对象,因此不发送手势事件,正常事件捕获/气泡循环不适用于此处,因为StageWebView实例不属于显示列表的一部分
它是来自操作系统的本机web控件,显示在AIR控件的“顶部”,因此通过操作系统浏览器支持的任何手势以及正在显示的移动HTML都将在StageWebView的视口中得到支持
尝试将谷歌地图加载到你的Android浏览器中,它支持刷卡吗?不,你是对的,即使在我的Android浏览器中,它也不支持刷卡。。。所以,没有解决方案?因为它是一个谷歌地图,它“应该”支持一些手势,假设放在它上面的海洋包装器没有禁用或覆盖它们。试试这些谷歌地图Android手势,看看它们是否有效:
import flash.net.URLRequest;
import flash.media.StageWebView;
import flash.geom.Rectangle;
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
stage.scaleMode = StageScaleMode.EXACT_FIT;
var webView:StageWebView;
var swvRect:Rectangle;
var swvHeight:Number;
var swvY:Number=0;
mainPanel.visible=false;
init();
function init():void {
swvHeight=stage.stageHeight-44;
mainPanel.x=stage.stageWidth/2-mainPanel.width/2;
mainPanel.visible=true;
if(webView!=null){
return;
}
webView=new StageWebView();
webView.stage=this.stage;
webView.viewPort=new Rectangle(0,swvY,stage.stageWidth,swvHeight);
webView.loadURL("http://www.cocogeek.nc/mapBateau.php");
}