How to I add a map listener to my first map page? I saw many examples which create a map and put it into a page, but here in my code, the map itself is a page. So I do not know how to add map listeners in this way.
Ext.define('myapp.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
fullscreen: true,
requires: [
'Ext.TitleBar',
'Ext.Video',
'Ext.Map',
'Ext.Panel',
'Ext.tab.*',
'Ext.*'
],
config: {
tabBarPosition: 'bottom',
items: [
{
title: 'WebTrack',
iconCls:'maps',
xtype: 'map',
useCurrentLocation: true,
store: 'my.store.appleStore',
}
What can I try next?
Finally, I found the answer.
Steps to follow:
Ext.define('myapp.controller.Noises', { extend: 'Ext.app.Controller', requires: ['Ext.MessageBox'], config: { refs: { mapComponent: 'main map' }, control: { mapComponent: { maprender: 'onMaprender' } } },
So the onMapprender is where you can start to write your code.
Hope it helps.
Cheers