import axipy
from axipy import IndividualThematicLayer, Style

map_view= axipy.gui.view_manager.active
layers=map_view.map.layers
layer_for_theme=layers[0]
individual = IndividualThematicLayer("ID")
for i in range(individual.count):
    value=individual.get_value(i)
    if value==1:
        individual.set_style(i,Style.from_mapinfo('Brush (60,8421504) Pen (1,2,8421504)'))
        continue
    if value==2:
        individual.set_style(i,Style.from_mapinfo('Brush (18,8421504) Pen (1,2,8421504)'))
        continue
print(individual.title)
layer_for_theme.thematic.add(individual)

individual.zoom_restrict=True
individual.min_zoom=0
individual.max_zoom=100000000.0
'''
range_theme=axipy.render.RangeThematicLayer('население zcccc')
range_theme.ranges = 6
layer_for_theme.thematic.add(range_theme)
range_theme.zoom_restrict=True
range_theme.min_zoom=1000.0
range_theme.max_zoom=10000.0
'''
