Created
October 31, 2024 12:46
-
-
Save RalucaNicola/e7f6811518c0d48ac829aef9373cf8bb to your computer and use it in GitHub Desktop.
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
for new_published_layer in new_published_layers: | |
logger.info( | |
f"{new_published_layer.properties.name} - {new_published_layer.properties.geometryType}" | |
) | |
logger.info("Getting the layer manager...") | |
# the layer manager | |
test_layer_manager = new_published_layer.manager | |
# update layer renderer | |
logger.info("Update layer renderer...") | |
renderer = self.create_uv_renderer( | |
geometry_type=new_published_layer.properties.geometryType, | |
unique_field_name="system_name", | |
gdh_project_systems=_gdh_project_systems, | |
) | |
# set the renderer on the layer item | |
new_published_layer.renderer = renderer | |
# set the renderer on the layer service | |
test_layer_manager.update_definition( | |
{ | |
"drawingInfo": { | |
"renderer": renderer | |
} | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment