(self, json_src, layer_name, geo_type, zoom_level)
return layer
Creates a QgsVectorLayer and adds it to the group specified by layer_target_group
         * Invalid geometries will be removed during the process of merging features over tile boundaries
Creates a QgsVectorLayer and adds it to the group specified by layer_target_group
         * Invalid geometries will be removed during the process of merging features over tile boundaries
Creates a QgsVectorLayer and adds it to the group specified by layer_target_group * Invalid geometries will be removed during the process of merging features over tile boundaries
def _create_named_layer(self, json_src, layer_name, geo_type, zoom_level):
        """
        Creates a QgsVectorLayer and adds it to the group specified by layer_target_group
         * Invalid geometries will be removed during the process of merging features over tile boundaries
        """

        source_url = self._source.source()
        options = QgsVectorLayer.LayerOptions(loadDefaultStyle=False)
        layer = QgsVectorLayer(json_src, layer_name, "ogr", options=options)

        layer.setCustomProperty("VectorTilesReader/vector_tile_source", self._connection["name"])
        layer.setCustomProperty("VectorTilesReader/vector_tile_url", source_url)
        layer.setCustomProperty("VectorTilesReader/zoom_level", zoom_level)
        layer.setCustomProperty("VectorTilesReader/geo_type", geo_type)
        layer.setShortName(layer_name)
        layer.setDataUrl(remove_key(source_url))
        layer.setAttribution(self._source.attribution())
        # layer.setAttributionUrl("")
        # layer.setAbstract()
        return layer
def _create_named_layer ( self , json_src , layer_name , geo_type , zoom_level ) : source_url = self . _source . source ( ) options = QgsVectorLayer . LayerOptions ( loadDefaultStyle = False ) layer = QgsVectorLayer ( json_src , layer_name , "ogr" , options = options ) layer . setCustomProperty ( "VectorTilesReader/vector_tile_source" , self . _connection [ "name" ] ) layer . setCustomProperty ( "VectorTilesReader/vector_tile_url" , source_url ) layer . setCustomProperty ( "VectorTilesReader/zoom_level" , zoom_level ) layer . setCustomProperty ( "VectorTilesReader/geo_type" , geo_type ) layer . setShortName ( layer_name ) layer . setDataUrl ( remove_key ( source_url ) ) layer . setAttribution ( self . _source . attribution ( ) ) # layer.setAttributionUrl("") # layer.setAbstract() return layer