Class Info |
|---|
@protocol HMapViewDelegate <NSObject> Delegate class for HMapView. |
Qualifier and Type | Method Name and Description |
|---|---|
void | locationManagerDidChangeAuthorization: Called when the user location permission changes. |
void | Called when the map view stops location. |
void | Called after the map is initialized and configuration file is loaded. |
void | Called when the map view is about to start location. |
void | mapView:annotationViewCalloutTapped: Called when a callout view is selected. |
void | mapView:annotationView:didChangeDragState:fromOldState: Called when the view status changes during the drag of the annotation view. |
UIView * | mapView:customCalloutForAnnotationView: Called when a CustomCallout object is generated based on annotationView. |
void | mapView:didAddAnnotationViews: Called when an annotation view is added to mapView. |
void | Called when an overlay view is added to mapView. |
void | mapView:didChangeUserTrackingMode:animated: Called when userTrackingMode changes during location. |
void | mapView:didDeselectAnnotationView: Called when an annotation view is deselected. |
void | mapView:didFailToLocateUserWithError: Called when location fails. |
void | mapView:didLongGuestureTapAtCoordinate: Called when the map is long pressed. |
void | mapView:didSelectAnnotationView: Called when an annotation view is selected. |
void | Called when a blank area on the map is tapped. |
void | Called when the my-location icon on the map is tapped. |
void | Called when an overlay on the map is tapped. |
void | Called when a POI on the map is tapped. |
void | mapView:didUpdateUserLocation:fromHeading: Called when the user location is updated. |
| Generates a view based on the specified annotation. | |
| Generates a view based on the specified overlay. |
Method |
|---|
- (void)locationManagerDidChangeAuthorization:(HMapView *)mapView Called when the user location permission changes. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
Method |
|---|
- (void)mapViewDidStopLocatingUser:(HMapView *)mapView Called when the map view stops location. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
Method |
|---|
- (void)mapViewInitComplete:(HMapView *)mapView Called after the map is initialized and configuration file is loaded. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
Method |
|---|
- (void)mapViewWillStartLocatingUser:(HMapView *)mapView Called when the map view is about to start location. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
Method |
|---|
- (void)mapView:(HMapView *)mapView annotationViewCalloutTapped:(HAnnotationView *)view Called when a callout view is selected. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
view | Annotation view corresponding to the selected callout view. |
Method |
|---|
- (void)mapView:(HMapView *)mapView annotationView:(HAnnotationView *)view didChangeDragState:(HAnnotationViewDragState)newState fromOldState:(HAnnotationViewDragState)oldState Called when the view status changes during the drag of the annotation view. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
view | Target annotation view. |
newState | New status. |
oldState | Old status. |
Method |
|---|
- (UIView *)mapView:(HMapView *)mapView customCalloutForAnnotationView:(HAnnotationView *)annotationView Called when a CustomCallout object is generated based on annotationView. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
annotationView | Specified annotation view. |
Returns
Type | Description |
|---|---|
UIView * | CustomCallout object. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didAddAnnotationViews:(NSArray<HAnnotationView *> *)views Called when an annotation view is added to mapView. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
views | Added annotation view. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didAddOverlayViews:(NSArray *)overlayViews Called when an overlay view is added to mapView. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
overlayViews | Added overlay view. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didChangeUserTrackingMode:(HUserTrackingMode)mode animated:(BOOL)animated Called when userTrackingMode changes during location. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
mode | User tracking mode (HUserTrackingMode). |
animated | Indicates whether animation is enabled.
|
Method |
|---|
- (void)mapView:(HMapView *)mapView didDeselectAnnotationView:(HAnnotationView *)view Called when an annotation view is deselected. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
view | Annotation view that is deselected. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didFailToLocateUserWithError:(NSError *)error Called when location fails. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
error | Error code, which is defined in CLError.h. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didLongGuestureTapAtCoordinate:(CLLocationCoordinate2D)coordinate Called when the map is long pressed. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
coordinate | Longitude-latitude coordinates. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didSelectAnnotationView:(HAnnotationView *)view Called when an annotation view is selected. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
view | Selected annotation view. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate Called when a blank area on the map is tapped. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
coordinate | Coordinates. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didTapMyLocation:(CLLocationCoordinate2D)location Called when the my-location icon on the map is tapped. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
location | Longitude-latitude coordinates of the pinpointed location. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didTapOverlay:(id <HOverlay>)overlay Called when an overlay on the map is tapped. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
overlay | Overlay object. Currently, only lines (Polyline and its subclasses) can be tapped. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didTapPoi:(HPoiInfo *)poi Called when a POI on the map is tapped. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
poi | POI data. |
Method |
|---|
- (void)mapView:(HMapView *)mapView didUpdateUserLocation:(HUserLocation *)userLocation fromHeading:(BOOL)fromHeading Called when the user location is updated. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
userLocation | New user location. |
fromHeading | Indicates whether the update is triggered by heading change.
|
Method |
|---|
- (HAnnotationView *)mapView:(HMapView *)mapView viewForAnnotation:(id <HAnnotation>)annotation Generates a view based on the specified annotation. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
annotation | Specified annotation. |
Returns
Type | Description |
|---|---|
Generated annotation view. |
Method |
|---|
- (HOverlayView *)mapView:(HMapView *)mapView viewForOverlay:(id <HOverlay>)overlay Generates a view based on the specified overlay. |
Parameters
Name | Description |
|---|---|
mapView | Map view. |
overlay | Specified overlay. |
Returns
Type | Description |
|---|---|
Generated overlay view. |