{"id":15787182,"url":"https://github.com/fmo91/mapkitgooglestyler","last_synced_at":"2025-06-18T07:37:01.925Z","repository":{"id":51476315,"uuid":"80645004","full_name":"fmo91/MapKitGoogleStyler","owner":"fmo91","description":"Customize iOS MapKit using Google JSON styles","archived":false,"fork":false,"pushed_at":"2021-05-11T18:03:33.000Z","size":43,"stargazers_count":132,"open_issues_count":11,"forks_count":41,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-11T21:45:48.098Z","etag":null,"topics":["google-maps","ios","mapkit","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fmo91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-01T17:29:29.000Z","updated_at":"2024-10-10T14:38:03.000Z","dependencies_parsed_at":"2022-08-20T12:31:28.237Z","dependency_job_id":null,"html_url":"https://github.com/fmo91/MapKitGoogleStyler","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmo91%2FMapKitGoogleStyler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmo91%2FMapKitGoogleStyler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmo91%2FMapKitGoogleStyler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmo91%2FMapKitGoogleStyler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fmo91","download_url":"https://codeload.github.com/fmo91/MapKitGoogleStyler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230554330,"owners_count":18244234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-maps","ios","mapkit","swift"],"created_at":"2024-10-04T21:06:09.941Z","updated_at":"2024-12-20T08:08:23.972Z","avatar_url":"https://github.com/fmo91.png","language":"Swift","readme":"# MapKitGoogleStyler\n\n[![CI Status](http://img.shields.io/travis/fmo91/MapKitGoogleStyler.svg?style=flat)](https://travis-ci.org/fmo91/MapKitGoogleStyler)\n[![Version](https://img.shields.io/cocoapods/v/MapKitGoogleStyler.svg?style=flat)](http://cocoapods.org/pods/MapKitGoogleStyler)\n[![License](https://img.shields.io/cocoapods/l/MapKitGoogleStyler.svg?style=flat)](http://cocoapods.org/pods/MapKitGoogleStyler)\n[![Platform](https://img.shields.io/cocoapods/p/MapKitGoogleStyler.svg?style=flat)](http://cocoapods.org/pods/MapKitGoogleStyler)\n\n## Introduction\n\nMapKitGoogleStyler allows you to include Google Maps JSON styles, that you can create [here](https://mapstyle.withgoogle.com/), and customize your MKMapView to look just like you want (or your client). Including this library is very very easy.\n\nA post explaining this in detail can be found here: https://medium.com/@ortizfernandomartin/customize-mapkits-mkmapview-with-google-maps-styling-wizard-a5dcc095e19f#.ss3dencgh\n\n## Example\n\nUsing this can't be simpler. The code is self explanatory\n\n```swift\n//\n//  ViewController.swift\n//  MapKitGoogleStylerExample\n//\n//  Created by Fernando Ortiz on 2/6/17.\n//  Copyright © 2017 Fernando Martín Ortiz. All rights reserved.\n//\nimport UIKit\nimport MapKit\nimport MapKitGoogleStyler\n\nclass ViewController: UIViewController {\n\n    @IBOutlet weak var mapView: MKMapView!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        mapView.delegate = self\n        configureTileOverlay()\n    }\n    \n    private func configureTileOverlay() {\n        // We first need to have the path of the overlay configuration JSON\n        guard let overlayFileURLString = Bundle.main.path(forResource: \"overlay\", ofType: \"json\") else {\n                return\n        }\n        let overlayFileURL = URL(fileURLWithPath: overlayFileURLString)\n        \n        // After that, you can create the tile overlay using MapKitGoogleStyler\n        guard let tileOverlay = try? MapKitGoogleStyler.buildOverlay(with: overlayFileURL) else {\n            return\n        }\n        \n        // And finally add it to your MKMapView\n        mapView.add(tileOverlay)\n    }\n    \n}\n\nextension ViewController: MKMapViewDelegate {\n    func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -\u003e MKOverlayRenderer {\n        // This is the final step. This code can be copied and pasted into your project\n        // without thinking on it so much. It simply instantiates a MKTileOverlayRenderer\n        // for displaying the tile overlay.\n        if let tileOverlay = overlay as? MKTileOverlay {\n            return MKTileOverlayRenderer(tileOverlay: tileOverlay)\n        } else {\n            return MKOverlayRenderer(overlay: overlay)\n        }\n    }\n}\n```\n\n## Requirements\n\n* Swift 3\n* MapKit, of course\n\n## Installation\n\nMapKitGoogleStyler is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"MapKitGoogleStyler\"\n```\n\n## Author\n\nfmo91, ortizfernandomartin@gmail.com\n\n## License\n\nMapKitGoogleStyler is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmo91%2Fmapkitgooglestyler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmo91%2Fmapkitgooglestyler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmo91%2Fmapkitgooglestyler/lists"}