I'm having trouble creating my own function in Sencha Touch 2 and I keep receiving an error:
Uncaught ReferenceError: function22 is not defined
The issue seems to be coming from my Position.js file located in the View directory.
Ext.define('GS.view.Position', {
extend: 'Ext.Map',
xtype: 'map',
config: {
title: 'Position',
iconCls: 'time',
useCurrentLocation:true,
mapOptions: {
zoom: 19
},
listeners: {
maprender : function(comp, map){
//new google.maps.LatLng,
marker = new google.maps.Marker({
position: new google.maps.LatLng(this._geo.getLatitude(), this._geo.getLongitude()),
title: '1',
map: map
});
google.maps.event.addListener(marker, 'click', function22);
new google.maps.Marker({
position: new google.maps.LatLng(51.266064,15.562048),
title: '1',
map: map
});
}
}
},
function22: function(){
alert('some alert');
}
});