fbpx

Add a Vector Layer to the QGIS Interface

fn_states = 'C:/pyqgis/vector/tl_2019_us_state.shp'
fn_places = 'C:/pyqgis/vector/tl_2019_16_place.shp'

iface.addVectorLayer(fn_places, '', 'ogr')
iface.addVectorLayer(fn_states, '', 'ogr')