Unanswered: Center Google Map
I'm having trouble centering a google map.
I have an MVC application, created much like Phils Designer 2.0 video from yesterday.
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:
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