sách gpt4 ăn đã đi

ios - 以编程方式关闭标记的信息窗口 google maps iOS

In lại 作者:技术小花猫 更新时间:2023-10-29 10:06:24 32 4
mua khóa gpt4 giày nike

我知道这在 Java 版本的 Google map 中很容易,但我不知道如何在 Objective-C 版本的 SDK 中关闭信息窗口。

我正在使用这种方法:

-(void) mapView:(GMSMapView *)mapView
didTapInfoWindowOfMarker:(id)marker {

sharedGlobal.shouldShowPlayer = YES;

/* adds the path to the map by decoding google's encoded string */
[self addPath: sharedGlobal.encodedPathString];
}

并想添加一行来关闭与标记关联的信息窗口。

câu trả lời hay nhất

我想你可以用这个:

mapView.selectedMarker = nil;

GMSMapView.h 中关于 selectedMarker 属性的注释是这样说的:

/**
* The marker that is selected. Setting this property selects a particular
* marker, showing an info window on it. If this property is non-nil, setting
* it to nil deselects the marker, hiding the info window. This property is
* observable using KVO.
*/
@property (nonatomic, strong) id selectedMarker;

关于ios - 以编程方式关闭标记的信息窗口 google maps iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15794797/

32 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress