1. #1
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    560
    Answers
    6
    Vote Rating
    24
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default Unanswered: Center Google Map

    Unanswered: Center Google Map


    Hi,

    I'm having trouble centering a google map.
    I have an MVC application, created much like Phils Designer 2.0 video from yesterday.
    http://www.sencha.com/blog/sencha-designer-beta
    List. When list is clicked a detail card of the tabs is created. Data is set for a form, and position/an marker is set for a map.

    However I'm having trouble centering the map. The problem is that the map do not have any with and height at the time of the centering, so the position I want is always to the top left in stead of center.

    I tried to trigger the re size event and re position the map, as suggested in a related bug:
    http://www.sencha.com/forum/showthre...-Ext.tab.Panel
    But do no good.

    I guess Phil have the same problem in the video, since he is unable to locate the exact street in the video (i guess is is at the 0,0 pixel).

    If I go back, and view another customer, with another address is always works. Since when the detail card is opened this time the map already know it's size, and positions itself correctly.

    I guess I can find a correct event, and re position the map at that point. However setting all the options in the list tap event is preferred.

    Any best practices on this?
    Last edited by svenna; 9 Feb 2012 at 6:21 AM. Reason: Insert video link
    Sven Tore Iversen

  2. #2
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    560
    Answers
    6
    Vote Rating
    24
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  
    Sven Tore Iversen