maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH 2/2] Check /apis/papersize/ bbox values are in c


From: David MENTRE
Subject: [Maposmatic-dev] [PATCH 2/2] Check /apis/papersize/ bbox values are in correct range
Date: Sat, 21 Apr 2012 18:08:55 +0200

Check that calls to /apis/papersize/ have latitude in [-90.0, 90.0] and
longitude in [-180.0, 180.0].

Signed-off-by: David MENTRE <address@hidden>
---
 www/maposmatic/forms.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/maposmatic/forms.py b/www/maposmatic/forms.py
index 4035739..03a83db 100644
--- a/www/maposmatic/forms.py
+++ b/www/maposmatic/forms.py
@@ -242,10 +242,10 @@ class MapPaperSizeForm(forms.Form):
     osmid            = forms.IntegerField(required=False)
     layout           = forms.CharField(max_length=256)
     stylesheet       = forms.CharField(max_length=256)
-    lat_upper_left   = forms.FloatField(required=False)
-    lon_upper_left   = forms.FloatField(required=False)
-    lat_bottom_right = forms.FloatField(required=False)
-    lon_bottom_right = forms.FloatField(required=False)
+    lat_upper_left   = forms.FloatField(required=False, min_value=-90.0, 
max_value=90.0)
+    lon_upper_left   = forms.FloatField(required=False, min_value=-180.0, 
max_value=180.0)
+    lat_bottom_right = forms.FloatField(required=False, min_value=-90.0, 
max_value=90.0)
+    lon_bottom_right = forms.FloatField(required=False, min_value=-180.0, 
max_value=180.0)
 
 class MapRecreateForm(forms.Form):
     """
-- 
1.7.5.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]