All Projects β†’ fmo91 β†’ Mapkitgooglestyler

fmo91 / Mapkitgooglestyler

Licence: mit
Customize iOS MapKit using Google JSON styles

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Mapkitgooglestyler

Slopeninja Frontend
Slope Ninja Frontend πŸ‚β„οΈβ›„οΈ
Stars: ✭ 39 (-62.86%)
Mutual labels:  google-maps
Leaflet Geoman
πŸ‚πŸ—ΊοΈ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+936.19%)
Mutual labels:  google-maps
Placeline Nextjs
HyperTrack Placeline web application sample using NextJS, Ant-Design, Styled-Components, and Heroku
Stars: ✭ 88 (-16.19%)
Mutual labels:  google-maps
Magento2 Google Address Lookup
Provides an address lookup service on a Magento 2 store powered by the Google Places API
Stars: ✭ 46 (-56.19%)
Mutual labels:  google-maps
Django Places
A django app for store places with autocomplete
Stars: ✭ 55 (-47.62%)
Mutual labels:  google-maps
Making Maps With React
🌐 Example React components for React-Leaflet, Pigeon Maps, React MapGL and more
Stars: ✭ 66 (-37.14%)
Mutual labels:  google-maps
Maps Android Folding map
Sample showing how to create a folding map effect using the Google Maps Android API v2 and FoldingLayout
Stars: ✭ 28 (-73.33%)
Mutual labels:  google-maps
Maps Location History
Get, Concatenate and Process you location history from Google Maps TimeLine
Stars: ✭ 99 (-5.71%)
Mutual labels:  google-maps
Bikedeboa
A (Progressive) Web App to find, map and review bike parkings in the cities of Brazil.
Stars: ✭ 54 (-48.57%)
Mutual labels:  google-maps
Googlemaps Scraper
Google Maps reviews scraping
Stars: ✭ 87 (-17.14%)
Mutual labels:  google-maps
Mygoogleplaces
A simple demo of Google Places.
Stars: ✭ 46 (-56.19%)
Mutual labels:  google-maps
React Native Bottom Sheet Behavior
react-native wrapper for android BottomSheetBehavior
Stars: ✭ 1,068 (+917.14%)
Mutual labels:  google-maps
Wagtailgmaps
Simple Google Maps address formatter for Wagtail fields
Stars: ✭ 68 (-35.24%)
Mutual labels:  google-maps
Maplace.js
A Google Maps Javascript plugin for jQuery.
Stars: ✭ 1,021 (+872.38%)
Mutual labels:  google-maps
Wagtail Geo Widget
Wagtail-Geo-Widget is the complete map solution for your Wagtail site.
Stars: ✭ 90 (-14.29%)
Mutual labels:  google-maps
Pizza Delivery
university project : Android pizza delivery app
Stars: ✭ 32 (-69.52%)
Mutual labels:  google-maps
Curve Fit
Curve-Fit is an Android library for drawing curves on Google Maps
Stars: ✭ 63 (-40%)
Mutual labels:  google-maps
Blazorgooglemaps
Blazor interop for GoogleMap library
Stars: ✭ 101 (-3.81%)
Mutual labels:  google-maps
Instagram Clone
Web/Android/iOS app to share photos on Google Maps in < 300 lines of code. Features REST API, shake to undo, OAuth login etc.
Stars: ✭ 99 (-5.71%)
Mutual labels:  google-maps
React Places Autocomplete
React component for Google Maps Places Autocomplete
Stars: ✭ 1,265 (+1104.76%)
Mutual labels:  google-maps

MapKitGoogleStyler

CI Status Version License Platform

Introduction

MapKitGoogleStyler allows you to include Google Maps JSON styles, that you can create here, and customize your MKMapView to look just like you want (or your client). Including this library is very very easy.

A post explaining this in detail can be found here: https://medium.com/@ortizfernandomartin/customize-mapkits-mkmapview-with-google-maps-styling-wizard-a5dcc095e19f#.ss3dencgh

Example

Using this can't be simpler. The code is self explanatory

//
//  ViewController.swift
//  MapKitGoogleStylerExample
//
//  Created by Fernando Ortiz on 2/6/17.
//  Copyright Β© 2017 Fernando MartΓ­n Ortiz. All rights reserved.
//
import UIKit
import MapKit
import MapKitGoogleStyler

class ViewController: UIViewController {

    @IBOutlet weak var mapView: MKMapView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        mapView.delegate = self
        configureTileOverlay()
    }
    
    private func configureTileOverlay() {
        // We first need to have the path of the overlay configuration JSON
        guard let overlayFileURLString = Bundle.main.path(forResource: "overlay", ofType: "json") else {
                return
        }
        let overlayFileURL = URL(fileURLWithPath: overlayFileURLString)
        
        // After that, you can create the tile overlay using MapKitGoogleStyler
        guard let tileOverlay = try? MapKitGoogleStyler.buildOverlay(with: overlayFileURL) else {
            return
        }
        
        // And finally add it to your MKMapView
        mapView.add(tileOverlay)
    }
    
}

extension ViewController: MKMapViewDelegate {
    func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
        // This is the final step. This code can be copied and pasted into your project
        // without thinking on it so much. It simply instantiates a MKTileOverlayRenderer
        // for displaying the tile overlay.
        if let tileOverlay = overlay as? MKTileOverlay {
            return MKTileOverlayRenderer(tileOverlay: tileOverlay)
        } else {
            return MKOverlayRenderer(overlay: overlay)
        }
    }
}

Requirements

  • Swift 3
  • MapKit, of course

Installation

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

pod "MapKitGoogleStyler"

Author

fmo91, [email protected]

License

MapKitGoogleStyler is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].