예제 #1
0
 def _validate_data(self, proposal):
     for point in proposal["value"]:
         if not geotraitlets.is_valid_point(point[:2]):
             raise InvalidPointException(
                 "{} is not a valid latitude, longitude pair".format(point))
         # check weight
     return proposal["value"]
예제 #2
0
파일: maps.py 프로젝트: edulemasson/gmaps
 def _validate_data(self, proposal):
     for point in proposal["value"]:
         if not geotraitlets.is_valid_point(point[:2]):
             raise InvalidPointException(
                 "{} is not a valid latitude, longitude pair".format(point))
         # check weight
     return proposal["value"]
예제 #3
0
파일: maps.py 프로젝트: kpolimis/gmaps
 def _validate_data(self, proposal):
     assert (len(proposal["value"]) >= 2), "A direction requires at least two points"
     for point in proposal["value"]:
         if not geotraitlets.is_valid_point(point):
             raise InvalidPointException(
                 "{} is not a valid latitude, longitude pair".format(point))
     return proposal["value"]
예제 #4
0
 def _validate_data(self, proposal):
     assert (len(proposal["value"]) >=
             2), "A direction requires at least two points"
     for point in proposal["value"]:
         if not geotraitlets.is_valid_point(point):
             raise InvalidPointException(
                 "{} is not a valid latitude, longitude pair".format(point))
     return proposal["value"]