Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

PoissonBallon/GoogleStaticMapsKit

Repository files navigation


GoogleStaticMapsKit


Version Carthage compatible Platform

Swift 4

License

GoogleStaticMapsKit provides a full, lightweight swift API for dealing with Google Static Maps API.

Preview

record

Zoom

zoom-world
Zoom : .world zoom-continant
Zoom : .continent zoom-city
Zoom : .city zoom-street
Zoom : .street zoom-building
Zoom : .building

Style

Getting Started

Example

// Setting up the API Key (probably in AppDelegate)
GoogleStaticMaps.setAPIKey(apiKey: "your_api_key")
let parameters = Parameters(size: ImageSize(width: 600, height: 400))
let location = Location(center: .geo(latitude: 45.7772, longitude: 3.0870), zoom: .city)
let gsm = GoogleStaticMaps(location: location, parameters: parameters)
let url = gsm.toURL
print("Result : \(url)")

Style

GoogleStaticMapKit was designed to support JSON Style like SnazzyMaps

[...]
let path = jsonFilePath
let styles = StylesImporter.fromJson(path: path).styles
let feature = Feature(styles: styles)
let gsm = GoogleStaticMaps(location: location, parameters: parameters, feature: feature)

For more information about Google Maps Style you can look on the official Google Documentation

Support

  • Location parameters
    • Center by coordinates
    • Center by adress
    • Zoom Level
  • Map parameters
    • Size
    • Scale
    • Format (png/gif/jpg)
    • Map Type (roadmap / satellite / hybrid / terrain)
    • Language
    • Region
  • Feature parameters
    • Markers
    • Path
    • Visible
    • Style
  • Key and Signature parameters
    • Key
    • Signature

Installation

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

CocoaPods

use_frameworks!
pod "GoogleStaticMapsKit"

Carthage

github 'PoissonBallon/GoogleStaticMapsKit'

Swift Package Manager

let package = Package(
 name: "MyPackage",
 dependencies: [
 .Package(url: "https://github.com/PoissonBallon/GoogleStaticMapsKit", majorVersion: 1),
 ]
)

Author

License

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

About

GoogleStaticMapsKit provides a full swift API for dealing with Google Static Maps API.

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /