gpt4 book ai didi

ios - ARCGIS 自动在 map 上显示标注

转载 作者:行者123 更新时间:2023-11-29 01:45:18 25 4
gpt4 key购买 nike

我想在 map 缩放到坐标时显示标注。我有一个 TableView Controller ,它列出了所有标注并在按下时缩放到它们的位置。这是方法:

-(void)handlePodNotifications:(NSNotification *) notification
{
if ([[notification name] isEqualToString:@"PodInteraction"])
{
PodInteractionObject *interactionObject = [notification object];

if([interactionObject.interactionName isEqualToString:@"ZoomToCrew"])
{
AGSGraphic *temp = (AGSGraphic *)interactionObject.interactionObject;
CGPointMake(0, 0);
double xcoord = [[temp valueForKey:@"lon"] doubleValue];
double ycoord = [[temp valueForKey:@"lat"] doubleValue];
AGSPoint *newPoint = [AGSPoint pointWithX:xcoord y:ycoord spatialReference:[AGSSpatialReference wgs84SpatialReference]];

[self.mapView zoomToResolution:.2 withCenterPoint:newPoint animated:YES];
[self.mapView allowCallout];


}

}
}

我查看了适用于 iOS 的 ARCGIS SDK 并找到了 AGSCallout 的类引用:

 - (void) showCalloutAt:(AGSPoint *) screenOffset:(CGPoint)
animated:(BOOL)

每次我尝试使用它时,它都说该方法已被弃用。

最佳答案

您可以改用此方法。

 - (BOOL) showCalloutAtPoint:(AGSPoint *)mapPoint forFeature:(id< AGSFeature >)feature layer:(AGSLayer< AGSHitTestable > *)layer animated:(BOOL)animated

关于ios - ARCGIS 自动在 map 上显示标注,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31997337/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com