【发布时间】:2016-02-14 08:12:17
【问题描述】:
我正在使用 ti.Map
当用户点击注释时我想做一些事情。
//make mapview
var mapView = Map.createView({
mapType:Map.NORMAL_TYPE,
});
//make anotation
annot= Map.createAnnotation({
latitude: myLatitude
longitude: myLongitude
title: myTitle
width:'100dp',
height:'100dp'
});
// add annotation
mapView.addAnnotation(annot);
//handle the annotation click
mapView.addEventListener('click', function(evt) {
if (evt.clicksource == "pin"){ // if user click annotation
//do something
return; //I try this
}
});
效果很好。
但是,在执行某些操作后,会出现注释弹出窗口(作为默认行为)
我想停止注释弹出窗口。
1)我试图阻止事件传递给注释类。
或
2)停止注解不响应点击事件。
我该如何解决?
【问题讨论】:
标签: google-maps titanium apple-maps