-
25 Apr 2013 7:28 AM #1
Not center a fixed position in map
Not center a fixed position in map
Good afternoon, I am developing a application with sencha touch 2.1.1 and I have problem with component map.
The problem is that I want center the map in a fixed position in the maprender event using the next code but not working:
Controller:
View:Code:Ext.define('ClaveiSAT.controller.MapaPrincipal', { extend: 'Ext.app.Controller', config: { control: { "#mapaPrincipalMapa": { maprender: 'onMapaPrincipalMapaMapRender' } } }, onMapaPrincipalMapaMapRender: function(component, eOpts) { console.log('Render Map'); var posicion = new google.maps.LatLng('39.235478', '-1.799827'); Ext.getCmp('mapaPrincipalMapa').setConfig({ mapOptions:{ zoom: 14, mapTypeId: google.maps.MapTypeId.SATELLITE, center : posicion } }); } });
Code:Ext.define('ClaveiSAT.view.MapaPrincipal', { extend: 'Ext.Panel', config: { height: '100%', id: 'mapaPrincipal', width: '100%', items: [ { xtype: 'map', height: '100%', id: 'mapaPrincipalMapa', useCurrentLocation : { autoUpdate : false }, width: '100%' } ] } });
Thank you!!
-
25 Apr 2013 8:15 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
This is a known issue.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Apr 2013 3:50 AM #3
And.. Have the issue solution??? Where I can find documentation??
Thanks mitchellsimoens
This duplicates another forum thread, you can visit that thread here.


Reply With Quote