WVV-Crowd-Sourced-Stock-Tracking / Backend

Backend for WhatsLeft
0 stars 0 forks source link

Radius attribute not factored in #10

Open Chaphasilor opened 4 years ago

Chaphasilor commented 4 years ago

Describe the bug The radius attribute is not properly factored in when scraping markets

To Reproduce

Expected behavior What should the endpoint return? Only markets with radius <= 70m

Actual behavior _What does the endpoint return?_ Two markets with radius > 300 m. Increasing radius may result in a correct behavior.

{
  "result": "success",
  "supermarket":[
    {
    "id": 118,
    "name": "Edeka Südwest Getränke GmbH & Co. oHG",
    "city": "Langen (Hessen)",
    "street": "Langestraße 5",
    "lng": "8.673029999999999",
    "lat": "49.99221",
    "distance": "7.667695410639194",
    "mapsId": "ChIJY3vPJAVzvUcRUpNQbf7UoUQ",
    "open": true,
    "products": []
    },
    {
    "id": 113,
    "name": "Central Lebensmittelmarkt - Der Supermarkt in der Nähe / Halal Fleisch/ Metzgerei",
    "city": "Langen (Hessen)",
    "street": "August-Bebel-Straße 25",
    "lng": "8.6761289",
    "lat": "49.9897103",
    "distance": "359.77926150384815",
    "mapsId": "ChIJvTnaAY1Ac0ERPSvPvPCQOek",
    "open": true,
    "products": []
    },
    {
    "id": 783,
    "name": "Feinkost Palazzo",
    "city": "Langen (Hessen)",
    "street": "Bahnstraße 4",
    "lng": "8.67452",
    "lat": "49.98938",
    "distance": "338.4660101454544",
    "mapsId": "ChIJV8DwQQRzvUcRDC_Cytsm15U",
    "open": true,
    "products": []
    }
  ],
  "productItems":[
    [],
    [],
    []
  ]
}

Backend Version New or old? Old

Additional context Add any other context about the problem here.

van-den-Berg commented 4 years ago

Should be solved by implementation of OpenStreetMaps