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