swift - OpenStreetMap tiles in ios Google map SDK not working -


i trying render openstreetmap tiles in google map ios.

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

here 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 getting blank map, urls in log fine , 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 

ios swift google-maps


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -