when i used the sencha touch2.2.1,i met a question. In the viewer:
items: [{ id: \'mapCanvas\', xtype:\'map\', useCurrentLocation: true, }] >
items: [{ id: \'mapCanvas\', xtype:\'map\', useCurrentLocation: true, }]
Try this:
var latlngbounds = new google.maps.LatLngBounds(), position = new google.maps.LatLng(25,118), marker = new google.maps.Marker({ position : position, map : map }); latlngbounds.extend(position); map.fitBounds(latlngbounds);
Here map is the rendered google.map.Map instance
map
google.map.Map