-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revisit MapboxMap plugin related extension functions to not use singl…
…etons (#75) * Move MapboxMap extension functions to sdk-base * Move extension functions back to plugins * Add tests
- Loading branch information
Showing
7 changed files
with
199 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
sdk-base/src/main/java/com/mapbox/maps/plugin/delegates/MapPluginExtensionsDelegate.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.mapbox.maps.plugin.delegates | ||
|
||
import com.mapbox.maps.plugin.animation.CameraAnimationsPlugin | ||
import com.mapbox.maps.plugin.gestures.GesturesPlugin | ||
|
||
/** | ||
* Definition of the map plugin extensions delegate. | ||
* Makes possible to call plugin functions directly from MapboxMap. | ||
*/ | ||
interface MapPluginExtensionsDelegate { | ||
|
||
/** | ||
* Call extension function on [CameraAnimationsPlugin]. | ||
* In most cases should not be called directly. | ||
*/ | ||
fun cameraAnimationsPlugin(function: (CameraAnimationsPlugin.() -> Any?)): Any? | ||
|
||
/** | ||
* Call extension function on [GesturesPlugin]. | ||
* In most cases should not be called directly. | ||
*/ | ||
fun gesturesPlugin(function: (GesturesPlugin.() -> Any?)): Any? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.