-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Add GeoJSON API endpoint with device location data #360
Comments
@nemesisdesign Thanks for the detailed explanation. However, a few things are not clear to me:
|
we need to fetch locations which have devices deployed in them, and for each location we need to know how many devices there are, eg:
The two will always match, use the |
…es) openwisp#360 - Fixed mocking of request library in MockRequestPostRunner - Do not send metrics on post_migrate if no module is upgraded Related to openwisp#360 --------- Co-authored-by: Federico Capoano <f.capoano@openwisp.io>
Blocked by openwisp/openwisp-users#210.
We need to add a GeoJSON API endpoint (using django-rest-framework-gis) which returns geographic data which can be used to show a general device map.
/api/v1/device/geojson/
Location.objects.filter(devicelocation__isnull=False).annotate(device_count=Count('devicelocation'))
Location
model (including the location ID)We also need another endpoint, which will be called whenever an element is clicked on the map, to fetch more information about a specific point.
/api/v1/location/{pk}/device/
(the user must have access to the organization of the location in order to see be able to access the URL)The text was updated successfully, but these errors were encountered: