Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaflet map doesn't display on small screen #704

Open
OurOakland opened this issue Jul 7, 2022 · 0 comments
Open

Leaflet map doesn't display on small screen #704

OurOakland opened this issue Jul 7, 2022 · 0 comments
Labels

Comments

@OurOakland
Copy link

Setup

  • Maps version: 9.0.7
  • MW version: 1.38.1
  • PHP version: 8.0.2 (cgi-fcgi)

Issue

I know this is a conflict somewhere between the Leaflet maps, the Map extension, MediaWiki, and the MonoBook skin involving CSS, but I don't know how to figure it where exactly the problem lies.

I have a new MediaWiki install (version 1.38.1, default skin = monobook) with the Maps extension (version 9.0.7), and maps I've added to pages work as described on the documentation pages.

The MonoBook skin with responsive mode checked mostly behaves as expected. But when a page gets narrow (as on mobile), about 550px or less, images and maps go from their normal left-aligned behavior to full width. Images become centered (OK), and maps become full width (OK), but the OSM map tiles disappear.

Part of what makes this more confusing to me is that the polygon for the map doesn't disappear, just the map tiles.

I have tried this both with an enclosing <div> and without. Currently the page linked below is without.

Reproducing

You can see this behavior here:

https://wiki.ouroakland.net/oaklandwiki/index.php/Peralta_Heights

Either resize your browser window narrower until the tiles disappear, or bring up the developer tools in Chrome, et al, toggle the device toolbar, then resize the simulator window until the tiles disappear.

map problem

{{#display_map:polygons=37.8030229788137007,-122.2489755783431491:
37.8025270669956157,-122.2537660036408482:
37.8026330313390417,-122.2541468773270452:
37.8021371169033173,-122.2546994123791677:
37.8018531302138570,-122.2548227939926306:
37.8015733810641876,-122.2546645436615762:
37.8013105854432254,-122.2545867596008264:
37.8010011635942504,-122.2545304332122953:
37.8008146621276708,-122.2545746896613821:
37.8006366375611549,-122.2546404037826164:
37.7997295533461255,-122.2519528303505325:
37.7991573215918280,-122.2510140571930037:
37.7999669222540007,-122.2497909698850975:
37.8002021710443543,-122.2492974434277357:
37.8003367499703842,-122.2488575611499897:
37.8004119869009614,-122.2483640346920311:
37.8030229788137007,-122.2489755783431491~Peralta Heights~~black~0.7~1~green~0.3|width=40%|height=200px|fullscreen=on}}
@OurOakland OurOakland added the bug label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant