openmove / odh-mentor-otp

https://mobility.meran.eu
1 stars 3 forks source link

E-chargers as markers on map #60

Closed zabuTNT closed 3 years ago

zabuTNT commented 3 years ago

The endpoint that return charger haven't a bbox filter or something like that:

https://github.com/openmove/odh-mentor-otp/blob/development/charger/index.js#L73

There are many chargers, so if you draw all the markers could be a problem.

The frontend shouldn't receive all the chargers, but only the charger to display on map and only below a certain zoom.

stefanocudini commented 3 years ago

example of pass bbox via leaflet-jsonlayer https://github.com/stefanocudini/leaflet-layerJSON/blob/master/examples/overpass.html#L39

zabuTNT commented 3 years ago

Now charger endpoint accept bbox as query parameter, in order to filter the results https://github.com/openmove/odh-mentor-otp/commit/35844356ddabe3b279c86cb092ad00b1e415e429

zabuTNT commented 3 years ago

what to do with private e-chargers ?

for instance:

{
"station_id": "ASD_00000055",
"name": "THALHOF",
"lat": 46.386265,
"lon": 11.255079,
"provider": "Neogy",
"address": "Hotel Thalhof - Lago di Caldaro - Kalterersee 10",
"city": "Caldaro S. S. V. - Kaltern A. D. W.",
"accessType": "PRIVATE",
"capacity": 1,
"reservable": false,
"state": "ACTIVE",
"plugs": [
{
"plug_id": "ASD_00000055-1",
"name": "THALHOF-IT*ASD*E1688*7*7*7*0020*8*8*8*17*1",
"available": true,
"maxPower": 7.345,
"maxCurrent": 32,
"minCurrent": 7,
"outletTypeCode": "Type2Mennekes"
}
]
},

this is a e-charger of an hotel, should we display it or not? Or display it with a different badge/label? Write that is for private uses in the popup?

@valerio-fornace @stefanocudini any feedback?