Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django 格式错误的几何字段geojson_Django_Geolocation_Django Rest Framework_Gis_Geojson - Fatal编程技术网

Django 格式错误的几何字段geojson

Django 格式错误的几何字段geojson,django,geolocation,django-rest-framework,gis,geojson,Django,Geolocation,Django Rest Framework,Gis,Geojson,我使用的是rest\u framework\u gis GeoFeatureModelSerializer,我想序列化的类中有以下属性: the_geom = models.PointField(('Point'), null=True, blank=True, editable=False) 序列化程序: class Serializer(GeoFeatureModelSerializer): class Meta: model = PointOfInterest

我使用的是rest\u framework\u gis GeoFeatureModelSerializer,我想序列化的类中有以下属性:

the_geom = models.PointField(('Point'), null=True, blank=True, editable=False)
序列化程序:

class Serializer(GeoFeatureModelSerializer):

    class Meta:
        model = PointOfInterest
        id_field = False
        fields = settings.FEATURE_FIELDS_TO_SERIALIZE
        geo_field = "the_geom"
问题是返回的geojson字段格式不正确,如下所示:

geometry: "SRID=4326;POINT (-8.3093807187199999 41.4384913111000017)",

您是否已将
rest\u framework\u gis
添加到已安装的应用程序中?