GeoFeatureHyperlinkedModelSerializer

24 views
Skip to first unread message

Krzysztof Żuraw

unread,
Dec 27, 2016, 2:33:40 PM12/27/16
to Django REST Framework GIS
Hello,
I'm using this library in my project and I'm wondering if I can contribute back to the community by creating GeoFeatureHyperlinkedModelSerializer. So instead of having:
{
   
"type": "FeatureCollection",
   
"features": [
       
{
           
"type": "Feature",
           
"geometry": {
               
"type": "Point",
               
"coordinates": [
                   
17.00,
                   
51.00
               
]
           
},
           
"properties": {
               
"title": "First Point",
               
"description": "Lorem Ipsum",
               
"images": [
                   
1,
                   
2
               
]
           
}
       
}
   
]
}

I will have:
{
   
"type": "FeatureCollection",
   
"features": [
       
{
           
"type": "Feature",
           
"geometry": {
               
"type": "Point",
               
"coordinates": [
                   
17.00,
                   
51.00
               
]
           
},
           
"properties": {
               
"title": "First Point",
               
"description": "Lorem Ipsum",
               
"images": [
                   
"http://localhost/api/images/1",
                   
"http://localhost/api/images/2"
               
]
           
}
       
}
   
]
}

Do you think this is a valid proposition or maybe you have a better idea how to achieve this?
Thanks
Reply all
Reply to author
Forward
0 new messages