小编ths*_*art的帖子

如何使用 Apple MapKit 从 VisibleRegion 获取纬度/经度坐标?

我需要可见地图视图的右上和左下坐标。

在 mapViewDidChangeVisibleRegion 中我得到了值。

class ViewController: UIViewController, MKMapViewDelegate {

    @IBOutlet weak var mapView: MKMapView!

    var currentLocation: CLLocation!

    override func viewDidLoad() {
        super.viewDidLoad()

        self.mapView.delegate = self

        self.customizeMapView()

        currentLocation =  CLLocation(latitude: ( 37.334922), longitude: (-122.009033))

        self.centerMapOnLocation()

   }

    func customizeMapView(){
        self.mapView.showsBuildings = true
        self.mapView.showsCompass = true
        self.mapView.showsPointsOfInterest = true
        self.mapView.showsUserLocation = false
        self.mapView.userTrackingMode = .none
        self.mapView.showsZoomControls = true
        self.mapView.mapType = .satelliteFlyover       
    }

    func centerMapOnLocation(){

        let centerRegionCoordinate: CLLocationCoordinate2D = CLLocationCoordinate2D(latitude: currentLocation.coordinate.latitude, longitude: currentLocation.coordinate.longitude)

        let spanRegion:MKCoordinateSpan = MKCoordinateSpan(latitudeDelta: 0.0025, longitudeDelta: 0.0025)
        let mapRegion: MKCoordinateRegion = …
Run Code Online (Sandbox Code Playgroud)

mkmapview ios swift

2
推荐指数
1
解决办法
1506
查看次数

如何将字符串大写?

我需要大写一个字符串:

约翰·多伊 -> 约翰·多伊

这该怎么做?

我想需要使用 NORMALIZE_AND_CASEFOLD,但它返回一个小写。

https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#normalize_and_casefold

NORMALIZE_AND_CASEFOLD

NORMALIZE_AND_CASEFOLD(value[, normalization_mode]) 说明

取一个字符串、值,并执行与 NORMALIZE 相同的操作,以及对不区分大小写的操作进行大小写折叠。

NORMALIZE_AND_CASEFOLD 支持四种可选的归一化模式:

值 名称 说明 NFC 规范化形式 Canonical Composition 通过规范等价分解和重组字符。NFKC Normalization Form Compatibility Composition 通过兼容性分解字符,然后通过规范等价重新组合它们。NFD Normalization Form Canonical Decomposition 通过规范等价分解字符,多个组合字符按特定顺序排列。NFKD Normalization Form Compatibility Decomposition 按兼容性分解字符,多个组合字符按特定顺序排列。

string google-bigquery

0
推荐指数
1
解决办法
2729
查看次数

我的数据无法进行日期分区,如何使用群集?

目前,我正在使用以下查询:SELECT ID,Key FROM mydataset.mytable ,其中ID = 100077113?和Key ='06019'

我的数据有1亿行:

ID-唯一

钥匙-可以拥有约10,000个钥匙

如果我知道查找ID的键,则可以在大约10,000行上完成,并且工作更快,并且处理的数据更少。

如何在BigQuery中使用新的集群功能来对字段Key进行分区?

clustered-index google-bigquery partition

0
推荐指数
1
解决办法
1040
查看次数