Exemple #1
0
    def map_extent_as_json(self):
        feature_extent = self.mapfeature_set \
            .aggregate(Extent('geom'))['geom__extent']
        bounds_extent = self.bounds_extent

        if feature_extent is not None:
            intersection = extent_intersection(feature_extent, bounds_extent)
            return extent_as_json(intersection)

        return extent_as_json(bounds_extent)
Exemple #2
0
    def map_extent_as_json(self):
        feature_extent = self.mapfeature_set \
            .aggregate(Extent('geom'))['geom__extent']
        bounds_extent = self.bounds_extent

        if feature_extent is not None:
            intersection = extent_intersection(feature_extent, bounds_extent)
            return extent_as_json(intersection)

        return extent_as_json(bounds_extent)
Exemple #3
0
 def bounds_extent_as_json(self):
     return extent_as_json(self.bounds_extent)
Exemple #4
0
 def bounds_extent_as_json(self):
     return extent_as_json(self.bounds_extent)