Skip to content

Instantly share code, notes, and snippets.

View dbabbs's full-sized avatar
Focusing

Dylan Babbs dbabbs

Focusing
View GitHub Profile
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 150, height: 50))
button.setTitle("Send to Snapchat", for: .normal)
button.setTitleColor(self.view.tintColor, for: .normal)
self.view.addSubview(button)
button.center = self.view.center
button.addTarget(self, action: #selector(self.send), for: .touchUpInside)
import UIKit
import SCSDKCreativeKit
import CoreLocation
func createMapImage() -> UIImage {
struct here {
static var id = "YOUR-HERE-APP-ID"
static var code = "YOUR-HERE-APP-CODE"
}
let lat = locationManager.location!.coordinate.latitude
let long = locationManager.location!.coordinate.longitude
//Map Image API parameters
let location = locationManager.location!.coordinate
import UIKit
import CoreLocation
class ViewController: UIViewController, CLLocationManagerDelegate {
var locationManager = CLLocationManager()
override func viewDidLoad() {
super.viewDidLoad()
<key>SCSDKClientId</key>
<string>YOUR-SNAPKIT-KEY</string>
<key>SCSDKRedirectUrl</key>
<string>https://developer.here.com</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>snapchat</string>
</array>
<key>CFBundleURLTypes</key>
<array>
Promise.all(urls.map(url => fetch(url)))
.then(resp => Promise.all(resp.map(r => r.json())))
.then(plot);
[{
"name": "Washington Road Usage Charge",
"link": "https://github.com/waruc",
"id": "waruc"
}, {
"name": "Croporama",
"link": "http://croporama.com",
"id": "croporama"
}, {
"name": "Jasper: Smart Mirror",

Step 3 - Making a Map with XYZ

Overview

Duration: 2:00

In this tutorial, you will learn to access data in a the HERE XYZ Space to make a map.

What you'll learn

  • How to view data from an XYZ Space on a map

Step 2 - Using the XYZ CLI

Overview

Duration: 10:00

In this tutorial, you will learn how to authenticate and upload GeoJSON using the command line interface. (If you haven't yet installed the XYZ CLI, please see the previous section in this codelab.

HERE credentials:

  • If you already have a HERE AppID and AppCode from the HERE Developer page, you can use them to access the XYZ CLI.
  • If not, you can use these temporary credentials: