0

我有 [mkmapview annotations] 这是 MKPointAnnotation 的数组

我正在尝试将 ti 作为数组保存到 FireStore,但不接受 MKPointAnnotation 对象

然后我尝试将 MKPointAnnotation 转换为 FIRGeoPoint 但没有运气

for (MKPointAnnotation *point in annotationsArray) {
        FIRGeoPoint *FirAnnotations;
        FirAnnotations = [FirAnnotations initWithLatitude:point.coordinate.latitude longitude:point.coordinate.longitude];
        NSLog(@"FirAnnotations: %@",FirAnnotations);
    }

annotationsArray 是 [mkmapview 注释]

总是为空

4

1 回答 1

0

我正在尝试使用 FirAnnotations 指针来调用 init 但它为零,我应该在那里使用 FIRGeoPoint。

for (MKPointAnnotation *point in annotationsArray) {
        FIRGeoPoint *FirAnnotations;
        FirAnnotations = [[FIRGeoPoint alloc] initWithLatitude:point.coordinate.latitude                                                longitude:point.coordinate.longitude];
        NSLog(@"annotations: %@",annotations);
}
于 2019-01-16T21:27:02.443 回答