Skip to content

Fix scale line sizing for issue #132 - #198

Open
BenjaminLeconte wants to merge 1 commit into
OpenSeaMap:masterfrom
BenjaminLeconte:fix/issue-132-scale-line
Open

Fix scale line sizing for issue #132#198
BenjaminLeconte wants to merge 1 commit into
OpenSeaMap:masterfrom
BenjaminLeconte:fix/issue-132-scale-line

Conversation

@BenjaminLeconte

Copy link
Copy Markdown

I implemented a fix for this issue in PR #132.

The metric and nautical scale lines now use a responsive width based on the viewport, clamped between 100 and 240 pixels. Their widths are also updated when the browser window is resized.

I also fixed local map initialization by defaulting to the OSM tile server when /var/lib/online-chart/online_chart.ini is unavailable.

Verified locally with:

  • php -l index.php
  • git diff --check
  • Local browser verification of the map and scale lines

The remaining limitation is that metric and nautical scale lines are still independent OpenLayers controls, so their displayed values may not always use exactly the same distance ratio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants