Author Topic: JPCT with Google Maps - Problem with Tilt  (Read 1949 times)

Offline Dinin

  • byte
  • *
  • Posts: 28
    • View Profile
JPCT with Google Maps - Problem with Tilt
« on: April 21, 2013, 07:41:46 pm »
Hi !

I'm trying to use a GLSurfaceView over a MapView from Google to display 3D Objects on the map. So i calculate the coordinates from latitude and longitude and set the object in jpct world.
Also set and move the camera according to the camera of Google Maps.
Everthing (zoom, pan, rotate) is working fine if i'm looking down from straight above with tilt = 0. But if i change the viewangle/tilt then all my jpct objects (except the one in the center) are moving towards the camera in reference to the map  :-\. Attached two pics to make it clearer.

Has anyone a idea what i'm doing wrong or whats the problem, and has maybe a solution ?

Great thanks for all ideas.
Greets
Dinin

[attachment deleted by admin]

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: JPCT with Google Maps - Problem with Tilt
« Reply #1 on: April 21, 2013, 08:37:15 pm »
Maybe the distance between the map and the object is too large?

Offline aur8l

  • byte
  • *
  • Posts: 6
    • View Profile
Re: JPCT with Google Maps - Problem with Tilt
« Reply #2 on: June 14, 2013, 04:31:16 am »
Hi,

I'm myself looking for a solution to use a glview over a mapview. Could you hopefully show me how you managed to do it?
I tried multiple solutions. The "best" one so far was to use a mapfragment in my activity layout and dynamically add a glview with addcontentview (using a mapview constantly returned null on getMap). But I couldn't get to draw a transparent background for the glview (fb.clear always throwing an exception).

I tried to adapt it with some tips found on an example by mr.egon about augmented reality. In this one he was drawing a transparent background.
Didn't change anything.

Coule you give me some short sample, ? It would really help me out.

aur8l