Googleマップのリスナーに問題があります。Sencha Touch Google Mapsマーカーリスナーが機能しない
var marker_icon = new google.maps.MarkerImage('images/map/' + thisIcon + '.png', new google.maps.Size(32, 32)); var trafficMarker = new google.maps.Marker({
position: new google.maps.LatLng(alert.lat, alert.lon),
map: trafficMap,
icon: marker_icon,
id: 'trafficAlertIcon' + i
});
console.log('Test Log3');
google.maps.Event.addListener(trafficMarker, 'mousedown', function()
{
console.log('touched marker');
trafficTabPanel.layout.setActiveItem(1, {type: 'slide', direction: 'left'});
LoadIncidentMap(this.id.substring(16));
});
は、それが(「マーカーに触れ」)はconsole.logを打っていないとしてリスナーに問題があるようです;.
リスナーをtrafficMapに変更して応答するかどうかを確認しようとしましたが、応答しませんでした。私は試してみました、クリック、マウスダウン、マウスアップなど
ありがとう。