2012-02-03 69 views
1

林的东西,我不能让我的头以防万一如何使用路由我

我有,我想在底图上添加透明的瓷砖瓷砖源奋力打造透明层(开放街道地图)但它不工作,因为它应该

// 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]; 

图像是透明PNG瓷砖。结果却并不如我所料:

Alas not very useful as an overlay 注意,我张贴的片段是经过一番揪头发,我开始通过设置背景clearColor与不红,但你可以看到它是灰色的呢 - (

回答

1

看起来像你正在使用直线路线我路线我的分支AFAIK,目前的项目没有设置为多个地图来源你可能想看看route-me/alpstein分叉或mapbox fork,它们均支持多瓦的来源,因为那mapbox是干什么的,他们所得到更新和功能的工作增加了很多更频繁的,它不是一个即插即用的代换从路线-ME /路由我到这些分支。

顺便说一句,你真的需要一个新的瓷砖源,或者你可以做你与RMMarkers做什么?

+0

我工作围绕它,但会看你的建议下一个版本。标记将无法正常工作,我想吃晚饭实行两个地图 – CocoaChris 2013-07-16 07:03:52