:param bool auto_index: Automatically create a '2dsphere' index.\ Defaults to `True`.
(self, auto_index=True, *args, **kwargs)
| 596 | _type = "GeoBase" |
| 597 | |
| 598 | def __init__(self, auto_index=True, *args, **kwargs): |
| 599 | """ |
| 600 | :param bool auto_index: Automatically create a '2dsphere' index.\ |
| 601 | Defaults to `True`. |
| 602 | """ |
| 603 | self._name = "%sField" % self._type |
| 604 | if not auto_index: |
| 605 | self._geo_index = False |
| 606 | super().__init__(*args, **kwargs) |
| 607 | |
| 608 | def validate(self, value): |
| 609 | """Validate the GeoJson object based on its type.""" |