Giter VIP home page Giter VIP logo

route-me's Introduction

Route-Me: iOS map library

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, Microsoft VirtualEarth, CloudMade, OpenAerialMap, OpenCycleMap, SpatialCloud, TileStream7, and two offline-capable, database-backed formats (DBMap and MBTiles) are supported as map sources.

Please note that you are responsible for getting permission to use the map data, and for ensuring your use adheres to the relevant terms of use.

Installing

As Route-Me is undergoing some significant changes, the recommended course of action is to clone a copy of the repository:

  git://github.com/route-me/route-me.git

Or, download the trunk.

See the 'samples' subdirectory for usage examples.

There are three subdirectories - MapView, Proj4, and samples. Proj4 is a support class used to do map projections. The MapView project contains only the route-me map library. "samples" contains some ready-to-build projects which you may use as starting points for your own applications, and also some engineering test cases. samples/SampleMap and samples/ProgrammaticMap are the best places to look, to see how to embed a Route-Me map in your application.

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-2010 Route-Me Contributors". Your data provider will have additional attribution requirements.

News, Support and Contributing

Join our mailing list for news and to communicate with project members and other users:

To report bugs and help fix them, please use the issue tracker

route-me's People

Contributors

amjaliks avatar amnesic avatar baldmountain avatar bmichel avatar bradtheappguy avatar btknorr avatar clarketus avatar colinator avatar davidgoli avatar dguerri avatar gravitystorm avatar halmueller avatar halset avatar hasseily avatar hjon avatar incanus avatar jfujita avatar josephg avatar kennygrant avatar mdales avatar michaeltyson avatar obrand69 avatar orff avatar pwnb0t avatar quazie avatar sjhennion avatar slainger avatar tracyharton avatar vyskocil avatar wrynearson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

route-me's Issues

Simple sample map in one view

What steps will reproduce the problem?

  1. Need to have a sample app that creates a simple map with a network activity indicator and
    auto-centering on my current location. It should also rotate to portrait or landscape views.

What is the expected output? What do you see instead?

A new sample application project.

What version of the product are you using? On what operating system?

NA

Please provide any additional information below.

Marker refactoring

  • Convert markers from layers to views so they can accept touch events rather than have these
    handled by RMMapView
  • Give markers a pointer to their manager, to allow direct control of markers without needing a
    handle to their manager.

Marker radius display

Two possible approaches:

(a) Direct drawing of a filled ellipse, or
(b) Introduce dependence on RMPath

RMMapContents has some legacy code that can be removed

RMMapContents has the following code in initwithView

    boundingMask = RMMapMinWidthBound;
mercatorToScreenProjection = [[RMMercatorToScreenProjection alloc]

initFromProjection:[newTilesource projection] ToScreenBounds:[newView bounds]];

tileSource = nil;
projection = nil;
mercatorToTileProjection = nil;
renderer = nil;
imagesOnScreen = nil;
tileLoader = nil;

layer = [[newView layer] retain];

[self setTileSource:newTilesource];
[self setRenderer: [[[RMCoreAnimationRenderer alloc] initWithContent:self]

autorelease]];

imagesOnScreen = [[RMTileImageSet alloc] initWithDelegate:renderer];

RMTileImageSet needs to know about the renderer so that it send tilesAdded
and tilesRemoved messages. The line just above this also tries to set the
Renderer but imagesOnScreen is still nil. The code in setRenderer that sets
renderer on imagesOnScreen should be removed

  • (void) setRenderer: (RMMapRenderer*) newRenderer
    {
    if (renderer == newRenderer)
    return;

    [imagesOnScreen setDelegate:newRenderer];

This line is noop, as imagesOnScreen is nil at this point.

Also, the following code is not needed

markerManager = [[RMMarkerManager alloc] initWithContents:self];

because RMMarkerManager now uses the overlay (RMLayerSet) allocated in
initWithView for managing its markers.

Patches for read-only databases

Here are some patches I made to implement read-only databases.

The purpose is to package an iPhone app with a built-in resource, a
read-only map tile cache, which will be used as efficiently as possible
(i.e. no writing the last used date, or counting the number of items to see
if it needs purging), and then have another writable database for caching
tiles that aren't built into the app.

The routeme.plist defines three caches: a memory cache, my read-only cache
with useCachesDirectory false (so it comes from Documents), and a regular
database cache with useCachesDirectory true (so it comes from Caches).

I store the map cache as an app resource, and make a symbolic link from the
documents directory to the app resource, when the app starts up.

It would be nice to be able to configure the cache directories somehow in
the routeme.plist instead of messing around with symbolic links, but I
haven't done that yet.

One issue I'd like to understand better: Will the tiles from the read-only
cache trickle down into the writable cache, wasting space? Is there a way
to prevent that?

For some reason I had to put a cast of the id cfg to NSDictionary *, to
make it work, but I don't understand why...

// NSString* type = [cfg valueForKey:@"type"];
NSDictionary d = (NSDictionary *)cfg; // Don added this cast, which
makes it work!
NSString
type = [d valueForKey:@"type"];

Here are the diffs for read-only databases.

bash-3.2$ svn diff

Index: MapView/Map/RMTileCache.m

--- MapView/Map/RMTileCache.m (revision 577)
+++ MapView/Map/RMTileCache.m (working copy)
@@ -69,8 +69,10 @@
id newCache = nil;

    @try {

- NSString* type = [cfg valueForKey:@"type"];

+// NSString* type = [cfg valueForKey:@"type"];

  •       NSDictionary *d = (NSDictionary *)cfg; // Don added this cast, which
    
    makes it work!
  •       NSString\* type = [d valueForKey:@"type"];
    
    •   /// \bug magic string literals
        if ([@"memory-cache" isEqualToString: type]) 
            newCache = [self newMemoryCacheWithConfig: cfg];
      
    @@ -169,7 +171,8 @@
    /// \bug magic numbers
    NSUInteger capacity = 1000;
    NSUInteger minimalPurge = capacity / 10;
  • BOOL readOnly = NO;

NSNumber* capacityNumber = [cfg objectForKey:@"capacity"];
if (capacityNumber!=nil) {
NSInteger value = [capacityNumber intValue];
@@ -202,9 +205,15 @@
}
}

  • NSNumber* readOnlyNumber = [cfg objectForKey:@"readOnly"];

  • if (readOnlyNumber != nil) {

  •   readOnly = [readOnlyNumber boolValue];
    
  • }

  • RMDatabaseCache* dbCache = [[RMDatabaseCache alloc]
    initWithTileSource: theTileSource
    usingCacheDir: useCacheDir

  •                           readOnly: readOnly
                            ];
    

    [dbCache setCapacity: capacity];

    Index: MapView/Map/RMDatabaseCache.h

    --- MapView/Map/RMDatabaseCache.h (revision 577)
    +++ MapView/Map/RMDatabaseCache.h (working copy)
    @@ -36,13 +36,14 @@
    RMCachePurgeStrategy purgeStrategy;
    NSUInteger capacity;
    NSUInteger minimalPurge;

  • BOOL readOnly;
    }

@Property (retain) NSString* databasePath;

  • (NSString_)dbPathForTileSource: (id) source usingCacheDir:
    (BOOL) useCacheDir;
    -(id) initWithDatabase: (NSString_)path;
    --(id) initWithTileSource: (id) source usingCacheDir: (BOOL)
    useCacheDir;
    +-(id) initWithTileSource: (id) source usingCacheDir: (BOOL)
    useCacheDir readOnly: (BOOL) isReadOnly;

-(void) setPurgeStrategy: (RMCachePurgeStrategy) theStrategy;
-(void) setCapacity: (NSUInteger) theCapacity;

Index: MapView/Map/RMDatabaseCache.m

--- MapView/Map/RMDatabaseCache.m (revision 577)
+++ MapView/Map/RMDatabaseCache.m (working copy)
@@ -78,8 +78,9 @@
return self;
}

--(id) initWithTileSource: (id) source usingCacheDir: (BOOL)
useCacheDir
+-(id) initWithTileSource: (id) source usingCacheDir: (BOOL)
useCacheDir readOnly: (BOOL) isReadOnly
{

  • readOnly = isReadOnly;
    return [self initWithDatabase:[RMDatabaseCache dbPathForTileSource:source
    usingCacheDir: useCacheDir]];
    }

@@ -109,6 +110,10 @@

-(void)addTile: (RMTile)tile WithImage: (RMTileImage*)image
{

  • if (readOnly) {
  •   return;
    
  • }

// The tile probably hasn't loaded any data yet... we must be patient.
// However, if the image is already loaded we probably don't need to
cache it.

@@ -124,6 +129,10 @@

-(void) addImageData: (NSNotification *)notification
{

  • if (readOnly) {
  •   return;
    
  • }

NSData data = [[notification userInfo] objectForKey:@"data"];
/// \bug magic string literals
RMTileImage *image = (RMTileImage
)[notification object];
@@ -160,7 +169,7 @@
if (data == nil)
return nil;

  •   if (capacity != 0 && purgeStrategy == RMCachePurgeStrategyLRU) {
    
  •   if (!readOnly && capacity != 0 && purgeStrategy ==
    
    RMCachePurgeStrategyLRU) {
    [dao touchTile: RMTileKey(tile) withDate: [NSDate date]];
    }

@@ -189,6 +198,9 @@

-(void) removeAllCachedImages
{

  • if (readOnly) {
  •   return;
    
  • }
    [dao removeAllCachedImages];
    }

RMPath: path out of visible area ramain invisible when moving programly.

What steps will reproduce the problem?
1.Use SampleMapwith following code in viewDidLoad:

[CODE]
// Set map view center coordinate
CLLocationCoordinate2D center;
center.latitude = 47.582;
center.longitude = -122.333;
slideLocation = center;
[mapView.contents moveToLatLong:center];
[mapView.contents setZoom:17.0f];

// Add 2 markers(start/end)  and RMPath with 2 points
RMMarker *newMarker;
UIImage *startImage = [UIImage imageNamed:@"marker-blue.png"];
UIImage *finishImage = [UIImage imageNamed:@"marker-red.png"];
UIColor* routeColor = [[UIColor alloc] initWithRed:(27.0 /255) green:(88.0 /255) blue:(156.0 /255) alpha:0.75];
RMPath* routePath = [[RMPath alloc] initWithContents:mapView.contents];
[routePath setLineColor:routeColor];
[routePath setFillColor:routeColor];
[routePath setLineWidth:10.0f];
[routePath setDrawingMode:kCGPathStroke];
CLLocationCoordinate2D newLocation;
newLocation.latitude = 47.580;
newLocation.longitude = -122.333;   
[routePath addLineToLatLong:newLocation];
newLocation.latitude = 47.599;
newLocation.longitude = -122.333;   
[routePath addLineToLatLong:newLocation];
[[mapView.contents overlay] addSublayer:routePath];

newLocation.latitude = 47.580;
newLocation.longitude = -122.333;   
newMarker = [[RMMarker alloc] initWithUIImage:startImage anchorPoint:CGPointMake(0.5, 1.0)];
[mapView.contents.markerManager addMarker:newMarker AtLatLong:newLocation];
[newMarker release];
newMarker = nil;

newLocation.latitude = 47.599;
newLocation.longitude = -122.333;   
newMarker = [[RMMarker alloc] initWithUIImage:finishImage anchorPoint:CGPointMake(0.5, 1.0)];
[mapView.contents.markerManager addMarker:newMarker AtLatLong:newLocation];
[newMarker release];
newMarker = nil;

// Start moving map (after few moves path become invisible until user touch screen)
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(slide) userInfo:nil repeats:YES];

}

-(void)slide{
slideLocation.latitude = slideLocation.latitude + 0.0002;
[mapView moveToLatLong:slideLocation];
}
[/CODE]

  1. Run project.
  2. see how path becomes invisible.
  3. Touch/drag map. path becomes visible.
  4. Map continue to move and

What is the expected output?
Path visible all the way map moves on it.

What do you see instead?
Visible only initial part of route.

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?
Both.

If you can reproduce your bug, please provide the source code for a
reproducing case. The best place to start is with the SampleMap project.

Please don't send patches/diffs. Post source code directly to the issue
tracker, noting your suggested revisions. If they are extensive, use a
branch in subversion with the same name as your issue number (e.g.
branches/issue59).

Please provide any additional information below.

managingMarker returns YES when having no objects

What steps will reproduce the problem?

  1. create a marker manager
  2. create a marker
  3. [markerManager managingMarker:marker] returns YES

What is the expected output? What do you see instead?
NO

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?

0.5, simulator

funny enough if you change the code to:

/// \deprecated violates Objective-C naming rules

  • (BOOL) managingMarker:(RMMarker*)marker
    {
    if (marker != nil && [[self getMarkers] containsObject:marker]) {
    return YES;
    }
    return NO;
    }

iso indexOfObject, it does work, though i cannot explain why...

RMVirtualEarthTileSource doesn't follow the rules

There are two things to fix.

First, the API needs to change, similar to RMCloudMadeTileSource, to allow developer to pass in a
registered MS VE key.

Second, the generated HTTP requests need to append a token, obtained with a SOAP call from MS
VE based on the developer key, to the HTTP requests.

Links to more details are in the source code.

maker label view with multiple layers will not trigger touch delegate methods

What steps will reproduce the problem?

  1. create a view with subviews in it
  2. assign that view as a marker label view
  3. touches on the visible marker label view do not trigger tapOnLabelForMarker:onMap

What is the expected output? What do you see instead?
I would assume the entire view hierarchy would be clickable

What version of the product are you using? On what operating system?
r192, 10.5

Please provide any additional information below.

the patch changes the touch handling in RMMapView.m to address this case

Unable to build to device in SDK 4

What steps will reproduce the problem?

  1. Compiling application with target as device.
  2. Compilation fails with error message of duplicate symbol _aasin

What is the expected output? It should compile
What do you see instead? Error message duplicate symbol _aasin

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?
Only when compiling to the device. If you compile to the simulator it works fine.

It occurs only with the SDK 4 compiler. The previous compiler ( 3.1.3) builds fine.

tapOnLabelForMarker is not called if marker is UIView

What steps will reproduce the problem?
In Code,

  1. Add a label by calling setLabel
    RMMarker *viewMarker = [[RMMarker alloc]initWithUIImage:redImage];
    [viewMarker setLabel:myMarkerView];
    where myMarkerView is a subclass of UIView.
  2. Implement tapOnLabelForMarker like
  • (void) tapOnLabelForMarker:(RMMarker *)marker onMap:(RMMapView *)map {
    NSLog(@"Marker was tapped");
    if (marker.label == nil) {
    NSLog(@"Marker is Nil");
    return;
    }

    if ([marker.label isHidden]) {
    [marker showLabel];
    } else {
    [marker hideLabel];
    }
    }

  1. Tap the marker label and check gdb if log message is printed.

What is the expected output? What do you see instead?
Tapping UIView Label should be treated similar to TextLabel.

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?
Tested on simulator. Latest version.

If you can reproduce your bug, please provide the source code for a
reproducing case. The best place to start is with the SampleMap project.

Please don't send patches/diffs. Post source code directly to the issue
tracker, noting your suggested revisions. If they are extensive, use a
branch in subversion with the same name as your issue number (e.g.
branches/issue59).

Please provide any additional information below.

Off by 1 pixel display problem

What steps will reproduce the problem?

  1. Pan the map display around, and note the edges of the tiles as they are
    brought over from the network.
  2. Occasionally a tile's right edge will have a black line (1 pixel wide)
  3. This only happens on the device (iPod 2.0 and iPhone 2.1 firmware). It
    is not producible on simulator.

What is the expected output? What do you see instead?
No tiles should have a black edge.

What version of the product are you using? On what operating system?
Reproducible as of r76

Zooming doesn't reuse already-loaded tile images

What steps will reproduce the problem?

  1. Let the map load
  2. Zoom the map
  3. Release your fingers

The map replaces tiles with the loading image

It should store them until the new tile images are loaded.

Animate moveToLatLong

Please animate moveToLatLong on the map view so it will enable smooth
scrolling through code.

Map wraparound is imperfect

Move the map to
lat:-4.405479 lon:179.985939

Look at how the labels on the map do not match perfectly.

Its more obvious when zoomed out further, if you are zoomed in too close
then no labels bridge the gap.

framework requires application to copy images into main bundle

In present implementation, both the background image displayed during tile loading and the
default marker images are loaded from [NSBundle mainBundle], rather than from Route-me's
bundle. This requires app developers to copy these images into their project.

libtool (libMapView.a error) on Simulator 3.1 build

What steps will reproduce the problem?

  1. Embed MapView in an XCode project made with Xcode v.3.0 [Checked that project builds and
    runs successfully on Simulator 2.2.1 and 3.0]
  2. Upgrade SDK to XCode 3.1
  3. Set up code signing required by v.3.1
  4. Build with Simulator 3.1

What is the expected output? What do you see instead?
The expected output was a successful build, as in previous builds.

Error received: Libtool "/Users/iphonedevel/Desktop/SpeedcamProject
07.08/MapView/buid/Debug-iphonesimulator/libMapView.a" normal i386 (1 error)
/Developer/Platforms/iphoneSimulator.platform/Developer/usr/bin/libtool: -dynamic not
specified the following flags are invalid: -ObjC
/Developer/Platforms/iphoneSimulator.platform/Developer/usr/bin/libtool: object /Developer/Platforms/iphoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/li
b/libsqlite3.dylib malformed object (unknown load command 5)

Command /Developer/Platforms/iphoneSimulator.platform/Developer/usr/bin/libtool failed with
exit code 1

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?
iphone SDK 3.1 beta 3. The behavior occurred on the simulator build.

If you can reproduce your bug, please provide the source code for a
reproducing case. The best place to start is with the SampleMap project.

I have reproduced the bug on the SampleMap project, but the code signing identity won't work
on another computer.
The only changes to the original SampleMap project were setting the code signing identity and
the Info.plist bundle identifier to the info of the working certificate. The same error was
encountered.

Please provide any additional information below.

This project has been tested extensively with the simulator on 2.2.1 and 3.0 but no actual
device. Upgrade and compatibility to the 3.1 version was requested only recently but during the
course of working with the route-me MapView project no embedding problems were
encountered.

RMMapView does not release RMMapContents

Steps to reproduce:
-just release the map view

Expected result:
-the map contents shoul be released also as the map view seems to have
ownership over it (if set from the outside it is retained/if not it is
allocated by the map view on the first call to contents)

Actual result:
-the map contents is not released/it's just set to nil

possible leak in RMMarker.m

route me 0.5 RMMarker.m:163

    self.labelView = [aView retain];  

should be

    self.labelView = aView;  // CNL: the . syntax already retains! it's a setter property

User can pan outside of map bounds

There are upper and lower bounds to the map, nothing north of the north
pole. nothing south of the south pole.

RouteMe does not have any way to keep a user from scrolling much further
south than the south pole/north than the north pole.

I would love if there was a way to keep a user from panning beyond the
upper and lower bounds of the map, like maps.app does.

CloudMade tile source does not validate access key

Passing a bogus key to RMCloudMadeMapSource's -initWithAccessKey:styleNumber: silently returns
a tile source without signaling an error. Test added to testObjectCreation:

STAssertThrows((myTilesource = [[RMCloudMadeMapSource alloc] 

initWithAccessKey:@"0199bdee456e59ce950b0156029d693" styleNumber:999]),
@"bogus CloudMade key does not trigger error");

Offline maps crash

What steps will reproduce the problem?

  1. Build application with route-me from svn + offline map patch
  2. Run on device.
  3. Zoom in/out several times ( ~10-20)
  4. See memory overflow crash.

Drawing a path over the 180 meridian

What steps will reproduce the problem?
-there is no simple solution for drawing a path over the 180 meridian.
(e.g. draw a line from latitude 179.9 to -179.9)

What is the expected output?
-I would expect the line to be the shortest possible:
(abs(latitude1 - latitude2) < 180)

What do you see instead?
-the line is drawn from -179.9 to 179.9 across the entire globe.

Other thoughts:
-I tried splitting the path in two segments:
(179.9 to 180.0 and -180.0 to -179.9)
This works OK but the size of the path layer is too big (its width is
practically 360 degrees (-180 to 180)) and it cannot be allocated.

I don't see a simple solution to this problem. I just wanted to bring it to
your attention. I also hope my explanation of the problem is clear enough.
Please let me know if I can be of any further assistance.

Thank you,
Andrei

Addition of local imagery option to RMTileSource

Although the existence of RMCachedTileSource
(http://www.mobilegeographics.com/dev/routeme/interface_r_m_cached_tile_source.html)
could be extended to fit this purpose, there's currently no source that
could be leveraged to display imagery that stored locally to the device.

I'd imagine something similar to RMAbstractMercatorWebSource
(http://www.mobilegeographics.com/dev/routeme/interface_r_m_abstract_mercator_web_source.html)
but with support for a local store.

Taps aren't firing on the right markers

What steps will reproduce the problem?

  1. Have a few markers clustered close together on the map
  2. Tap on one of them, either the tap doesn't fire, or it fires on the
    wrong marker.

What version of the product are you using? On what operating system?
rev 163. This defect has been around for at least a month.

Serious performance problem in RMTileImageSet addTiles:ToDisplayIn: loading unnecessary zooms

When my application initializes, there is a very long pause, because it's add
a whole bunch of tiles at zooms that it doesn't need.

RMTileImageSet addTiles:ToDisplayIn: has a for (;;) loop that loops from
the zoom level passed in, down to [tileSource minZoom], adding tiles at
zooms that are not needed.

I can't figure out why it's doing this, but it really slows down my
application.
I fixed the code so that addTiles only adds the tiles at the current zoom,
and it's much faster, and it works just fine.

What is the reason it's doing this? Is there a way to disable it besides
hacking the code? The performance is horrible because of this behavior,
which seems totally unnecessary.

RMMapView contents calls deprecated call

  • (RMMapContents *)contents
    {
    if (!_contentsIsSet) {
    self.contents = [[RMMapContents alloc] initForView:self];
    _contentsIsSet = YES;
    }
    return contents;
    }

RMMapView.contents is not deprecated, but it calls
RMapContents.initForView:self, which is.

Pinching causes marker interaction delegates to be called

When a pinching action is going on depending on where the pinch releases or
where the pinch intersects various delegate methods related to the marker
will be called (such as should/didDragMarker and didtapOnMarker/label).

This shouldn't happen during a pinch.

Drag and drop marker doesn't work on markers with small images

What steps will reproduce the problem?

  1. Add a marker
  2. Set image to thin image (4-5 pixels)
  3. Try to drag it horizonatally and with speed a little bit above normal.

What is the expected output?

Marker should be dragged smoothly all the way from one point to another.

What do you see instead?

Marker is dragged for a short distance and after that it is dropped and map
scrolls instead

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?

0.5, it happens both on the device and simulator.

It seems to be a problem of how touches are handled. Right now, when
touch moves, route-me checks if there is a marker layer on new position. If
there is something - corresponding marker is notified about move.

And when we have a thin or short image - delta between previous position
and current position can be bigger than corresponding image dimension.
So route-me doesn't find any marker on the new position and doesn't
notify marker about move.

I expect, it should handle drag'n'drop absolutely separately and then d'n'd
started it should remember marker on which it started and move it until
touch cancel/touch exit occurs or until any other touch detected.

overlapping tilesources

I want to have two tilesources displayed at the same time on top of each other. I guess I want
RMMapContents to have a addTileSource, not setTileSource.

Removing marker with label crash

  1. Add some markers to the map and use changeLabelWithText to add a label to the markers.
  2. Remove the markers
  3. Application crashes. There is not so much informations in the debugger but it seems to be
    related to a release issue

Apply on the simulator but should be the same on device.

I use the latest version of route-me.

I've been able to solve this issue by modifying the dealloc function of RMMarker :

  • (void) dealloc
    {
    [data release];
    [label release];
    [textForegroundColor release];
    [textBackgroundColor release];
    [super dealloc];
    }

In general, it is not a good practice to use customized setter in the dealloc. In this case, the
setLabel probably implies a release on the label variable with retain count equal to 0.

B.

Panning over the 180 meridian cannot be disabled

What steps will reproduce the problem?
-panning over the 180 meridian

What is the expected output?
-I would like to be able to disable circular horizontal panning

While this is a cool feature there are cases where it can be a handfull -
see issue 131

Thank you,
Andrei

Display a scale indicator in the MapView

Display an indication of the scale in the RMMapView.
This can be a simple line with the lenght in the real world below it (must be able to choose between
km and mile)

Or it can be one line with the length in Miles (yards) above (or below) and the length in Kilometers
(or meters) below (or above).

example attached.

SimpleMap example doesnt compile under 3.1.2

What steps will reproduce the problem?
1.load simple map example
2.try to compile it with iphone sdk 3.1.2
3.error

What is the expected output? What do you see instead?

see screenshot

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?

verion 0.5

Thanks

Modifying layer that is being finalized

RMPath's dealloc method calls:

[self setLineColor:nil];
[self setFillColor:nil];

both of them call:

[self setNeedsDisplay];

This results in the message above being logged twice for the path. A
solution would be to call setNeedsDisplay only if the set color is not nil.

marker fractional positions causing blurry images

You can put any layer on any position, decimal or fractional. When you put
something fractional the phone will try to do what it can.

For RMLayer subclasses this is probably a bad idea for the most part.

The suggested fix is as follows:

  • (void)setPosition:(CGPoint)position;
    {
    position.x = floor(position.x+0.5);
    position.y = floor(position.y+0.5);
    [super setPosition:position];
    }

Putting this into RMMarker will mean that when a position comes back from
the projection and is translated into fractional screen units, the marker
will round to the best screen coordinate and then use that to set its own
position. The result is that you don't get random blurry markers.

Double clicking on map doesn't go to the next zoom level

What steps will reproduce the problem?

  1. Start SampleMap application, and note the current zoom level shown on
    screen e.g. 15
  2. Double click on map
  3. Zoom level after zooming is not a native zoom level e.g. it goes from 15
    to 16.20

What is the expected output?
Map should zoom exactly to the current zoom level + 1.

What subversion release are you using?
r612

Does the behavior occur on the simulator, a real iPhone/iPod Touch, or
both?
Both

I have managed to circumvent this by modifying animatedZoomStep to
never exceed the targetZoom:

  • (void)animatedZoomStep:(NSTimer *)timer
    {

    .....
    

    if ((zoomIncr > 0 && [self zoom] >= targetZoom) || (zoomIncr < 0 &&
    [self zoom] <= targetZoom))
    {
    ...
    }
    else
    {
    if (([self zoom] + zoomIncr) > targetZoom) {
    zoomIncr = targetZoom - [self zoom];
    }
    float zoomFactorStep = exp2f(zoomIncr);

            ......
    

    }
    }

However I still don't understand the root of the problem i.e. why the
parameters passed to animatedZoomStep cause it to overstep the
targetZoom.

RMMapView delegates being called too frequently for markers

What steps will reproduce the problem?

  1. Open the RouteMe project and run the example project
  2. Drag the marker a short distance

What is the expected output? What do you see instead?

If the distance you drag the marker is short enough, both the
DragMarkerPosition and TapOnMarker delegate methods are called.

If you drag it a longer distance, tapOnMarker is not called.

(You can easily tell which method is being called by the console output)


I am unsure if this is expected behavior, but it seems to me that a marker

is either dragged or tapped, not both.

These issues still exist with the changes made in Issue 63 , as those simply
remove an old call and replace it with a new one in the same place.

Round off error in RMFractalTileProjection

When I was trying to understand the number of new tiles loaded, i found
this piece of code in RMFractalTileProjection

  • (RMTileRect) projectRect: (RMXYRect)aRect atZoom:(float)zoom
    {
    int normalised_zoom = [self normaliseZoom:zoom];
    float limit = [self limitFromNormalisedZoom:normalised_zoom];

First of all normaliseZoom returns a float and limitFromNormalisedZoom
accepts a float. And also, the method project:atZoom (just above this
method) does this properly. Casting to a int causes truncation. So, how
does this affect the rest of the code ? This affects the number of tiles
loaded. At this point, i don't know whether it is serious bug or not. I am
not able to beleive that this is intentional.

The way I tracked down is a little long story. The method computes the
tileRect width and height like this:

tileRect.size.width = aRect.size.width / bounds.size.width * limit;
tileRect.size.height = aRect.size.height / bounds.size.height * limit;

aRect.size.width is computed by multiplying screenBounds.width with scale.
If you substitute the equation for scale which is computed from this function

-(float) calculateScaleFromZoom: (float) zoom
{
return bounds.size.width / tileSideLength / exp2(zoom);

}
NOTE: This is the only place where exp2 is used and everywhere else it is
exp2f. FWIW, this should be fixed.

By substituting, you will figure out that

tileRect.size.width = screenBounds.size.width/tileSideLength;

This should result in the same number of tiles loaded irrespective of the
zoom. I don't know whether addTiles has other checks or not. The bug above
resulted in a different value for tileRect.size. Even after fixing this, it
is not same because exp2(zoom) and limit are not same because of the
roundf() in normalizeZoom.

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?

If you can reproduce your bug, please provide the source code for a
reproducing case. The best place to start is with the SampleMap project.

Please don't send patches/diffs. Post source code directly to the issue
tracker, noting your suggested revisions. If they are extensive, use a
branch in subversion with the same name as your issue number (e.g.
branches/issue59).

Please provide any additional information below.

Fire action as soon as map stops

I really love that u can now accelerate the map. But it would be nice to inform the delegate as soon
as the map slowed down. In my opinion this is essential because if ure getting markers from a
server you have no possibility to detect the new bounds (afterMapMove: and afterMapTouch: are
fired earlier and the map is still moving).

-M

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.