for (YXForumDataInfoModel *m in ms) { CLLocationCoordinate2D coords = CLLocationCoordinate2DMake(m.lat,m.lon);//纬度,经度 [[BDArcGISUtil ins] pinAtPoint:[AGSPoint pointWithCLLocationCoordinate2D:coords] info:[m yy_modelToJSONObject]]; }
AGSMapView的callout
为实现点击标点位置的点击,使用AGSMapView的如下回调
1 2 3 4 5 6 7
/** Tells the delegate that the user single-tapped at the specified location. @param geoView on which the user performed the interaction. @param screenPoint Location where the user tapped in screen coordinates. @param mapPoint Location where the user tapped in map coordinates. @since 100 */ - (void)geoView:(AGSGeoView *)geoView didTapAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
为监测点击的区域是否打点区域,使用AGSMapView的如下方法
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/** Identify (hit-test) which graphics appear at the specified screen coordinates in the provided graphics overlay. @param graphicsOverlay in which to identify graphics @param screenPoint at which to identify graphics @param tolerance radius in points specifying how precise the identify operation should be. A value of 0 means that it should be extremely precise - only those graphics appearing at the exact coordinates should be returned. A value of 22 (a good default for touch displays which covers an average finger tap) means graphics appearing within a 44 pt buffer can also be returned. Max value permitted is 100. @param returnPopupsOnly specifies what the identify results should contain. If set to YES, only overlays with popups will be retured. If set to NO, all overlays (with or without popups) will be retured. @param maximumResults that should be returned as the result @param completion block that is invoked when the operation is complete with the result. @return operation which can be canceled @since 100 */ -(id<AGSCancelable>)identifyGraphicsOverlay:(AGSGraphicsOverlay*)graphicsOverlay screenPoint:(CGPoint)screenPoint tolerance:(double)tolerance returnPopupsOnly:(BOOL)returnPopupsOnly maximumResults:(NSInteger)maximumResults completion:(void(^)(AGSIdentifyGraphicsOverlayResult *identifyResult))completion;