Map and charging points does not load in browser

The map and the charging points does not load when i try to watch it. I tried two different computers. On both it does not load.
https ://openchargemap.org/site → white page
https ://map.openchargemap.io/#/search → blue page

The forum here is working fine and i can register without any issues.

How to reproduce: Download a known recommended secure operating system for your computer https://tails.boum.org/ or at least a secure browser Tor Project | Download and try to visit the page. The map is broken and does not load.

Please fix it. I would like to contribute, but that is impossible when i am not able to load the website.

You’re probably blocking a script (such as google analytics), if you can identify the technical reason we can fix it, but otherwise I’m afraid we don’t have the resources to investigate this.

I went to an internet shop where you can use their computers and made some tests with Open Charge Map - Electric Vehicle Charging Locations Near You first.
I have found out, that when you visit the website you get asked if you allow map.openchangrmap.io to access your location. If you ignore this message, the same blue background is been shown and there is also no map or any charging station markers.
Could you change that to be the same like on other map-websites? There the map always load with no difference if you press block/allow or just ignore the message. The only difference should be when you press allow it jumps to the location it have after pressing the button access to.

If you zoom out you’ll see that the blue background is actually 0.0 in latitude and longitude putting the location right below Ghana and to the left of Gabon.

Maybe that could be centered on a major city or country instead, or even zoomed out somewhat to show Africa by default?

We did used to default to a US location if you didn’t consent to geolocation, I’ll check that.

@RonnieLast
You are right. Thanks!

@Christopher
Yes, this US location (Mountain View is the place) only load when you press block. Before when just the message appear and you ignore it, it load exactly the location @RonnieLast mentioned.
BUT also a second issue is there. No charging station load in that case. When you move the map around from the blue(water) to a city with charging stations, not a single charging station is shown. Only when you then press block, then it jumps to the US location and from there on the website start working. Only then the light blue point that seem to have something to do with the implementation start moving around. Also only then the message that max 250 charging stations are loading based on the zoom value appear.

In short: When you dont press block, the whole map-implementation does not work. Its at 0.0 and not a single charger is shown when you move the map around.

Thanks, if anyone is in a position to investigate and fix the issue the code is here: GitHub - openchargemap/ocm-app: The openchargemap.org web and mobile app

Pull requests welcome, I’m just not in that zone currently.

I am not a developer. I tried to understand with the github search functionality what happens.
First i searched for the word geolocation because you named it here: Map and charging points does not load in browser - #5 by Christopher
After getting lost in things like understanding what things like capacitor/geolocation could be, and then reading what angular is and if it could have something to do with that i found the commit named ‘Use browser geolocation instead of plugin’ Use browser geolocation instead of plugin · openchargemap/[email protected] · GitHub .
This helped me to understand what even could be happening there to create a request in a browser to make the browser asking.
Then i found ocm-app/search.ts at master · openchargemap/ocm-app · GitHub
There is this ‘const position = await this.getPosition();’.
When i dont press any button when i get asked, i seem to be stucked at this ‘await’ and break the whole website functionality. When i press ‘block’ it seems to go further because get in the bottom of the browser the message ‘Your location could not be determined.’
This message is part of this line: ocm-app/search.ts at master · openchargemap/ocm-app · GitHub

I have no idea how to fix this. I think this ‘await’ have to be removed somehow.

1 Like

Thanks, I do agree we need to fix this. I just don’t have a timeline as to when I will be available to make (and test) changes to the app currently.

Hi, a fix for this has been applied, the fallback position will now be loaded first.

1 Like

Yep, seems to default to San-Fran now. All good.

Thanks for the fix. The OSM-map load now how i expected to load on my computer.
But it still does not load any chargers. I was hoping it would start to load charger locations after the fix but it does not. I have a OSM-map with no charging points in my browser.
I was again in a internet shop and on their computers the charger locations load.
Are there any services that break net-neutrality enabled? The only idea i have now is blockage of IP-addresses.
If you like you can try it out yourself. Just downlad tails or torbrowser and you would have the same issue.

1 Like

https://map.openchargemap.io seems to be working well for me using Tor Browser. :

The iframed version on https://openchargemap.org doesn’t work, so that needs some more investigation, but the map itself seems to be OK? After the map has loaded the browser will try to load the POI lists from https://api.openchargemap.io - if that fails it should be logged somewhere in the browser console.