340 |
text = "(%10.10g, %10.10g)" % pos |
text = "(%10.10g, %10.10g)" % pos |
341 |
else: |
else: |
342 |
text = "" |
text = "" |
343 |
|
map = self.canvas.Map() |
344 |
|
for layer in map.layers: |
345 |
|
bbox = layer.LatLongBoundingBox() |
346 |
|
if bbox: |
347 |
|
left, bottom, right, top = bbox |
348 |
|
if not (-180 <= left <= 180 and |
349 |
|
-180 <= right <= 180 and |
350 |
|
-90 <= top <= 90 and |
351 |
|
-90 <= bottom <= 90): |
352 |
|
text = ("Select '"+layer.title+"' and pick a " + |
353 |
|
"projection using Layer/Projection...") |
354 |
|
break |
355 |
|
|
356 |
self.set_position_text(text) |
self.set_position_text(text) |
357 |
|
|
358 |
def set_position_text(self, text): |
def set_position_text(self, text): |