Skip to content

rtimpone/google-maps-url-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Google Maps URL Helper

This is a simple helper class to generate iOS Google Maps urls. The file is written in Swift and has two static functions. The first checks the device to see if it can open a Google Maps url. The second creates a Google Maps url with a start location, destination location, and transportation mode. These parameters are all optional. The function also takes a boolean to indicate whether a callback button should be added when google maps is opened. For more info on how callbacks work in Google Maps, see the documentation.

This helper class was created as part of a biking app I'm working on. It includes some new Swift features I was playing around with such as nested functions, string interpolation, optionals, and string based enums.

The iOS Google Maps URL scheme documentation can be found here: https://developers.google.com/maps/documentation/ios/urlscheme

About

A simple helper class to generate iOS Google Maps urls

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages