You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
func drawLineOnMap() {
let center = self.mapView.mapCenter.position
let geopath = MSGeopath(positions:
[MSGeoposition(latitude: center.latitude-0.0005, longitude: center.longitude-0.001),
MSGeoposition(latitude: center.latitude+0.0005, longitude: center.longitude+0.001)])
let mapPolyline = MSMapPolyline()
mapPolyline.path = geopath
mapPolyline.strokeColor = UIColor.black
mapPolyline.strokeWidth = 3 // 3 marked in the example but always reverts to 1
mapPolyline.strokeDashed = true
// Add Polyline to a layer on the map control.
let linesLayer = MSMapElementLayer()
linesLayer.zIndex = 1
linesLayer.elements.add(mapPolyline)
mapView.layers.add(linesLayer);
}