Repository navigation
Load the map stylesheets on the post office pages - #79
Merged
Merged
Conversation
PostOfficeMapProvider imports the MapLibre, Mapbox, Leaflet and OpenLayers views directly but not their stylesheets, unlike the other providers it uses. Opened directly, /leaflet/post-office(-cluster) had no leaflet.css: tiles and markers were laid out statically, so only part of the map showed and the markers were thousands of pixels below the map. OpenLayers lost its .ol-map sizing the same way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostOfficeMapProviderimports the MapLibre, Mapbox, Leaflet and OpenLayers map views directly but not theirstyle.css(it does import them for Azure Maps, Cesium and MapTiler). The pages only looked right when another page had already loaded the stylesheet.Opened directly,
/leaflet/post-office-cluster/enand/leaflet/post-office/enhave no Leaflet rules:.leaflet-pane/.leaflet-tilecompute toposition: static, so only part of the tiles show and the 63 marker images sit at y≈3,200 px, below the map. OpenLayers loses its.ol-mapsizing the same way (no base map).Verified on a local production build:
.leaflet-paneisabsoluteagain and Leaflet and OpenLayers show the full base map with clusters. This is separate from the 54 s freeze, which is MapConductor/react-marker-clustering#13.