Authored by Thomas Rasch

o Minor cleanup

@@ -26,6 +26,9 @@ @@ -26,6 +26,9 @@
26 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 // POSSIBILITY OF SUCH DAMAGE. 27 // POSSIBILITY OF SUCH DAMAGE.
28 28
  29 +#import <CoreLocation/CoreLocation.h>
  30 +
  31 +#import "RMGlobalConstants.h"
29 #import "RMAnnotation.h" 32 #import "RMAnnotation.h"
30 #import "RMMapView.h" 33 #import "RMMapView.h"
31 #import "RMMapLayer.h" 34 #import "RMMapLayer.h"
@@ -145,8 +148,8 @@ @@ -145,8 +148,8 @@
145 - (void)setBoundingBoxFromLocations:(NSArray *)locations 148 - (void)setBoundingBoxFromLocations:(NSArray *)locations
146 { 149 {
147 CLLocationCoordinate2D min, max; 150 CLLocationCoordinate2D min, max;
148 - min.latitude = 90.0; min.longitude = 180.0;  
149 - max.latitude = -90.0; max.longitude = -180.0; 151 + min.latitude = kRMMaxLatitude; min.longitude = kRMMaxLongitude;
  152 + max.latitude = kRMMinLatitude; max.longitude = kRMMinLongitude;
150 153
151 CLLocationDegrees currentLatitude, currentLongitude; 154 CLLocationDegrees currentLatitude, currentLongitude;
152 for (CLLocation *currentLocation in locations) 155 for (CLLocation *currentLocation in locations)
@@ -155,7 +158,7 @@ @@ -155,7 +158,7 @@
155 currentLongitude = currentLocation.coordinate.longitude; 158 currentLongitude = currentLocation.coordinate.longitude;
156 159
157 // POIs outside of the world... 160 // POIs outside of the world...
158 - if (currentLatitude < -90.0 || currentLatitude > 90.0 || currentLongitude < -180.0 || currentLongitude > 180.0) { 161 + if (currentLatitude < kRMMinLatitude || currentLatitude > kRMMaxLatitude || currentLongitude < kRMMinLongitude || currentLongitude > kRMMaxLongitude) {
159 continue; 162 continue;
160 } 163 }
161 164
@@ -30,11 +30,10 @@ @@ -30,11 +30,10 @@
30 30
31 // P.S. The list isn't full. Need to add missing header files, when required 31 // P.S. The list isn't full. Need to add missing header files, when required
32 32
33 -#import "RMAbstractMercatorWebSource.h"  
34 #import "RMMapView.h" 33 #import "RMMapView.h"
35 -#import "RMMarkerManager.h"  
36 #import "RMProjection.h" 34 #import "RMProjection.h"
37 #import "RMTileLoader.h" 35 #import "RMTileLoader.h"
38 #import "RMTileSource.h" 36 #import "RMTileSource.h"
  37 +#import "RMAbstractMercatorWebSource.h"
39 38
40 #import "NSUserDefaults+RouteMe.h" 39 #import "NSUserDefaults+RouteMe.h"