File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed
main/java/com/mapbox/maps
test/java/com/mapbox/maps Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ package com.mapbox.maps {
220220 method public com.mapbox.maps.MapOptions getMapOptions();
221221 method public double getMetersPerPixelAtLatitude(double latitude, double zoom);
222222 method public double getMetersPerPixelAtLatitude(double latitude);
223+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public com.mapbox.maps.Map getNativeMap();
223224 method public byte getPrefetchZoomDelta();
224225 method public boolean getRenderWorldCopies();
225226 method public com.mapbox.maps.Size getSize();
Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
220220 public fun getMapOptions ()Lcom/mapbox/maps/MapOptions;
221221 public fun getMetersPerPixelAtLatitude (D)D
222222 public fun getMetersPerPixelAtLatitude (DD)D
223+ public final fun getNativeMap ()Lcom/mapbox/maps/Map;
223224 public final fun getPrefetchZoomDelta ()B
224225 public final fun getRenderWorldCopies ()Z
225226 public fun getSize ()Lcom/mapbox/maps/Size;
Original file line number Diff line number Diff line change @@ -2842,6 +2842,14 @@ class MapboxMap :
28422842 }
28432843 }
28442844
2845+ /* *
2846+ * For internal usage only.
2847+ */
2848+ @MapboxExperimental
2849+ @MapboxDelicateApi
2850+ @RestrictTo(RestrictTo .Scope .LIBRARY_GROUP_PREFIX )
2851+ fun getNativeMap (): Map = nativeMap.map
2852+
28452853 /* *
28462854 * A convenience object to access MapboxMap's static utilities.
28472855 */
Original file line number Diff line number Diff line change @@ -1833,6 +1833,14 @@ class MapboxMapTest {
18331833 verifyOnce { mapboxMap.getViewAnnotationAvoidLayers() }
18341834 assertEquals(layerIds, mapboxMap.getViewAnnotationAvoidLayers())
18351835 }
1836+
1837+ @OptIn(MapboxExperimental ::class , MapboxDelicateApi ::class )
1838+ @Test
1839+ fun getNativeMap () {
1840+ val map = mockk<Map >()
1841+ every { nativeMap.map } returns map
1842+ assertEquals(mapboxMap.getNativeMap(), map)
1843+ }
18361844}
18371845
18381846@RunWith(ParameterizedRobolectricTestRunner ::class )
You can’t perform that action at this time.
0 commit comments