1

Im struggling with something which I can't get my head arround

I have a tile source with transparent tiles that I want to add on top of a base map (open streetmap) but it's not working as it should

// setup a base map
baseMapView = [[RMMapView alloc]initWithFrame: CGRectMake(0, 0, self.view.frame.size.width - self.view.frame.origin.x, self.view.frame.size.height - self.view.frame.origin.y) ];
[baseMapView setBackgroundColor:[UIColor blackColor]];
[baseMapView setDelegate:self];
[baseMapView setDeceleration:YES];
[[baseMapView contents] setTileSource:[[[RMOpenStreetMapSource alloc] init] autorelease]];
[self.view addSubview: baseMapView];

// markings in transparent png
markerMapView = [[RMMapView alloc]initWithFrame: CGRectMake(0, 0, self.view.frame.size.width - self.view.frame.origin.x, self.view.frame.size.height - self.view.frame.origin.y) ];
[markerMapView setBackgroundColor:[UIColor redColor]];
[markerMapView setAlpha: 0.5];
[markerMapView setOpaque:NO];
[markerMapView setDelegate:self];
[markerMapView setDeceleration:YES];
LLOpenSeaMapSource *tileSource = [[LLOpenSeaMapSource alloc] init];
tileSource.baseURL = @"http://tiles.luky.nl/mark";
[[markerMapView contents] setTileSource: tileSource]; 
[self.view addSubview: markerMapView];

The images are transparent png tiles. The result is however not as I expected:

Alas not very useful as an overlay Note that the snippet I posted is after some hair pulling, I started by setting the background to clearColor and not red, but as you can see it is gray anyway :-(

CocoaChris
  • 508
  • 3
  • 7

1 Answers1

1

Looks like you're using the straight route-me/route-me branch. AFAIK, the current project isn't set up for multiple map sources. You might want to check out the route-me/alpstein fork or the mapbox fork, they both support multiple tile sources. Because of the work that mapbox is doing, they are getting updates and features added much more frequently. IT IS NOT A PLUG AND PLAY SUBSTITUTION FROM route-me/route-me to either of these branches.

BTW, do you really need a new tile source, or could you do what you're doing with RMMarkers?

rcarver
  • 963
  • 9
  • 13
  • I'll worked around it, but will look at your suggestion for the next release. Markers won't work, I want to supper impose two maps – CocoaChris Jul 16 '13 at 07:03