我正在进行一个谷歌地图的项目。我的要求是在线保存谷歌地图,以便离线使用。在 IOS 中,他们使用了 GMSTileURLConstructor。相同情况下,是否有可能保存地图。如果是,请给我提供任何想法或链接。
-(void)ViewOfflineMap
{
GMSTileURLConstructor urls = ^(NSUInteger x, NSUInteger y, NSUInteger zoom) {
NSString *strMap=[NSString stringWithFormat:@"http://mt0.google.com/vt/x=%ld&y=%ld&z=%ld",(long)x,(long)y,(long)zoom];
return [NSURL URLWithString:strMap];
};
GMSURLTileLayer *layer=[GMSURLTileLayer tileLayerWithURLConstructor:urls];
layer.zIndex=100;
layer.map=mapView_;
}
感谢提前帮助。