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瓷砖。结果却并不如我所料:
注意,我张贴的片段是经过一番揪头发,我开始通过设置背景clearColor与不红,但你可以看到它是灰色的呢 - (
我工作围绕它,但会看你的建议下一个版本。标记将无法正常工作,我想吃晚饭实行两个地图 – CocoaChris 2013-07-16 07:03:52