Skip to content
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 API endpoint that returns co-ordinates on indoor map (floorplan) #828

Open
pandafy opened this issue Feb 6, 2024 · 1 comment · May be fixed by #976
Open

[feature] Add API endpoint that returns co-ordinates on indoor map (floorplan) #828

pandafy opened this issue Feb 6, 2024 · 1 comment · May be fixed by #976
Labels
gsoc-idea Part of Google Summer of Code project

Comments

@pandafy
Copy link
Member

pandafy commented Feb 6, 2024

Add an API endpoint that takes the location ID and returns co-ordinates of all the devices.

  • It should also return all available floors in the location.
  • It should be possible to filter the devices based on the floor.
@pandafy pandafy changed the title [feature] Add endpoint that returns co-ordinates on indoor map (floorplan) [feature] Add API endpoint that returns co-ordinates on indoor map (floorplan) Feb 6, 2024
@dee077
Copy link
Contributor

dee077 commented Jan 31, 2025

Is this response okay?
Should I include any other field or data in this, please suggest if so.

{
  "devices": [
    {
      "location": {
        "id": "ab423599-95f1-48b4-9700-58cd014a243f",
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [12.512124, 41.898903]
        },
        "properties": {
          "type": "indoor",
          "is_mobile": false,
          "name": "test-location",
          "address": "Via del Corso, Roma, Italia"
        }
      },
      "floorplan": {
        "id": "e19da20f-40b7-4acc-8852-eb6bc5bed4b6",
        "name": "test-location 1st Floor",
        "floor": 1,
        "image": "http://testserver/media/floorplans/e19da20f-40b7-4acc-8852-eb6bc5bed4b6.jpg",
        "created": "2025-01-31T16:18:03.920860+01:00",
        "modified": "2025-01-31T16:18:03.920860+01:00"
      },
      "indoor": "-140.38620,40.369227"
    },
    {
      "location": {
        "id": "ab423599-95f1-48b4-9700-58cd014a243f",
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [12.512124, 41.898903]
        },
        "properties": {
          "type": "indoor",
          "is_mobile": false,
          "name": "test-location",
          "address": "Via del Corso, Roma, Italia"
        }
      },
      "floorplan": {
        "id": "0f882cec-84ef-4bb1-8efb-8d8ae9566052",
        "name": "test-location 2nd Floor",
        "floor": 2,
        "image": "http://testserver/media/floorplans/0f882cec-84ef-4bb1-8efb-8d8ae9566052.jpg",
        "created": "2025-01-31T16:18:03.928718+01:00",
        "modified": "2025-01-31T16:18:03.928718+01:00"
      },
      "indoor": "-140.38620,40.369227"
    }
  ],
  "available_floors": [1, 2]
}

dee077 added a commit to dee077/openwisp-controller that referenced this issue Feb 2, 2025
Implemented API to return device coordinates for a given location ID.

Fixes openwisp#828
@dee077 dee077 linked a pull request Feb 2, 2025 that will close this issue
4 tasks
dee077 added a commit to dee077/openwisp-controller that referenced this issue Feb 2, 2025
Implemented API to return device coordinates for a given location ID.

Fixes openwisp#828
dee077 added a commit to dee077/openwisp-controller that referenced this issue Feb 2, 2025
Implemented API to return device coordinates for a given location ID.

Fixes openwisp#828
dee077 added a commit to dee077/openwisp-controller that referenced this issue Feb 2, 2025
Implemented API to return device coordinates for a given location ID.

Fixes openwisp#828
@pandafy pandafy added the gsoc-idea Part of Google Summer of Code project label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc-idea Part of Google Summer of Code project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants