ev-map / EVMap

Android app to find electric vehicle charging stations - compatible with community databases such as GoingElectric.de and OpenChargeMap.org.
https://ev-map.app/
MIT License
192 stars 52 forks source link

Uncategorized charging stations get excluded when filtering categories #280

Open flyser opened 1 year ago

flyser commented 1 year ago

I created a filter to exclude Hotels (nothing else set) and noticed that some public charging stations vanish from the map, e.g.: https://www.goingelectric.de/stromtankstellen/Deutschland/Stralsund/Bauhaus-Gustower-Weg-1/73140/

I assume this happens because it has no category assigned, but it's a bit counterintuitive that this happens and makes such a filter useless. I think the easiest fix would be to add an "uncategorized" category to the filter configuration.

johan12345 commented 1 year ago

Yes, this is a known issue, and it's exactly as you described - once the category filter is active (i.e. anything other than "all categories" selected), stations with no category assigned will be excluded. I agree this is counterintuitive, however it seems that it is not possible to simply add an "uncategorized" option to the filter, because the GoingElectric API does not support this at the moment. I tried passing various possible values (null, NULL, 0, -1, None, none, false, no, undefined, Keiner Kategorie zugeordnet, etc.) to the category parameter and none of them yields any results. Passing an empty string simply shows all chargers, not just the ones without categories.

Also, the charger details returned by the API don't contain the category information, so the filter couldn't be applied locally either.

I was briefly in contact with the developer of the GoingElectric.de site a few years ago, but he didn't seem inclined to make any more improvements to the current API. He is working on a new API version, which will be released at some unknown point in the future and likely require payment to access.

So I think for now, the only possible fixes are:

flyser commented 1 year ago

I see, thanks for the detailed response! Other possible fixes would be to contribute to openchargemap/openstreetmap (especially when a paid API for goingelectric is on the horizon)