Скачиваете растровые плитки для оффлайн? - PullRequest
0 голосов
/ 02 октября 2019

Я подаю несколько растровых плиток с моего домашнего сервера через Mapbox. Хотя Mapbox поддерживает загрузку векторных данных Mapbox, он не загружает соответствующие растровые плитки для этой области, и я не могу найти никакой информации по этому вопросу. Любые идеи?

не уверен, что это имеет значение, но вот код для загрузки. его красивая котельная плита, кроме запроса имени

  var name = "My Map"
        let alert = UIAlertController(title: "Please Enter A Save Name", message: "Letters and numbers only.", preferredStyle: .alert)



        let doneAction = UIAlertAction(title: "Done", style: .default) { (_) in
            name = alert.textFields![0].text!
            self.startOfflineMapPackDownload(name: name)

        }
        doneAction.isEnabled = false
        alert.addAction(doneAction)
        alert.addTextField { (textField) in
            textField.autocapitalizationType = UITextAutocapitalizationType.words
            NotificationCenter.default.addObserver(forName: UITextField.textDidChangeNotification, object: textField, queue: OperationQueue.main, using:
                {_ in
                    //prevents spaces, punctuation, or symboles
                    //                    textField.text = textField.text?.trimmingCharacters(in: .whitespacesAndNewlines)
                    textField.text = textField.text?.trimmingCharacters(in: .newlines)
                    textField.text = textField.text?.trimmingCharacters(in: .punctuationCharacters)
                    textField.text = textField.text?.trimmingCharacters(in: .symbols)



                    // Being in this block means that something fired the UITextFieldTextDidChange notification.

                    // Access the textField object from alertController.addTextField(configurationHandler:) above and get the character count of its non whitespace characters
                    let textCount = textField.text?.trimmingCharacters(in: .whitespacesAndNewlines).count ?? 0
                    let textIsNotEmpty = textCount > 0

                    // If the text contains non whitespace characters, enable the OK Button
                    doneAction.isEnabled = textIsNotEmpty
                    name = textField.text!



            })
        }
        self.present(alert, animated: true, completion: {
            print("completion block")
        })


    } else {
        print("not zoomed in far enough")
        let alertController = UIAlertController(title: "You are not zoomed in enough",
                                                message: nil,
                                                preferredStyle: .alert)
        alertController.addAction(UIAlertAction(title: "Okay", style: .cancel))

        self.present(alertController, animated: true)
    }
...