summaryrefslogtreecommitdiff
path: root/ishtar_common/models_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models_common.py')
-rw-r--r--ishtar_common/models_common.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py
index a7f9bd2fd..414e63c55 100644
--- a/ishtar_common/models_common.py
+++ b/ishtar_common/models_common.py
@@ -2132,11 +2132,13 @@ class GeoVectorData(models.Model):
name += f" ({str(self.data_type).lower()})"
return name
- def display_coordinates(self, rounded=5, dim=2, cache=True):
- srid = None
- profile = get_current_profile()
- if profile.display_srs and profile.display_srs.srid:
- srid = profile.display_srs.srid
+ def display_coordinates(self, rounded=5, dim=2, srid=4326, cache=True):
+ if not srid:
+ profile = get_current_profile()
+ if profile.display_srs and profile.display_srs.srid:
+ srid = profile.display_srs.srid
+ else:
+ srid = 4326
return self.get_coordinates(rounded=rounded, srid=srid, dim=dim, cache=cache)
def get_coordinates(self, rounded=5, srid: int = None, dim=2, cache=False):