AWFWeatherMapDataSource

@protocol AWFWeatherMapDataSource <NSObject>

The AWFWeatherMapDataSource protocol is adopted by an object that provides a weather map with the information it needs for representing data on the map.

  • Asks the data source for the request options to use for the specified layer.

    This method allows you to override the default request options for point and shape data sources on a weather map. Returning nil will inform the weather map to use the default request options for the layer. Request options are not used for raster or tile map content sources.

    Declaration

    Objective-C

    - (id)weatherMap:(nonnull AWFWeatherMap *)weatherMap
        requestOptionsForLayer:(nonnull AWFMapLayer)layerType;

    Swift

    optional func weatherMap(_ weatherMap: AWFWeatherMap, requestOptionsForLayer layerType: Any!) -> Any!

    Parameters

    weatherMap

    The weather map requesting the options

    layerType

    The layer that will perform the request

    Return Value

    The request options to use when requesting data for the layer

  • Asks the data source for the content view to display in an annotation’s callout view.

    Declaration

    Objective-C

    - (nullable UIView *)weatherMap:(nonnull AWFWeatherMap *)weatherMap
           calloutViewForAnnotation:(nonnull id<AWFAnnotation>)annotation;

    Swift

    optional func weatherMap(_ weatherMap: AWFWeatherMap, calloutViewFor annotation: AWFAnnotation) -> UIView?

    Parameters

    weatherMap

    The weather map requesting the object

    annotation

    The annotation associated with the callout view

    Return Value

    A view to be displayed in the callout for the annotation

  • Asks the data source for the content view to display when a weather map receives a long press gesture.

    Declaration

    Objective-C

    - (nullable UIView *)weatherMapCalloutContentViewForLongPress:
        (nonnull AWFWeatherMap *)weatherMap;

    Swift

    optional func weatherMapCalloutContentView(forLongPress weatherMap: AWFWeatherMap) -> UIView?

    Parameters

    weatherMap

    The weather map that received the long press

    Return Value

    A view to be displayed in the callout