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

Last update: Apr 24, 2022

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.

GitHub

https://github.com/mabdulsubhan/MSFlightMapView
You might also like...

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

Feb 1, 2022

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

Mar 15, 2022

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

Jan 21, 2022

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

Jan 27, 2022

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:

Mar 10, 2022

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

May 27, 2022

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

Jun 1, 2022

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

Jan 6, 2022

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.

May 22, 2022

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. Если ваше приложен

May 22, 2022

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

May 17, 2022

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

Jan 13, 2022

Scroller - You can animate in individual views based on scroll position. Developed with SwiftUI. This library supports iOS/macOS

Scroller You can animate in individual views based on scroll position. Developed

May 15, 2022

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

Oct 13, 2021

Google Analytics tracker for Apple tvOS provides an easy integration of Google Analytics’ measurement protocol for Apple TV.

Google Analytics tracker for Apple tvOS by Adswerve About Google Analytics tracker for Apple tvOS provides an easy integration of Google Analytics’ me

Dec 10, 2021

Google-Blogger-iOS-App - Using Google Blogger API to build an iOS app like Medium

Google Blogger iOS App Using Google Blogger API to build an iOS app like Medium!

May 16, 2022

Add to-do List - a mobile application where you can add your to-dos and follow them

Add to-do List  - a mobile application where you can add your to-dos and follow them

This project, is a mobile application where you can add your to-dos and follow them. You can add your to-do's.

Apr 1, 2022

Animate easy and with less code with Swift

Animate easy and with less code with Swift

JDAnimationKit is designed to be extremely easy to use. You can animate your UI withe less lines of code. This library use internally POP framework, a

Apr 6, 2022
Comments
  • 1. 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 {
    
    Reviewed by jsm174 at 2019-05-01 21:14
Related tags
Easy Map Annotation Clustering 📍
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

Jun 20, 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.

Apr 7, 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.

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

Jun 18, 2022
Google Directions API helper for iOS, written in Swift
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

Mar 11, 2022
Campus Atlas -- a Mapping & GIS solution which provides easy access to navigating the campus around you.
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

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

Jun 23, 2022
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

Jun 13, 2022
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

Feb 5, 2022
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

Jun 16, 2022
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

May 30, 2022