Mitchell, there is one more thing - the sencha example and my app are connected to the same sdk.
the panTo() method is called the same way.
The only difference I did notice is that I am extending the Map in the view, and in the example, the instance is created within the Ext.Application, in the launch function.

I had similar problem. The map implementation isn't well documented and is buggy..
Here is how I solved it..

mapPanel = Ext.create('Ext.Map', {
title: "Map",

listeners: {
'maprender': function(comp, map) {
this.map = map;
}

},

Now, panTo can find map property and it works.

jk171505

11 Apr 2012, 6:30 AM

I had the same problem today and noticed that there is a problem when I try to pan or set center of the map via controller.

When I set refs, I can get the map instance and so on, (getMap()) but for some reason panTo() just doesn't work. The same thing happens when I set directions.

I was able to panTo, setCenter, and also display directions without any problems but within a view, using listeners connected to buttons.
I was even able to accomplish this from container (Ext.navigation.View) in which the map (Ext.Map). Everything worked fine.

When I try to do this via controller (MVC approach) map doesn't react. Can't pan, set center or display directions - nothing. And not even one error.

When I display map object console.log(mapview.getMap() ) I get the same object in both cases - either from within a view or via controller.

Anyone resolved this problem?

jk171505

11 Apr 2012, 10:01 AM

Thanks, I tried this, and it didn't help...

As I described in other post, I am able to control the map inside the mapview.

The problems is when I set the 'refs' to the map in controller, and trying to control it. Map just doesn't react. I can reach the map via getMap() - this.getMap() in the mapview, or via this.getTherefsname().getMap() in the controller (where the therefsname is the reference set to the mapview in 'refs'). In both cases there is the same view, but when accessed from controller there is a problem with rendering the map... I quess...