Map View

The Map component is build to show point annotation to the map. You can install it manually or using Cocoapod package manager.

Name Version Content
MGMapKit 0.1.6 UINavigationBar - UIMapView

Installation

To install this component you can use Cocoapods or drag and drop the folder of the component into your project manually.

Cocoapods

MGMapKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MGMapKit', :git => 'https://haraldbregu:4a4d1162147e80549f22cafb59060bdf59c4934a@github.com/HaraldBregu/MGMapKit.git'

Customization

To customize content of Map component you have to edit MapComponent.swift file. By updating and changing this file you will have different items in the list. Follow the steps below.

Items

Open the file and start edit the content. To change, add or remove items as example:

var london = MGMapDataItem()
london.location = "London"
london.latitude = 51.507222
london.longitude = -0.1275
items.append(london)

Assets

To change the items of content, edit this code of lines:

return MapAsset(
    string: MapString(
        title: "NAVIGATION TITLE",
        navigationTitle: "NAVIGATION TITLE"),
    font: MapFont(),
    image: MapImage(),
    color: MapColor(
        navigationBar: MGTemplate.color.navigationBar,
        navigationBarContent: MGTemplate.color.text.primary,
        searchBar: MGTemplate.color.searchBar,
        searchBarContent: MGTemplate.color.text.primary,
        toolBar: MGTemplate.color.searchBar,
        toolBarContent: MGTemplate.color.text.primary,
        view: MGTemplate.color.view,
        viewContent: MGTemplate.color.text.primary),
    data: MapData(
        items: items))