0

I'm using a SupportMapFragment to get a handle to GoogleMap. the Fragment itself is inside a LinearLayout, with some other Views. If I click on a Marker, a View is comming from the bottom up, scrolling the GoogleMap up (like in the original MapsApp, but the bottom View is not layered OVER the GoogleMap, but is reducing its height). If the Bottom View is coming up or down, it shows black rectangles on the empty area for about half a second, before the Map is showing on that place again.

This behavior is really ugly, and doesn't give the user a smooth experience. The problem of Layering my bottomView on top of GoogleMaps is, that the visible center of the Map isn't the real center. So what can I do to "get rid of"/reduce this behavior?

Rafael T
  • 15,401
  • 15
  • 83
  • 144
  • I have a similar case for a personal project and I never got the time to fix it, so I'm interested to for a solution to. My initial though was: have the view actually go over the map and while doing that, animate the map to the new (computed) center using the `animateCamera` – linakis Oct 31 '13 at 18:27
  • Have you tried taking your map fragment inside a relative/frame layout and adding a transparent view in the same level of your map fragment? Similar problem maybe, see link http://stackoverflow.com/questions/13746351/mapfragment-in-scrollview/17315956#17315956 – Devrim Oct 31 '13 at 19:20
  • [Map padding](https://developers.google.com/maps/documentation/android/map#map_padding) was recently added. That should fit your needs. See [this video](http://www.youtube.com/watch?v=VYvt0gpeFW4) how can an overlay be animated nicely. – MaciejGórski Oct 31 '13 at 20:08
  • Thanks. I'll now use a FrameLayout and animate my bottom View over the map, while updating the GoogleMap's Padding – Rafael T Nov 01 '13 at 11:27

0 Answers0