66 |
|
|
67 |
"""Base class for the layers.""" |
"""Base class for the layers.""" |
68 |
|
|
69 |
def __init__(self, title, visible = 1): |
def __init__(self, title, visible = True): |
70 |
"""Initialize the layer. |
"""Initialize the layer. |
71 |
|
|
72 |
title -- the title |
title -- the title |
106 |
fill = Color.Transparent, |
fill = Color.Transparent, |
107 |
stroke = Color.Black, |
stroke = Color.Black, |
108 |
lineWidth = 1, |
lineWidth = 1, |
109 |
visible = 1): |
visible = True): |
110 |
"""Initialize the layer. |
"""Initialize the layer. |
111 |
|
|
112 |
title -- the title |
title -- the title |
176 |
maxdepth) |
maxdepth) |
177 |
if self.__classification is not None: |
if self.__classification is not None: |
178 |
fieldname = self.__classification.GetField() |
fieldname = self.__classification.GetField() |
179 |
if not self.store.Table().field_info_by_name(fieldname): |
if fieldname is not None and \ |
180 |
|
not self.store.Table().field_info_by_name(fieldname): |
181 |
self.SetClassification(None) |
self.SetClassification(None) |
182 |
self.changed(LAYER_CHANGED, self) |
self.changed(LAYER_CHANGED, self) |
183 |
|
|
309 |
items.append(_("Extent (lat-lon):")) |
items.append(_("Extent (lat-lon):")) |
310 |
items.append(_("Shapetype: %s") % shapetype_names[self.ShapeType()]) |
items.append(_("Shapetype: %s") % shapetype_names[self.ShapeType()]) |
311 |
|
|
312 |
|
if self.projection and len(self.projection.params) > 0: |
313 |
|
items.append((_("Projection"), |
314 |
|
[str(param) for param in self.projection.params])) |
315 |
|
|
316 |
items.append(self.__classification) |
items.append(self.__classification) |
317 |
|
|
318 |
return (_("Layer '%s'") % self.Title(), items) |
return (_("Layer '%s'") % self.Title(), items) |
319 |
|
|
320 |
|
|