{
"id": 9,
"type": "Feature",
"geometry": "SRID=4326;POINT (14.4923241138489995 41.8903074341530015)",
"properties": {
"address": "Via Laietana, 54, 08003 Barcelona, Barcelona, Spain"
}
}
--
You received this message because you are subscribed to the Google Groups "Django REST Framework GIS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framew...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
class Address(gis_models.Model):
"""Address model"""
address = models.CharField(_('title'), max_length=64, blank=True, null=True)
point = gis_models.PointField(blank=True, null=True)
objects = gis_models.GeoManager()
class AddressSerializer(serializers.GeoFeatureModelSerializer):
"""
Serializing all the addresses
"""
class Meta:
model = Address
fields = ('id', 'address')
geo_field = 'point'
class AddressDetail(RetrieveUpdateDestroyAPIView):
"""
Retrieve, update or delete an address instance.
"""
queryset = Address.objects.all()
serializer_class = AddressSerializer
Which DRF-gis version are you using?
On 07/31/2015 05:22 AM, stunaz wrote:
Hello,--Using the GeoFeatureModelSerializer, I not able to get a proper geojson as the example.Is some one already have this kind of issue?
{ "id": 9, "type": "Feature", "geometry": "SRID=4326;POINT (14.4923241138489995 41.8903074341530015)", "properties": { "address": "Via Laietana, 54, 08003 Barcelona, Barcelona, Spain" } }
You received this message because you are subscribed to the Google Groups "Django REST Framework GIS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework-gis+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framew...@googlegroups.com.