OSM tiles

I am trying to render open street tiles in google map iOS.

I have followed the instructions from here: https://developers.google.com/maps/documentation/ios-sdk/tiles#use_gmsurltilelayer_to_fetch_tiles_from_urls

Here is my code



class ViewController: UIViewController {
let urls = { (x: UInt, y: UInt, zoom: UInt) -> NSURL in
    let url = "http://otile3.mqcdn.com/tiles/1.0.0/osm/\(zoom)/\(x)/\(y).jpg"
    print(url)
    return NSURL(string: url)!
}


override func viewDidLoad() {
    super.viewDidLoad()
    let camera = GMSCameraPosition.cameraWithLatitude(-33.86,
        longitude: 151.20, zoom: 2)
    let mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera)
    mapView.mapType = kGMSTypeNone
    self.view=mapView
    let layer = GMSURLTileLayer(URLConstructor: urls)
    layer.zIndex = 100;
    layer.map = mapView
}


But i am getting a blank map, urls in log are fine and have valid images.

Log:

http://otile3.mqcdn.com/tiles/1.0.0/osm/3/5/2.jpg
http://otile3.mqcdn.com/tiles/1.0.0/osm/3/5/3.jpg
http://otile3.mqcdn.com/tiles/1.0.0/osm/3/5/4.jpg
http://otile3.mqcdn.com/tiles/1.0.0/osm/3/5/5.jpg
http://otile3.mqcdn.com/tiles/1.0.0/osm/3/5/6.jpg

Please refer to your other thread: Google Map SDK Url tiles not working


Edit: Removed snarky comments about double post as I realize this thread was actually first, but was delayed due to moderation

OSM tiles
 
 
Q