convert point geometries to circles in javascript
This commit is contained in:
parent
7a06f8de4e
commit
613f421f2e
2 changed files with 24 additions and 12 deletions
|
@ -151,16 +151,6 @@ class POI(SpecificLocation, SpaceGeometryMixin, models.Model):
|
|||
verbose_name_plural = _('Points of Interest')
|
||||
default_related_name = 'pois'
|
||||
|
||||
@property
|
||||
def buffered_geometry(self):
|
||||
return self.geometry.buffer(0.5)
|
||||
|
||||
def to_geojson(self, *args, **kwargs):
|
||||
result = super().to_geojson(*args, **kwargs)
|
||||
result['original_geometry'] = result['geometry']
|
||||
result['geometry'] = format_geojson(mapping(self.buffered_geometry))
|
||||
return result
|
||||
|
||||
|
||||
class Hole(SpaceGeometryMixin, models.Model):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue