
如果我引用Apple文档,MKMapVIEw有一个mapType选项需要MKMapType constant但没有样式参数,如MapOptions与MapTypeStyle和MapTypeStyler对于快速地图自定义非常强大.
所以我的问题是:有没有办法用MapKit框架实现类似的东西,如果没有,那么最好的框架/库是什么?我在想MapBox和类似的产品.
解决方法 你的朋友有几个选择.您可以使用其中一个框架http://cloudmade.com/products/iphone-sdk
https://github.com/route-me/route-me
或者您可以使用mapBox.他们的API看起来很不错.
或者,您可以提供自己的地图图块和叠加图.在MKOverlayVIEw中有类似的东西
- (voID)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context {NSURL* fileURL = [(HeatMaP*)self.overlay localUrlForStyle:@"alIEn" withMapRect:mapRect andZoomScale:zoomScale];NSData *imageData = [NSData dataWithContentsOfURL:fileURL ];if (imageData != nil) { UIImage* img = [UIImage imagenamed:@"aTileX.png"]; // Perform the image render on the current UI context UIGraphicsPushContext(context); [img drawInRect:[self rectForMapRect:mapRect] blendMode:kCGBlendModenormal Alpha:1.0]; UIGraphicsPopContext(); }} 如果您需要不受支持的“地形”模式,请检查此项
http://openradar.appspot.com/9621632
我实际上正处于一个需要在地图上覆盖切片的程序中间. This example非常有帮助.您将要查看MKOverlay和MKOverlayVIEw.我正在做的项目涉及使用gheat.我通过NSURLConnection访问磁贴并在本地存储它们.我执行的gist.
总结以上是内存溢出为你收集整理的ios – MapKit中的MapTypeStyle全部内容,希望文章能够帮你解决ios – MapKit中的MapTypeStyle所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)