MSFlightMapView allows you to easily add and animate geodesic flights to Google map

Related tags

Maps MSFlightMapView
Overview

MSFlightMapView

CocoaPods CocoaPods Twitter

Demo

Requirements

  • iOS 10.0+
  • Xcode 9.0+

Installation

Just add the MSFlightMapView folder to your project.

or use CocoaPods:

pod 'MSFlightMapView'

Usage

Flights Creation

To use MSFlightMapView, we would be needing to create MSFlight objects. It can be created in the following ways:

1. MSFlight

MSFlight(withFirstLocation: London, withSecondLocation: Paris)

MSFlight are single leg flights having a destination and an arrival. We can set the following attributes of a flight :

firstLocation - The Departure of the flight

secondLocation - The Arrival of the flight

iconImage - The marker image

iconColor - The color of the marker

pathColor - The path color between departure and arrival

markerColor - The color of markers of departure and arrival

MSFlight can be further extended to connecting flights by using .connecting(toLocation: CLLocationCoordinate2D) to either a MSFlight object or an array of MSFlight

2. MSMultiLegFlight

MSMultiLegFlight(withLocations: [London, Berlin, Ankara, Moscow])

MSMultiLegFlight are connecting flights between a number of locations. It generates MSFlight objects so it can be further customised as mentioned above.

Map Creation

MSFlightMapView is a subclass of GMSMapView. We can set and animate flights on the map just by using :

For MSFlight

let flight = MSFlight(withFirstLocation: London, withSecondLocation: Berlin).connecting(toLocation: Moscow)
mapView.flights = [flight]

For MSMultiLegFlight

let flightPlan = MSMultiLegFlight(withLocations: [London, Berlin, Ankara, Moscow])
mapView.flights = flightPlan.flights

Licence

MSFlightMapView is released under the MIT license. See LICENSE for details.

You might also like...
A spatial analysis library written in Swift for native iOS, macOS, tvOS, watchOS, and Linux applications, ported from Turf.js.

Turf for Swift 📱 🖥 💻 📺 ⌚️ A spatial analysis library written in Swift for native iOS, macOS, tvOS, watchOS, and Linux applications, ported from Tu

Demo in SwiftUI of Apple Map, Google Map, and Mapbox map
Demo in SwiftUI of Apple Map, Google Map, and Mapbox map

SNMapServices SNMapServices is a serices for iOS written in SwiftUI. It provides Map capability by subclassing Mapbox, Google map and Apple map. This

An exercise to use a map(google map) for navigation.

map-navigation An exercise to use a map(google map) for navigation. It have the features of navigating your for a destination, drawing your travel pat

MapApp - You can save the location of the places you go on the map and add names and notes
MapApp - You can save the location of the places you go on the map and add names and notes

MapApp - You can save the location of the places you go on the map and add names and notes

Letters animation allows you to click on different letters and accordingly it will animate letters in a cool way. It has a very attractive UI and is very easy to use.
Letters animation allows you to click on different letters and accordingly it will animate letters in a cool way. It has a very attractive UI and is very easy to use.

Letters Animation Cool Letters Animation in iOS written in Swift. Preview Table of content :- Description How to add in your project Requirement Licen

Numbers animation allows you to click on different numbers and accordingly it will animate numbers in a cool way. It has a very attractive UI and is very easy to use.
Numbers animation allows you to click on different numbers and accordingly it will animate numbers in a cool way. It has a very attractive UI and is very easy to use.

Numbers Animation Cool Numbers Animation in iOS written in Swift. Preview Table of content :- Description How to add in your project Requirement Licen

Reading animation allows you to click on the different page numbers and accordingly it will animate page changes in a cool way. It has a very attractive UI and is very easy to use.
Reading animation allows you to click on the different page numbers and accordingly it will animate page changes in a cool way. It has a very attractive UI and is very easy to use.

Reading Animation Cool Reading Animation in iOS written in Swift. Preview Table of content :- Description How to add in your project Requirement Licen

Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions
Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions

Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions. Every animation is randomized. Currently supported animations:

An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.
An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.

ClusterKit is an elegant and efficiant clustering controller for maps. Its flexible architecture make it very customizable, you can use your own algor

ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views.

ListPlaceholder ListPlaceholder Facebook news feed style animation Features ListPlaceholder is a swift library allows you to easily add facebook style

Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Страницы доступны на sparrowcode.io/en & sparrowcode.io/ru Как добавить свое приложение Добавьте элемент в json /ru/apps/apps.json. Если ваше приложен

Easily add vertical and horizontal pull to refresh to any UIScrollView. Can also add multiple pull-to-refesh views at once.

This is a fork from the famous SVPullToRefresh pod with 2 additional functionalities: Can add multiple pull-to-refresh views into one single UIScrollV

Quillow is an elegant book management app on the App Store that allows you to search, add and track the books you've consumed.

Quillow Quillow is an elegant book management app on the App Store that allows you to search, add and track the books you've consumed. Please use the

FancyGradient is a UIView subclass which let's you animate gradients in your iOS app. It is purely written in Swift.
FancyGradient is a UIView subclass which let's you animate gradients in your iOS app. It is purely written in Swift.

FancyGradient is a UIView subclass which let's you animate gradients in your iOS app. It is purely written in Swift. Quickstart Static gradient let fa

Tip-Calculation- - A program for calculate the tip. You can easily calculate it and you can split money easily
Tip-Calculation- - A program for calculate the tip. You can easily calculate it and you can split money easily

Tip-Calculation- It is a program for calculate the tip. You can easily calculate

CarListing app allows user to see list of cars on map as well as in the list

Car Listing CarListing app allows user to see list of cars on map as well as in the list. Features See List of cars on map in the home screen. User ca

Comments
  • Compile issues with XCode 10.2 + Cocoapods

    Compile issues with XCode 10.2 + Cocoapods

    I am having two issues in a newly created Swift project using XCode 10.2 and CocoaPods.

    First, because new projects use Swift 5, when you pull in using CocoaPods you get the following errors:

    /Users/jmillard/git/test-app-ios/Pods/MSFlightMapView/MSFlightMapView/MSFlightMapView/MSPathBuilder.swift:31:25: 'MKCoordinateForMapPoint' has been replaced by property 'MKMapPoint.coordinate'
    
    /Users/jmillard/git/test-app-ios/Pods/MSFlightMapView/MSFlightMapView/MSFlightMapView/MSMarkerAnimation.swift:48:60: 'kCAMediaTimingFunctionEaseInEaseOut' has been renamed to 'CAMediaTimingFunctionName.easeInEaseOut'
    

    I was able to switch to Swift 4 by updating the Podfile:

    post_install do |installer|
      installer.pods_project.targets.each do |target|
         if ['MSFlightMapView'].include? "#{target}"
            target.build_configurations.each do |config|
               config.build_settings['SWIFT_VERSION'] = '4.0'
            end
         end
      end
    end
    

    The second issue is that MSFlightMapView is not public so the following:

    import UIKit
    import MSFlightMapView
    
    class ViewController: UIViewController {
        @IBOutlet weak var mapView: MSFlightMapView!
    
    

    will fail:

    /Users/jmillard/git/test-app-ios/Test/ViewController.swift:13:33: Use of undeclared type 'MSFlightMapView'
    /Users/jmillard/git/test-app-ios/Test/ViewController.swift:13:33: Cannot use module 'MSFlightMapView' as a type
    

    If I add public to MSFlightMapView, everything works:

    import UIKit
    import GoogleMaps
    
    public class MSFlightMapView: GMSMapView {
    
    opened by jsm174 0
Releases(0.2.0)
Owner
Muhammad Abdul Subhan
Muhammad Abdul Subhan
An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.

ClusterKit is an elegant and efficiant clustering controller for maps. Its flexible architecture make it very customizable, you can use your own algor

null 502 Dec 25, 2022
Easy Map Annotation Clustering 📍

Cluster is an easy map annotation clustering library. This repository uses an efficient method (QuadTree) to aggregate pins into a cluster. Features R

Lasha Efremidze 1.2k Dec 25, 2022
A Swift package for parsing Clang module map files

Clangler is a Swift package used to parse Clang module map files into an abstract syntax tree (AST) representation. Once parsed, you can inspect or manipulate the nodes in the file, then generate and save a new file reflecting your changes.

Dalton Claybrook 9 Apr 7, 2022
Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework

NAMapKit Lets you drop pins or custom annotations onto a standard UIImage or a tiled NATiledImageView. Includes callouts, multi-colored pins, animatio

Neil Ang 263 Jun 29, 2022
JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap.

JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap. Installation Cocoapods pod 'JDSWiftHeatMap' Usage JDSwi

郭介騵 135 Dec 26, 2022
Google Directions API helper for iOS, written in Swift

PXGoogleDirections Google Directions API SDK for iOS, entirely written in Swift. ?? Features Supports all features from the Google Directions API as o

Romain L 268 Aug 18, 2022
Campus Atlas -- a Mapping & GIS solution which provides easy access to navigating the campus around you.

Campus Atlas Welcome to Campus Atlas -- a Mapping & GIS solution which provides easy access to navigating the campus around you. Technical Implementat

Larry Tseng 5 Nov 12, 2021
Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL

Mapbox GL Native A C++ library that powers customizable vector maps in native applications on multiple platforms by taking stylesheets that conform to

Mapbox 4.2k Jan 9, 2023
Location, motion, and activity recording framework for iOS

LocoKit A Machine Learning based location recording and activity detection framework for iOS. Location and Motion Recording Combined, simplified Core

Matt Greenfield 1.5k Jan 2, 2023
A Swift wrapper for forward and reverse geocoding of OpenStreetMap data

Nominatim NominatimKit is a Swift wrapper for forward and reverse geocoding of OpenStreetMap data. Why? Geocoding location data on iOS requires the us

Josef Moser 53 Feb 5, 2022