Hi Everyone
i'm beginner on this sdk.
My question is:
i'm using swift language
I have arcgis server tiled web service.Tile format is PNG
i'm adding this layer to my project.
But white colours are transparency.
how can i fix this.
Thanks
İmage Sample (road must be white)
and
Code Sample:
import UIKit
import ArcGIS
class ViewController: UIViewController, AGSMapViewLayerDelegate{
@IBOutlet weak var mapView: AGSMapView!
override func viewDidLoad() {
super.viewDidLoad()
let cred = AGSCredential(user: "userblabla", password: "pasblabla")
let url = NSURL(string: "http://domain.compnay.com/arcgis/rest/services/layername/MapServer")
let layer = AGSTiledMapServiceLayer(URL: url, credential: cred)
layer.opacity=1
self.mapView.addMapLayer(layer, withName: "Base")
self.mapView.layerDelegate = self
}
func mapViewDidLoad(mapView: AGSMapView!) {
//do something now that the map is loaded
//for example, show the current location on the map
mapView.locationDisplay.startDataSource()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Solved! Go to Solution.
Ok
I solved.
Solution:
self.mapView.gridLineWidth=0
self.mapView.backgroundColor=UIColor .whiteColor()
Ok
I solved.
Solution:
self.mapView.gridLineWidth=0
self.mapView.backgroundColor=UIColor .whiteColor()