mapkit - WMS service with Swift / iOS -
knows book or example/tutorial implement wms service in swift? layer need zoomable map.
i'm having wms service in android , read tutorial: mapkit tutorial: overlay views
but i'm beginner in swift , don't know how integrate it. lot.
here sample code:
let url = "https://geoserver/wms?layers=karte&styles=&service=wms&version=1.3&request=getmap&srs=epsg:900913&bbox=464201.39551181,5902292.6044465,1836379.4732096,7388629.6749115&width=256&height=256&format=image/png8&transparent=true" var overlay = mytileoverlay(urltemplate:url) self.mapview.addoverlay(overlay) class mytileoverlay : mktileoverlay { var alpha: cgfloat = 1.0 func urlfortilepath(path: mktileoverlaypath, result: ((nsdata!, nserror!) -> void)!) { super.loadtileatpath(path, result) } }
the problem dynamic bbox in url, correct x, y , zoom.
the result: screenshot
Comments
Post a Comment