mapseed/platform

Map tiles don't load in UI width less than ~950px on initial site load at "/"

reterraform opened this issue · 6 comments

Guess who! :/

This appears consistent in both mobile devices tested, across OSes & browsers, & in mobile emulator. In emulator, they load fine as soon as I expand the width to ~950px. Interestingly, if I initially navigate directly to a page, eg "/about/, the tiles seem to load fine at < 950px(?!?). Any ideas?

Many thanks in advance, as always, for any tips!

I checked several Mapseed sites & see that, with exception of Hey Duwamish, they all navigate to a page on initial site load, though I have no idea whether the (my?) tile loading issue is at all a factor in that choice or, rather, it's purely a design/functionality decision. In any case, I'm going to test navigating to my About page on site load as well, so I'll at least have that option if I can't find a solution to this issue. Related question: where might the landing page redirect be set?

Thanks again!

update: I tested having anonymous "create" permissions on so the Add Report button shows, & that also allows tiles to load at < 950px on initial site load; this is consistent w/ Hey Duwamish, but not sure that explains my loading issue ; anyway, will look at options re this situation as well..

Ah, interesting-- I've been testing a bit but so far can't reproduce the tile loading issue. Though we did have an issue a while back that was similar to what you describe, so I'll keep trying to repro it. Which tileset is causing this on your end?

To configure a landing page, you can do this with the start_page: true flag in the nav_bar section for the page you want to show up, e.g.: https://github.com/mapseed/platform/blob/master/src/flavors/pugetsound/config.json#L1085

thanks for that info!

update: I tested having anonymous "create" permissions on so the Add Report button shows, & that also allows tiles to load at < 950px on initial site load; this is consistent w/ Hey Duwamish, but not sure that explains my loading issue ; anyway, will look at options re this situation as well..

found the issue; apparent typo line 79 of src/base/static/utils/layout-utils.js

if I'm correct:

return clac(100% - ${constants.HEADER_HEIGHT}px);

clac( should read calc(

edited this in my code & map tiles now load fine in mobile & desktop, consistently

Ah, excellent! Thanks for tracking this down. I think we must have had an untested map configuration and this error slipped through.

I you like, feel free to open a PR to the master branch with the fix, otherwise I'm happy to patch this.

Thanks again!