forked from rnmapbox/maps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ios,v10): various fixes, warn if below/aboveLayerID doesn't exi… (
rnmapbox#2694) * chore(ios,v10): various fixes, warn if below/aboveLayerID doesn't exists. * chore(android,v10): kotlin, added and require existing when referring to existing layers/sources
- Loading branch information
Showing
98 changed files
with
1,955 additions
and
1,927 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
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: 0 additions & 23 deletions
23
...l/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.java
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
...mgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.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,21 @@ | ||
package com.mapbox.rctmgl.components.styles.layers | ||
|
||
import android.content.Context | ||
import com.mapbox.maps.extension.style.layers.generated.BackgroundLayer | ||
import com.mapbox.rctmgl.components.styles.RCTMGLStyle | ||
import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory | ||
|
||
class RCTMGLBackgroundLayer(context: Context?) : RCTLayer<BackgroundLayer?>( | ||
context!! | ||
) { | ||
override fun makeLayer(): BackgroundLayer { | ||
return BackgroundLayer(iD!!) | ||
} | ||
|
||
override fun addStyles() { | ||
RCTMGLStyleFactory.setBackgroundLayerStyle( | ||
mLayer, | ||
RCTMGLStyle(context, mReactStyle, mMap!!) | ||
) | ||
} | ||
} |
60 changes: 0 additions & 60 deletions
60
...ain/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.java
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
.../main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.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,65 @@ | ||
package com.mapbox.rctmgl.components.styles.layers | ||
|
||
import com.facebook.react.bridge.ReadableMap | ||
import com.facebook.react.uimanager.ThemedReactContext | ||
import com.facebook.react.uimanager.ViewGroupManager | ||
import com.facebook.react.uimanager.annotations.ReactProp | ||
|
||
class RCTMGLBackgroundLayerManager : ViewGroupManager<RCTMGLBackgroundLayer>() { | ||
override fun getName(): String { | ||
return REACT_CLASS | ||
} | ||
|
||
override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLBackgroundLayer { | ||
return RCTMGLBackgroundLayer(reactContext) | ||
} | ||
|
||
@ReactProp(name = "id") | ||
fun setId(layer: RCTMGLBackgroundLayer, id: String?) { | ||
layer.iD = id | ||
} | ||
|
||
@ReactProp(name = "existing") | ||
fun setExisting(layer: RCTMGLBackgroundLayer, existing: Boolean) { | ||
layer.setExisting(existing) | ||
} | ||
|
||
@ReactProp(name = "sourceID") | ||
fun setSourceID(layer: RCTMGLBackgroundLayer, sourceID: String?) { | ||
layer.setSourceID(sourceID) | ||
} | ||
|
||
@ReactProp(name = "aboveLayerID") | ||
fun setAboveLayerID(layer: RCTMGLBackgroundLayer, aboveLayerID: String?) { | ||
layer.setAboveLayerID(aboveLayerID) | ||
} | ||
|
||
@ReactProp(name = "belowLayerID") | ||
fun setBelowLayerID(layer: RCTMGLBackgroundLayer, belowLayerID: String?) { | ||
layer.setBelowLayerID(belowLayerID) | ||
} | ||
|
||
@ReactProp(name = "layerIndex") | ||
fun setLayerIndex(layer: RCTMGLBackgroundLayer, layerIndex: Int) { | ||
layer.setLayerIndex(layerIndex) | ||
} | ||
|
||
@ReactProp(name = "minZoomLevel") | ||
fun setMinZoomLevel(layer: RCTMGLBackgroundLayer, minZoomLevel: Double) { | ||
layer.setMinZoomLevel(minZoomLevel) | ||
} | ||
|
||
@ReactProp(name = "maxZoomLevel") | ||
fun setMaxZoomLevel(layer: RCTMGLBackgroundLayer, maxZoomLevel: Double) { | ||
layer.setMaxZoomLevel(maxZoomLevel) | ||
} | ||
|
||
@ReactProp(name = "reactStyle") | ||
fun setReactStyle(layer: RCTMGLBackgroundLayer, style: ReadableMap?) { | ||
layer.setReactStyle(style) | ||
} | ||
|
||
companion object { | ||
const val REACT_CLASS = "RCTMGLBackgroundLayer" | ||
} | ||
} |
Oops, something went wrong.