-
-
Notifications
You must be signed in to change notification settings - Fork 854
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(v11): add slot to layers (#3196)
- Loading branch information
Showing
54 changed files
with
1,293 additions
and
657 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
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
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
59 changes: 59 additions & 0 deletions
59
...rnmapbox/rnmbx/components/styles/layers/codeparts/LayerManagerCommonProps.codepart-kt.ejs
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,59 @@ | ||
@ReactProp(name = "id") | ||
override fun setId(layer: <%= layerType %>, id: Dynamic) { | ||
layer.iD = id.asString() | ||
} | ||
|
||
@ReactProp(name = "existing") | ||
override fun setExisting(layer: <%= layerType %>, existing: Dynamic) { | ||
layer.setExisting(existing.asBoolean()) | ||
} | ||
|
||
@ReactProp(name = "sourceID") | ||
override fun setSourceID(layer: <%= layerType %>, sourceID: Dynamic) { | ||
layer.setSourceID(sourceID.asString()) | ||
} | ||
|
||
@ReactProp(name = "aboveLayerID") | ||
override fun setAboveLayerID(layer: <%= layerType %>, aboveLayerID: Dynamic) { | ||
layer.setAboveLayerID(aboveLayerID.asString()) | ||
} | ||
|
||
@ReactProp(name = "belowLayerID") | ||
override fun setBelowLayerID(layer: <%= layerType %>, belowLayerID: Dynamic) { | ||
layer.setBelowLayerID(belowLayerID.asString()) | ||
} | ||
|
||
@ReactProp(name = "layerIndex") | ||
override fun setLayerIndex(layer: <%= layerType %>, layerIndex: Dynamic) { | ||
layer.setLayerIndex(layerIndex.asInt()) | ||
} | ||
|
||
@ReactProp(name = "minZoomLevel") | ||
override fun setMinZoomLevel(layer: <%= layerType %>, minZoomLevel: Dynamic) { | ||
layer.setMinZoomLevel(minZoomLevel.asDouble()) | ||
} | ||
|
||
@ReactProp(name = "maxZoomLevel") | ||
override fun setMaxZoomLevel(layer: <%= layerType %>, maxZoomLevel: Dynamic) { | ||
layer.setMaxZoomLevel(maxZoomLevel.asDouble()) | ||
} | ||
|
||
@ReactProp(name = "reactStyle") | ||
override fun setReactStyle(layer: <%= layerType %>, style: Dynamic) { | ||
layer.setReactStyle(style.asMap()) | ||
} | ||
|
||
@ReactProp(name = "sourceLayerID") | ||
override fun setSourceLayerID(layer: <%= layerType %>, sourceLayerID: Dynamic) { | ||
layer.setSourceLayerID(sourceLayerID.asString()) | ||
} | ||
|
||
@ReactProp(name = "filter") | ||
override fun setFilter(layer: <%= layerType %>, filterList: Dynamic) { | ||
layer.setFilter(filterList.asArray()) | ||
} | ||
|
||
@ReactProp(name = "slot") | ||
override fun setSlot(layer: <%= layerType %>, slot: Dynamic) { | ||
layer.setSlot(slot.asString()) | ||
} |
7 changes: 7 additions & 0 deletions
7
android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/Layer.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,7 @@ | ||
package com.rnmapbox.rnmbx.v11compat.layer; | ||
|
||
import com.mapbox.maps.extension.style.layers.Layer | ||
|
||
fun Layer.slot(slot: String) { | ||
// V11 only | ||
} |
3 changes: 3 additions & 0 deletions
3
android/src/main/mapbox-v11-compat/v11/com/rnmapbox/rnmbx/v11compat/Layer.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,3 @@ | ||
package com.rnmapbox.rnmbx.v11compat.layer; | ||
|
||
import com.mapbox.maps.extension.style.layers.Layer |
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
Oops, something went wrong.