ios - Load Google Maps on a View Controller by pressing a button in another -


i have project have implemented facebook style side scroll menu. trying accomplish load layers on google map underneath pressing button on side menu call method, using gmstileurlconstructor in map view controller, regardless of approach (tried segue , target action) block code not executed. if add button on map viewcontroller works fine.

update issue seems though method gets called sideviewcontroller(slider) gmstileurlconstructor not x, y , z values in block , not executed.

presumably because mapview cannot calculate bounds of screen since partially covered slider ??? when tested :

gmscoordinatebounds *bounds= [[gmscoordinatebounds alloc] initwithregion:_mapview.projection.visibleregion];  nslog(@" x:%f, y:%f", bounds.northeast.latitude, bounds.southwest.latitude);   

always returns 0.000000 , 0.00000000

you try doing [[nsnotificationcenter defaultcenter] postnotificationwithname:@"somename" object:self]; when presses button on side menu.

then in map view controller, listen notifications: [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(handlesomenamenotification:) name:@"somename" object:nil];

and can load layers in handlesomenamenotification: method. also, remember remove observer of notification when finished view controller.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -