0

I currently have an overlay set up in my app for google maps on a google maps activity.

The image lines up perfectly, but when you leave the area of the overlay you see the normal google maps view.

I want to hide everything except Custom Overlay, how can I go about doing that?

In order to prevent a user from zooming out from where I have the camera zoomed in and losing the custom overlay, can I lock the user to only be within certain gps coordinates? (The area covered by the custom overlay)

obizues
  • 1,473
  • 5
  • 16
  • 30
  • You could use framelayout as root with the overlay as a transparent layout covering the whole map. Finally capture / block all touch events on the overlay. – cYrixmorten Dec 16 '15 at 18:38
  • I don't want want to lock zooming in, or zooming out after zooming in, but I want to lock the zoom to be a max of X – obizues Dec 17 '15 at 20:50
  • That I believe you can handle through the options avaliable in the GoogleMap object – cYrixmorten Dec 17 '15 at 21:30
  • It looks like the answer is creating another overlay like I did, and like you said making it a huge size when putting it in: – obizues Dec 17 '15 at 23:48

1 Answers1

0

It looks like the answer is creating another overlay like I did, and like cYrixmorten said making it a huge size when putting it in. I used 10,000:

GroundOverlayOptions audubonTrailMap = new GroundOverlayOptions()
            .image(BitmapDescriptorFactory.fromResource(R.drawable.trailmapimage))
            .position(schlitzAudubon, 10000f, 10000f);

mMap.addGroundOverlay(audubonTrailMap);
obizues
  • 1,473
  • 5
  • 16
  • 30