Latest 1.0.0
Homepage https://github.com/PoissonBallon/GoogleStaticMapsKit
License MIT
Platforms ios 8.0, osx 10.10, watchos 2.0, tvos 9.0
Frameworks Foundation
Authors




GoogleStaticMapsKit


Version
Carthage compatible
Platform

Swift 4

License

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

Getting Started

Example

// Setting up the API Key (probably in AppDelegate)
GoogleStaticMaps.setAPIKey(apiKey: "your_api_key")

let locationCenter = LocationCenter.geo(latitude: 45.7772, longitude: 3.0870)
let imageSize = ImageSize(width: 200, height: 200)

let point = Location(center: locationCenter, zoom: .city)
let setting = Parameters(size: imageSize)

// Use GoogleStaticMaps Object
let gsm = GoogleStaticMaps(point: point, setting: setting)
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 component = Feature(styles: styles)
let gsm = GoogleStaticMaps(point: point, setting: setting, component: component)

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

Support

  • Location parameters
    • [x] Center by coordinates
    • [x] Center by adress
    • [x] Zoom Level
  • Map parameters
    • [x] Size
    • [x] Scale
    • [x] Format (png/gif/jpg)
    • [x] Map Type (roadmap / satellite / hybrid / terrain)
    • [x] Language
    • [x] Region
  • Feature parameters
    • [x] Markers
    • [ ] Path
    • [ ] Visible
    • [x] Style
  • Key and Signature parameters
    • [x] 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.

Latest podspec

{
    "name": "GoogleStaticMapsKit",
    "version": "1.0.0",
    "summary": "GoogleStaticMapsKit provide a full swift API for dealing with Google Static Maps API",
    "description": "GoogleStaticMapsKit provide a full swift API for dealing with Google Static Maps API",
    "homepage": "https://github.com/PoissonBallon/GoogleStaticMapsKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Allan Vialatte": "[email protected]"
    },
    "social_media_url": "",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/PoissonBallon/GoogleStaticMapsKit.git",
        "tag": "1.0.0"
    },
    "source_files": "Sources/**/*",
    "frameworks": "Foundation",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This