func mapViewDidFinishLoadingMap(_ mapView: MGLMapView) {
let source = MGLSource(sourceIdentifier: "source")!
let symbolLayer = MGLSymbolStyleLayer(layerIdentifier: "place-city-sm", source: source)
let url = URL(string: "https://www.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson")!
let options = [MGLGeoJSONClusterOption: NSNumber(booleanLiteral: true),
MGLGeoJSONClusterRadiusOption: NSNumber(integerLiteral: 20),
MGLGeoJSONClusterMaximumZoomLevelOption: NSNumber(integerLiteral: 15)]
let geoJSONSource = MGLGeoJSONSource(sourceIdentifier: "earthquakes", url: url, options: options)
libc++abi.dylib: terminating with uncaught exception of type mbgl::gl::Error: glBufferData(target, pos, array, GL_STATIC_DRAW): Error GL_INVALID_OPERATION at /Users/boundsj/workspace/mbgl/src/mbgl/geometry/buffer.hpp:59
(lldb) bt
* thread #1: tid = 0x2a3a90, 0x000000010a1eddda libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x000000010a1eddda libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x000000010a225797 libsystem_pthread.dylib`pthread_kill + 90
frame #2: 0x0000000109f67ff7 libsystem_c.dylib`abort + 129
frame #3: 0x0000000109d3395a libc++abi.dylib`abort_message + 266
frame #4: 0x0000000109d58ce7 libc++abi.dylib`default_terminate_handler() + 243
frame #5: 0x000000010647f4b4 libobjc.A.dylib`_objc_terminate() + 124
// Ported from https://www.mapbox.com/mapbox-gl-js/example/heatmap/
func mapViewDidFinishLoadingMap(_ mapView: MGLMapView) {
let source = MGLSource(identifier: "source")
let symbolLayer = MGLSymbolStyleLayer(identifier: "place-city-sm", source: source)
let url = URL(string: "https://www.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson")!
let options = [MGLShapeSourceOption.clustered: NSNumber(booleanLiteral: true),
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source code for mapbox offline pack resume bug | |
// | |
// Adapted from https://www.mapbox.com/ios-sdk/examples/offline-pack/. | |
// To download, use the shake gesture (ctrl-cmd-Z), and kill the app. When the app is resumed | |
// it will find a partial pack and resume it. Notice how the network and disk activity shows | |
// that a download is indeed ocurring, while there are no notifications posted on progress. | |
import UIKit | |
import Mapbox |
OlderNewer