Skip to content

chenjie1219/TrackMapView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Carthage Compatible Platform

TrackMapView

主要内容的介绍

  • 生成轨迹地图

Requirements

  • Swift 4.2
  • iOS 11.0+
  • Xcode 11.x

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

To integrate TrackMapView into your Xcode project using Carthage, specify it in your Cartfile:

github "chenjie1219/TrackMapView"

Run carthage update to build the framework and drag the built TrackMapView.framework into your Xcode project.

Manually

Just download the project, and drag and drop the "TrackMapView" folder in your project.


Usage

生成轨迹地图

let coordinates = [
        CLLocationCoordinate2D(latitude: 39.855539, longitude: 116.119037),
        CLLocationCoordinate2D(latitude: 39.88539, longitude: 116.250285),
        CLLocationCoordinate2D(latitude: 39.805479, longitude: 116.180859),
        CLLocationCoordinate2D(latitude: 39.788467, longitude: 116.226786),
        CLLocationCoordinate2D(latitude: 40.001442, longitude: 116.353915),
        CLLocationCoordinate2D(latitude: 39.989105, longitude: 116.360200)]
        
mapView.drawPolyLine(coordinates: coordinates, color: <#T##UIColor#>, width: <#T##CGFloat#>, startImage: <#T##UIImage?#>, endImage: <#T##UIImage?#>)

效果图

1

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published