Authored by Thomas Rasch

Merge branch 'develop' into release

... ... @@ -30,7 +30,7 @@
@implementation RMMapQuestOSMSource
- (id)init
{
{
if (!(self = [super init]))
return nil;
... ...
//
// RMMapQuestOpenAerialSource.h
//
// Copyright (c) 2008-2012, Route-Me Contributors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#import "RMAbstractWebMapSource.h"
@interface RMMapQuestOpenAerialSource : RMAbstractWebMapSource
@end
... ...
//
// RMMapQuestOpenAerialSource.m
//
// Copyright (c) 2008-2012, Route-Me Contributors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#import "RMMapQuestOpenAerialSource.h"
@implementation RMMapQuestOpenAerialSource
- (id)init
{
if (!(self = [super init]))
return nil;
[self setMaxZoom:11];
[self setMinZoom:1];
return self;
}
- (NSURL *)URLForTile:(RMTile)tile
{
NSAssert4(((tile.zoom >= self.minZoom) && (tile.zoom <= self.maxZoom)),
@"%@ tried to retrieve tile with zoomLevel %d, outside source's defined range %f to %f",
self, tile.zoom, self.minZoom, self.maxZoom);
return [NSURL URLWithString:[NSString stringWithFormat:@"http://oatile1.mqcdn.com/tiles/1.0.0/sat/%d/%d/%d.png", tile.zoom, tile.x, tile.y]];
}
- (NSString *)uniqueTilecacheKey
{
return @"MapQuestOpenAerial";
}
- (NSString *)shortName
{
return @"MapQuest Open Aerial";
}
- (NSString *)longDescription
{
return @"Map tiles courtesy of MapQuest. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency.";
}
- (NSString *)shortAttribution
{
return @"Tiles courtesy of MapQuest.";
}
- (NSString *)longAttribution
{
return @"Tiles courtesy of MapQuest and OpenStreetMap contributors. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency.";
}
@end
... ...
... ... @@ -30,7 +30,7 @@
@implementation RMOpenCycleMapSource
- (id)init
{
{
if (!(self = [super init]))
return nil;
... ...
... ... @@ -30,7 +30,7 @@
@implementation RMOpenStreetMapSource
- (id)init
{
{
if (!(self = [super init]))
return nil;
... ...
... ... @@ -53,6 +53,8 @@
16EC85D7133CA6C300219947 /* RMCacheObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 16EC85D1133CA6C300219947 /* RMCacheObject.m */; };
16FAB66413E03D55002F4E1C /* RMQuadTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 16FAB66213E03D55002F4E1C /* RMQuadTree.h */; };
16FAB66513E03D55002F4E1C /* RMQuadTree.m in Sources */ = {isa = PBXBuildFile; fileRef = 16FAB66313E03D55002F4E1C /* RMQuadTree.m */; };
16FFF2CB14E3DBF700A170EC /* RMMapQuestOpenAerialSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 16FFF2C914E3DBF700A170EC /* RMMapQuestOpenAerialSource.h */; };
16FFF2CC14E3DBF700A170EC /* RMMapQuestOpenAerialSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 16FFF2CA14E3DBF700A170EC /* RMMapQuestOpenAerialSource.m */; };
17F02BB11319BA4B00260C6B /* RouteMe.h in Headers */ = {isa = PBXBuildFile; fileRef = 17F02BB01319BA4B00260C6B /* RouteMe.h */; };
23A0AAE90EB90A99003A4521 /* RMFoundation.c in Sources */ = {isa = PBXBuildFile; fileRef = 23A0AAE80EB90A99003A4521 /* RMFoundation.c */; };
23A0AAEB0EB90AA6003A4521 /* RMFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 23A0AAEA0EB90AA6003A4521 /* RMFoundation.h */; };
... ... @@ -200,6 +202,8 @@
16EC85D1133CA6C300219947 /* RMCacheObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMCacheObject.m; sourceTree = "<group>"; };
16FAB66213E03D55002F4E1C /* RMQuadTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMQuadTree.h; sourceTree = "<group>"; };
16FAB66313E03D55002F4E1C /* RMQuadTree.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMQuadTree.m; sourceTree = "<group>"; };
16FFF2C914E3DBF700A170EC /* RMMapQuestOpenAerialSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMMapQuestOpenAerialSource.h; sourceTree = "<group>"; };
16FFF2CA14E3DBF700A170EC /* RMMapQuestOpenAerialSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMMapQuestOpenAerialSource.m; sourceTree = "<group>"; };
17F02BB01319BA4B00260C6B /* RouteMe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RouteMe.h; sourceTree = "<group>"; };
17F31EFA1331050A00122B16 /* libMapView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMapView.a; sourceTree = BUILT_PRODUCTS_DIR; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
... ... @@ -350,6 +354,8 @@
D1437B32122869E400888DAE /* RMDBMapSource.m */,
1607499314E120A100D535F5 /* RMGenericMapSource.h */,
1607499414E120A100D535F5 /* RMGenericMapSource.m */,
16FFF2C914E3DBF700A170EC /* RMMapQuestOpenAerialSource.h */,
16FFF2CA14E3DBF700A170EC /* RMMapQuestOpenAerialSource.m */,
DD8CDB4814E0507100B73EB9 /* RMMapQuestOSMSource.h */,
DD8CDB4914E0507100B73EB9 /* RMMapQuestOSMSource.m */,
DD2B375314CF8197008DE8CB /* RMMBTilesTileSource.h */,
... ... @@ -663,6 +669,7 @@
DD98B6FA14D76B930092882F /* RMTileStreamSource.h in Headers */,
DD8CDB4A14E0507100B73EB9 /* RMMapQuestOSMSource.h in Headers */,
1607499514E120A100D535F5 /* RMGenericMapSource.h in Headers */,
16FFF2CB14E3DBF700A170EC /* RMMapQuestOpenAerialSource.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
... ... @@ -879,6 +886,7 @@
DD98B6FB14D76B930092882F /* RMTileStreamSource.m in Sources */,
DD8CDB4B14E0507100B73EB9 /* RMMapQuestOSMSource.m in Sources */,
1607499614E120A100D535F5 /* RMGenericMapSource.m in Sources */,
16FFF2CC14E3DBF700A170EC /* RMMapQuestOpenAerialSource.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
... ...
Route-Me: iOS map library
-------------------------
Route-Me: iOS map library (Alpstein fork)
-----------------------------------------
Route-Me is an open source map library that runs natively on iOS. It's designed
to look and feel much like the inbuilt iOS map library, but it's entirely open,
and works with any map source.
Currently, [OpenStreetMap][1], [Microsoft VirtualEarth][2], [CloudMade][3],
[OpenAerialMap][4], [OpenCycleMap][5], [SpatialCloud][6], and two offline,
database-backed formats (DBMap and [MBTiles][7]) are supported as map
Currently, [OpenStreetMap][1], [OpenCycleMap][2], [OpenSeaMap][3], [MapQuest OSM][4], [MapQuest Open Aerial][5] and two offline,
database-backed formats (DBMap and [MBTiles][6]) are supported as map
sources.
Please note that you are responsible for getting permission to use the map data,
... ... @@ -15,12 +14,11 @@ and for ensuring your use adheres to the relevant terms of use.
[1]: http://www.openstreetmap.org/index.html
[2]: http://maps.live.com/
[3]: http://www.cloudmade.com/
[4]: http://www.openaerialmap.org/
[5]: http://www.opencyclemap.org/
[6]: http://www.spatialcloud.com/
[7]: http://mbtiles.org
[2]: http://www.opencyclemap.org/
[3]: http://www.openseamap.org/
[4]: http://developer.mapquest.com/web/products/open/map
[5]: http://developer.mapquest.com/web/products/open/map
[6]: http://mbtiles.org
Installing
... ... @@ -44,7 +42,7 @@ There are three subdirectories - MapView, Proj4, and samples. Proj4 is a support
See LicenseRouteMe.txt for license details. In any app that uses the Route-Me library, include the following text on your "preferences" or "about" screen: "Uses Route-Me map library, (c) 2008-2012 Route-Me Contributors". Your data provider will have additional attribution requirements.
[dl]: https://github.com/Alpstein/route-me/zipball/master
[dl]: https://github.com/Alpstein/route-me/zipball/release
News, Support and Contributing
... ... @@ -70,7 +68,7 @@ Changes in this fork (Alpstein/route-me)
* Tile source refactoring
* Support for tile sources with multiple layers
* Support for tile sources with multiple layers (e.g. OpenSeaMap)
* Numerous performance improvements
... ...
... ... @@ -6,8 +6,6 @@
#import <UIKit/UIKit.h>
#import "RMMapView.h"
#import "RMOpenCycleMapSource.h"
#import "RMOpenStreetMapSource.h"
@interface MainViewController : UIViewController <RMMapViewDelegate>
{
... ...
... ... @@ -11,6 +11,12 @@
#import "MainView.h"
#import "RMTileSource.h"
#import "RMOpenCycleMapSource.h"
#import "RMOpenStreetMapSource.h"
#import "RMOpenSeaMapSource.h"
#import "RMMapQuestOSMSource.h"
#import "RMMapQuestOpenAerialSource.h"
@implementation MainViewController
@synthesize mapView;
... ... @@ -82,10 +88,28 @@
- (IBAction)mapSelectChange
{
if (mapSelectControl.selectedSegmentIndex == 1)
[mapView setTileSource:[[[RMOpenCycleMapSource alloc] init] autorelease]];
else
[mapView setTileSource:[[[RMOpenStreetMapSource alloc] init] autorelease]];
switch (mapSelectControl.selectedSegmentIndex)
{
case 1:
[mapView setTileSource:[[[RMOpenCycleMapSource alloc] init] autorelease]];
break;
case 2:
[mapView setTileSource:[[[RMOpenSeaMapSource alloc] init] autorelease]];
break;
case 3:
[mapView setTileSource:[[[RMMapQuestOSMSource alloc] init] autorelease]];
break;
case 4:
[mapView setTileSource:[[[RMMapQuestOpenAerialSource alloc] init] autorelease]];
break;
default:
[mapView setTileSource:[[[RMOpenStreetMapSource alloc] init] autorelease]];
break;
}
}
#pragma mark -
... ...
... ... @@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">528</int>
<string key="IBDocument.SystemVersion">10K540</string>
<string key="IBDocument.InterfaceBuilderVersion">1891</string>
<string key="IBDocument.SystemVersion">10K549</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1038.36</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">884</string>
<string key="NS.object.0">933</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
... ... @@ -48,6 +48,63 @@
<object class="IBUIView" id="1052103930">
<reference key="NSNextResponder" ref="79822186"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUISegmentedControl" id="171590242">
<reference key="NSNextResponder" ref="1052103930"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{5, 20}, {310, 30}}</string>
<reference key="NSSuperview" ref="1052103930"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="922595057"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBSegmentControlStyle">2</int>
<int key="IBNumberOfSegments">5</int>
<int key="IBSelectedSegmentIndex">0</int>
<object class="NSArray" key="IBSegmentTitles">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>Street</string>
<string>Cycle</string>
<string>Sea</string>
<string>MQ OSM</string>
<string>MQ Aerial</string>
</object>
<object class="NSMutableArray" key="IBSegmentWidths">
<bool key="EncodedWithXMLCoder">YES</bool>
<real value="0.0"/>
<real value="0.0"/>
<real value="0.0"/>
<real value="0.0"/>
<real value="0.0"/>
</object>
<object class="NSMutableArray" key="IBSegmentEnabledStates">
<bool key="EncodedWithXMLCoder">YES</bool>
<boolean value="YES"/>
<boolean value="YES"/>
<boolean value="YES"/>
<boolean value="YES"/>
<boolean value="YES"/>
</object>
<object class="NSMutableArray" key="IBSegmentContentOffsets">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{0, 0}</string>
<string>{0, 0}</string>
<string>{0, 0}</string>
<string>{0, 0}</string>
<string>{0, 0}</string>
</object>
<object class="NSMutableArray" key="IBSegmentImages">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSNull" id="4"/>
<reference ref="4"/>
<reference ref="4"/>
<reference ref="4"/>
<reference ref="4"/>
</object>
</object>
</object>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="79822186"/>
<reference key="NSWindow"/>
... ... @@ -120,44 +177,6 @@ ZAo</string>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUISegmentedControl" id="171590242">
<reference key="NSNextResponder" ref="79822186"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{56, 20}, {207, 44}}</string>
<reference key="NSSuperview" ref="79822186"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="922595057"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBNumberOfSegments">2</int>
<int key="IBSelectedSegmentIndex">0</int>
<object class="NSArray" key="IBSegmentTitles">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>Street</string>
<string>Cycle</string>
</object>
<object class="NSMutableArray" key="IBSegmentWidths">
<bool key="EncodedWithXMLCoder">YES</bool>
<real value="0.0"/>
<real value="0.0"/>
</object>
<object class="NSMutableArray" key="IBSegmentEnabledStates">
<bool key="EncodedWithXMLCoder">YES</bool>
<boolean value="YES"/>
<boolean value="YES"/>
</object>
<object class="NSMutableArray" key="IBSegmentContentOffsets">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{0, 0}</string>
<string>{0, 0}</string>
</object>
<object class="NSMutableArray" key="IBSegmentImages">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSNull" id="4"/>
<reference ref="4"/>
</object>
</object>
</object>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="702763708"/>
... ... @@ -194,23 +213,6 @@ ZAo</string>
<int key="connectionID">46</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">mapSelectChange</string>
<reference key="source" ref="171590242"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">13</int>
</object>
<int key="connectionID">53</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">mapSelectControl</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="171590242"/>
</object>
<int key="connectionID">54</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">mapView</string>
<reference key="source" ref="372490531"/>
... ... @@ -226,6 +228,23 @@ ZAo</string>
</object>
<int key="connectionID">58</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">mapSelectControl</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="171590242"/>
</object>
<int key="connectionID">54</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">mapSelectChange</string>
<reference key="source" ref="171590242"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">13</int>
</object>
<int key="connectionID">53</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
... ... @@ -264,7 +283,6 @@ ZAo</string>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="922595057"/>
<reference ref="171590242"/>
<reference ref="1052103930"/>
</object>
<reference key="parent" ref="702763708"/>
... ... @@ -275,15 +293,19 @@ ZAo</string>
<reference key="parent" ref="79822186"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
<reference key="object" ref="171590242"/>
<reference key="parent" ref="79822186"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">56</int>
<reference key="object" ref="1052103930"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="171590242"/>
</object>
<reference key="parent" ref="79822186"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
<reference key="object" ref="171590242"/>
<reference key="parent" ref="1052103930"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
... ... @@ -426,6 +448,6 @@ ZAo</string>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">884</string>
<string key="IBCocoaTouchPluginVersion">933</string>
</data>
</archive>
... ...