ims.map
Class BoundsCalculator
java.lang.Object
ims.map.BoundsCalculator
public class BoundsCalculator
- extends java.lang.Object
Implements the calculateNewBounds(GoogleMap, LatLng)
method which
calculates the bounds of the map's visible region.
Copyright © 2014 by Daniela Blum
This file is part of GPSChildFinder.
GPSChildFinder is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
this program. If not, see http://www.gnu.org/licenses.
- Author:
- Daniela Blum
Method Summary |
static void |
calculateNewBounds(com.google.android.gms.maps.GoogleMap map,
com.google.android.gms.maps.model.LatLng otherLocation)
Calculates the new bounds to keep the center (of interest). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoundsCalculator
public BoundsCalculator()
calculateNewBounds
public static void calculateNewBounds(com.google.android.gms.maps.GoogleMap map,
com.google.android.gms.maps.model.LatLng otherLocation)
- Calculates the new bounds to keep the center (of interest). If
myLocationButton is pressed it's my location (phone's location); if the
device's location button is pressed it's the device's location and show
all markers in the visible region.
Its zoomed out starting from the minimum zoom level (21) until both
locations are visible on the map.
- Parameters:
map
- GoogleMap to zoom out from and calculate the boundsotherLocation
- which should also be visible on the map