Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Type problems with CustomGeometrySourceOptions fluent interface #12009

Closed
mkrussel77 opened this issue May 25, 2018 · 0 comments
Closed

Type problems with CustomGeometrySourceOptions fluent interface #12009

mkrussel77 opened this issue May 25, 2018 · 0 comments
Assignees
Labels
Android Mapbox Maps SDK for Android SEMVER-MAJOR Requires a major release according to Semantic Versioning rules

Comments

@mkrussel77
Copy link

Platform: Android
Mapbox SDK version: 6.1.1

The fluent interface for CustomGeometrySourceOptions is hard to use if you change paroperties from parent Options class.

This will not compile since withMaxZoom returns a GeoJsonOptions

new CustomGeometrySourceOptions()
     .withMaxZoom(6))
     .withClip(true)
     .withWrap(true)

You also get a cast error if you call it last and pass it into the CustomGeometrySource constructor. And have to cast the result.

new CustomeGeometrySource("sourceId", (bounds, zoomLevel) -> {}, 
       (CustomGeometrySourceOptions) new CustomGeometrySourceOptions().withClip(true).withWrap(true).withMaxZoom(6)); 

This is not a major issue, more of an inconvenience.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label May 25, 2018
@tobrun tobrun added the SEMVER-MAJOR Requires a major release according to Semantic Versioning rules label Jun 5, 2018
@tobrun tobrun added this to the android-v7.0.0 milestone Jun 5, 2018
@tobrun tobrun modified the milestone: android-v7.0.0 Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android SEMVER-MAJOR Requires a major release according to Semantic Versioning rules
Projects
None yet
Development

No branches or pull requests

3 participants