Class CircleManager

    • Constructor Detail

      • CircleManager

        @UiThread
        public CircleManager​(@NonNull
                             com.mapbox.mapboxsdk.maps.MapView mapView,
                             @NonNull
                             com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap,
                             @NonNull
                             com.mapbox.mapboxsdk.maps.Style style)
        Create a circle manager, used to manage circles.
        Parameters:
        mapboxMap - the map object to add circles to
        style - a valid a fully loaded style object
      • CircleManager

        @UiThread
        public CircleManager​(@NonNull
                             com.mapbox.mapboxsdk.maps.MapView mapView,
                             @NonNull
                             com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap,
                             @NonNull
                             com.mapbox.mapboxsdk.maps.Style style,
                             @Nullable
                             java.lang.String belowLayerId,
                             @Nullable
                             java.lang.String aboveLayerId)
        Create a circle manager, used to manage circles.
        Parameters:
        mapboxMap - the map object to add circles to
        style - a valid a fully loaded style object
        belowLayerId - the id of the layer above the circle layer
        aboveLayerId - the id of the layer below the circle layer
      • CircleManager

        @UiThread
        public CircleManager​(@NonNull
                             com.mapbox.mapboxsdk.maps.MapView mapView,
                             @NonNull
                             com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap,
                             @NonNull
                             com.mapbox.mapboxsdk.maps.Style style,
                             @Nullable
                             java.lang.String belowLayerId,
                             @Nullable
                             java.lang.String aboveLayerId,
                             @Nullable
                             com.mapbox.mapboxsdk.style.sources.GeoJsonOptions geoJsonOptions)
        Create a circle manager, used to manage circles.
        Parameters:
        mapboxMap - the map object to add circles to
        style - a valid a fully loaded style object
        belowLayerId - the id of the layer above the circle layer
        aboveLayerId - the id of the layer below the circle layer
        geoJsonOptions - options for the internal source
    • Method Detail

      • create

        @UiThread
        public java.util.List<Circle> create​(@NonNull
                                             java.lang.String json)
        Create a list of circles on the map.

        Circles are going to be created only for features with a matching geometry.

        All supported properties are:
        CircleOptions.PROPERTY_CIRCLE_RADIUS - Float
        CircleOptions.PROPERTY_CIRCLE_COLOR - String
        CircleOptions.PROPERTY_CIRCLE_BLUR - Float
        CircleOptions.PROPERTY_CIRCLE_OPACITY - Float
        CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - Float
        CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - String
        CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - Float
        Learn more about above properties in the Style specification.

        Out of spec properties:
        "is-draggable" - Boolean, true if the circle should be draggable, false otherwise

        Parameters:
        json - the GeoJSON defining the list of circles to build
        Returns:
        the list of built circles
      • create

        @UiThread
        public java.util.List<Circle> create​(@NonNull
                                             com.mapbox.geojson.FeatureCollection featureCollection)
        Create a list of circles on the map.

        Circles are going to be created only for features with a matching geometry.

        All supported properties are:
        CircleOptions.PROPERTY_CIRCLE_RADIUS - Float
        CircleOptions.PROPERTY_CIRCLE_COLOR - String
        CircleOptions.PROPERTY_CIRCLE_BLUR - Float
        CircleOptions.PROPERTY_CIRCLE_OPACITY - Float
        CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - Float
        CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - String
        CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - Float
        Learn more about above properties in the Style specification.

        Out of spec properties:
        "is-draggable" - Boolean, true if the circle should be draggable, false otherwise

        Parameters:
        featureCollection - the featureCollection defining the list of circles to build
        Returns:
        the list of built circles
      • getCircleTranslate

        public java.lang.Float[] getCircleTranslate()
        Get the CircleTranslate property

        The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.

        Returns:
        property wrapper value around Float[]
      • setCircleTranslate

        public void setCircleTranslate​(java.lang.Float[] value)
        Set the CircleTranslate property

        The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.

        Parameters:
        value - property wrapper value around Float[]
      • getCircleTranslateAnchor

        public java.lang.String getCircleTranslateAnchor()
        Get the CircleTranslateAnchor property

        Controls the frame of reference for PropertyFactory.circleTranslate(java.lang.Float[]).

        Returns:
        property wrapper value around String
      • setCircleTranslateAnchor

        public void setCircleTranslateAnchor​(java.lang.String value)
        Set the CircleTranslateAnchor property

        Controls the frame of reference for PropertyFactory.circleTranslate(java.lang.Float[]).

        Parameters:
        value - property wrapper value around String
      • getCirclePitchScale

        public java.lang.String getCirclePitchScale()
        Get the CirclePitchScale property

        Controls the scaling behavior of the circle when the map is pitched.

        Returns:
        property wrapper value around String
      • setCirclePitchScale

        public void setCirclePitchScale​(java.lang.String value)
        Set the CirclePitchScale property

        Controls the scaling behavior of the circle when the map is pitched.

        Parameters:
        value - property wrapper value around String
      • getCirclePitchAlignment

        public java.lang.String getCirclePitchAlignment()
        Get the CirclePitchAlignment property

        Orientation of circle when map is pitched.

        Returns:
        property wrapper value around String
      • setCirclePitchAlignment

        public void setCirclePitchAlignment​(java.lang.String value)
        Set the CirclePitchAlignment property

        Orientation of circle when map is pitched.

        Parameters:
        value - property wrapper value around String
      • setFilter

        public void setFilter​(@NonNull
                              com.mapbox.mapboxsdk.style.expressions.Expression expression)
        Set filter on the managed circles.
        Parameters:
        expression - expression
      • getFilter

        @Nullable
        public com.mapbox.mapboxsdk.style.expressions.Expression getFilter()
        Get filter of the managed circles.
        Returns:
        expression