VMMapViewDelegate

@objc public protocol VMMapViewDelegate: NSObjectProtocol

Protocol for receiving VMMapView callbacks

Since

1.1
  • Called when the map view has finished loading

    Warning

    Deprecated in 1.2.1. Use didFinishLoadingMapView: instead.

    Declaration

    Swift

    @objc optional func didFinishLoadingMap(map: VMMapView);

    Parameters

    map

    the map

  • Called when the map view has finished loading

    Since

    1.2.1

    Declaration

    Swift

    @objc optional func didFinishLoadingMapView(_ mapView: VMMapView);

    Parameters

    mapView

    the mapView

  • Called when the map view fails to load

    Since

    1.2

    Warning

    Deprecated in 1.2.1. Use didFailToLoadMapView: instead.

    Declaration

    Swift

    @objc optional func didFailToLoadMap(error: Error);

    Parameters

    error

    the error that caused the failure

  • Called when the mapview fails to load

    Since

    1.2.1

    Declaration

    Swift

    @objc optional func didFailToLoadMapView(error: Error);

    Parameters

    error

    the error that caused the failure

  • Called to see if its possible to select a unit

    Declaration

    Swift

    @objc optional func canSelectUnit(_ unit: VMMSMapUnit ) -> Bool;

    Parameters

    unit

    the unit to select

    Return Value

    true to allow selection, false otherwise

  • Called after a new unit has been selected

    Declaration

    Swift

    @objc optional func didSelectUnit(_ unit: VMMSMapUnit? );

    Parameters

    unit

    the unit that is selected

  • Called to verify that it’s OK to update the camera position. You might use this method to restrict camera movement.

    Since

    1.2

    Declaration

    Swift

    @objc optional func shouldChangeCameraPosition(toLocation newLocation: CLLocationCoordinate2D, toBearing newBearing: Double, toTilt newTilt: Double ) -> Bool;

    Parameters

    newLocation

    the newLocation

    newBearing

    the new bearing

    newTilt

    the new tilt

    Return Value

    true to proceed with changeing the camera

  • Called when the map position changes

    Declaration

    Swift

    @objc optional func didChangeCameraPosition(toLocation newLocation: CLLocationCoordinate2D, toZoom newZoom: Float,toBearing newBearing: Double, toTilt newTilt: Double);

    Parameters

    newLocation

    the new map location

    newZoom

    the new map zoom

    newBearing

    the new map bearing

    newTilt

    the new map tilt

  • Called to get stroke color for a polyline, should NOT have transparency

    Declaration

    Swift

    @objc optional func strokeColorForPolyline(_ line: VMPolyline) -> UIColor?;

    Parameters

    line

    the line

    Return Value

    the color of the line, or nil to use defaults

  • Called to get the line width for a polyline

    Declaration

    Swift

    @objc optional func lineWidthForPolyline( _ line: VMPolyline) -> Float;

    Parameters

    line

    the line

    Return Value

    the width

  • Called to get transparency value for a polyline

    Declaration

    Swift

    @objc optional func alphaForPolyline( _ line: VMPolyline) -> Float;

    Parameters

    line

    the line

    Return Value

    the transparency value (0 for invisible, 1.0 to fully opaque)

  • Called to provide a custom view for a waypoint annotation

    Declaration

    Swift

    @objc optional func viewForWaypointAnnotation( _ annotation: VMWaypointAnnotation) -> UIView?;

    Parameters

    annotation

    the annotation

    Return Value

    the custom view

  • Called to provide a custom view for a point annotation

    Declaration

    Swift

    @objc optional func viewForPointAnnotation( _ annotation: VMPointAnnotation ) -> UIView?;

    Parameters

    annotation

    the annotation

    Return Value

    the custom view

  • Called to provide a custom image for the floor change annotation button

    Declaration

    Swift

    @objc optional func imageForFloorChangeAnnotation( _ annotation: VMFloorChangePointAnnotation) -> UIImage?;

    Parameters

    annotation

    the annotation

    Return Value

    the custom image

  • Called to provide a custom image for a landmark annotation

    Declaration

    Swift

    @objc optional func imageForLandmarkAnnotation( _ annotation: VMLandmarkAnnotation) -> UIImage?;

    Parameters

    annotation

    the annotation

    Return Value

    the custom image

  • Called to provide a custom image for a point annotation

    Declaration

    Swift

    @objc optional func imageForPointAnnotation ( _ annotation: VMPointAnnotation ) -> UIImage?;

    Parameters

    annotation

    the annotation

    Return Value

    the custom image

  • Called when floor change annotation is selected

    Declaration

    Swift

    @objc optional func didSelectFloorChangeAnnotation( _ annotation: VMFloorChangePointAnnotation);

    Parameters

    annotation

    the annotation

  • Called when a map annotation is selected

    Since

    1.2

    Declaration

    Swift

    @objc optional func didSelectAnnotation( _ annotation: VMMapAnnotation);

    Parameters

    annotation

    the annotation