Bug report- Inconsistent map loading(?) beahvior

Clicking on a location from the “Changes” or “Data” pages will switch to the map, but it doesn’t always take me to the location that I clicked on. Sometimes it works, but other times not. I’ve noticed that where it will end up is usually close to but not exactly where I recently had the map open to previously.

For example, on a prior visit I last had the map open to the Columbus, OH area. The next time I visited the site, I clicked on National Harbor, MD from the “Changes” page. It opened the map, briefly flashing the last location I had it opened to (i.e. Columbus), then greyed out as it loaded the new location. Only instead of loading the area around the National Harbor site, it loaded a view a few hundred miles from Columbus. When I zoomed out, I could see that the National Harbor site’s flag with the site specific information/links was opened as it should have been, but the map didn’t initially load the correct new location.

This has happened a few different times, but isn’t always repeatable. Some visits clicking from Changes or Data will take me to the correct site and sometimes it won’t. I’ve no idea how supercharge.info and OpenStreetmaps communicates, but a possible guess from a non-programming literate person: If there is a communications lag between sending the information and loading the maps, maybe the maps are sometimes being loaded before they receive the correct location?

2 Likes

I’m having the same issue after the switch to OpenStreetMap. When in the “Changes” section i have to click a Charger which takes me to the map, then go back to “Changes” and click it again to actually go to the location.

As far as I can tell, this happens after supercharge.info is loaded, only the first time you click on a site location. If you go back to the changes or data page and click on an entry afterwards, the bug won’t happen again (until you reload).

1 Like

Yeah, I’ve learned that trick of going back and clicking again on the site I want to get it to work properly. Now it’s just a bit annoying, but not a real big problem. Except for new users who don’t know the secret technique. So, I wouldn’t describe it as a real solution, just a workaround. But, now I’ve just started, within the last week or so, to encounter a new bug of a similar type. When I have the map open, I select a pin, and then choose “zoom in”, the map now zooms in on wherever I happened to have had it centered at the time I clicked “zoom in”. So, unless the pin I was interested in was directly in the center of the frame, it zooms into an area that is not at all where the pin is. This isn’t what used to happen. It used to automatically center the particular pin and then zoom into the area immediately surrounding it. Unfortunately, the trick of going back and clicking again doesn’t workaround this issue.

1 Like

I have the same problem. Also, the map loads painfully slow on Chrome, but instantly on Internet Explorer (Microsoft Edge).

Sounds like an asynchronous/timing issue—maybe the maps are being loaded in the page before everything is initialized. If the site moderators want me to take a look, I can—let me know!

1 Like

Today it appears the issue is only happening to me when you change your zoom level and don’t change it back. If you do, regardless of refreshing, the next time you click a site to view its location, it’ll fail to pan correctly. It does update the zoom level correctly upon clicking a site location though, and thus the next time you click to view any site location it’ll pan correctly.

Another way to put it is panning upon clicking to view a site location is currently failing except when previously at the designated zoom level.

@electronzz Feel free to fork the source code here, correct it, and submit a pull request.

1 Like

Yes, when I run into this issue (it doesn’t always happen every time), I’m finding something very similar to @Pluto’s experience, though it’s not quite so specific. If I change the zoom level or move/scroll the map, then choosing another location from the Changes or Data tab will fail to properly load the map position for that new one. But, I can avoid this issue if I use “Zoom in” on another location first (including that original one) before trying to load a new location. So, it seems like the loading failure occurs when trying to start from a map position/zoom level that was set by the user and not the site.

Make a code change that fixes this, see the following pull request: https://github.com/supercharge-info/supercharge.info/pull/51

3 Likes

YAY!!! Now I just have to untrain myself to stop using any of the workaround techniques. Thank you very much for working out a fix.

1 Like

You are most welcome!

1 Like