Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using XBPageCurl With Google Maps SDK for iOS #49

Open
942v opened this issue May 11, 2013 · 6 comments
Open

Using XBPageCurl With Google Maps SDK for iOS #49

942v opened this issue May 11, 2013 · 6 comments

Comments

@942v
Copy link

942v commented May 11, 2013

Why is it that when I try to curl the view that contains the googleMapView (front View) the map gets black? Am I doing something wrong? Is it a bug? or XBpageCurl is not compatible with Google Maps SDK for iOS? I have change the map from the apple's map where the curl worked perfectly. Thanks for the reply.

-----------------------------------------------------------------------EDIT---------------------------------------------------------------------------------

Here are some images:
ios simulator screen shot may 15 2013 9 14 10 pm
ios simulator screen shot may 15 2013 9 14 15 pm

I'm using 3 View's like the example (backView, frontView, peelView). More info: Google Maps SDK for iOS version that I'm using is: 1.3.0 (current) & I'm using storyboards.
Idk if this is going to help but I have made a project with the same approach I'm using on my main workplace and it's on Bitbucket. Here's the link:

https://[email protected]/942v/test-xbpagecurl-google-maps-sdk-for-ios.git

You need an API Key from Google. Specifically for Google Maps SDK for iOS. Visit: "https://code.google.com/apis/console/"
Please go to "GoogleAPIKey.h" and put your key before running it on the simulator.

Can you tell me what I'm doing wrong?

@xissburg
Copy link
Owner

I haven't tried using XBPageCurl with Google Maps yet, but the view drawing mechanism that is used internally is totally dependent on -[CALayer renderInContext:] (to draw the view on an OpenGL texture). If the view you are trying to draw does not support it, I don't know what could be done. Have you tried using a 'container view' which contains the map view and curl this container view instead?

@benjaminetw
Copy link

i have met the same problem, i tried to curl a view which contains googlemaps, it turns into black.is there a solution?

@benjaminetw
Copy link

GMSMapLayer, the CALayer subclass for GMSMapView, now supports modification of its camera properties, allowing for advanced animation effects.

i saw it in google maps ios doc, it seems support calayer.

@942v
Copy link
Author

942v commented May 16, 2013

Thanks for the quick reply @xissburg, I have edit my issue with more data and a test project. Please fork it and tell me if it's a problem with my code or something that I'm doing wrong.

@brycethomas
Copy link

I just downloaded @942v 's example project (https://[email protected]/942v/test-xbpagecurl-google-maps-sdk-for-ios.git) illustrating the problem. @xissburg - it looks like @942v is already adding the Google Map as a subview of frontView (a plain UIView), and setting frontView as the viewToCurl, so I'm guessing simply stuffing the map inside of a 'container view' doesn't work unfortunately.

@xissburg
Copy link
Owner

Wow sorry for the delay.. been very busy and I can't really look into this at the moment. What I've been wondering is that this Google Maps view uses OpenGL to draw its contents. I think it does because it is capable of rendering 3D buildings. If this view is backed by a CAEAGLLayer then -[CALayer renderInContext] won't work on it. I have no idea what would at the moment.. if we could perhaps grab the GoogleMaps view's OpenGL context and framebuffer, we would be able to obtain the image through glReadPixels.. this would be a nice hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants