Skip to content

Instantly share code, notes, and snippets.

@RalucaNicola
Created October 31, 2024 12:46
Show Gist options
  • Save RalucaNicola/e7f6811518c0d48ac829aef9373cf8bb to your computer and use it in GitHub Desktop.
Save RalucaNicola/e7f6811518c0d48ac829aef9373cf8bb to your computer and use it in GitHub Desktop.
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