We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wanted to see the current Zoom level in the lower left of the map above the ruler.
My crude solution was
Edit /usr/local/share/tar1090/html/script_*.js inbetween
initFilters(); ... new Toggle({
added this code
// Create the div to display the zoom level var zoomDiv = document.createElement('div'); zoomDiv.style.position = 'absolute'; zoomDiv.style.bottom = '30px'; zoomDiv.style.left = '10px'; zoomDiv.style.backgroundColor = 'rgba(255, 255, 255, 0.7)'; zoomDiv.style.color = 'black'; zoomDiv.style.padding = '5px'; zoomDiv.style.borderRadius = '5px'; zoomDiv.style.fontSize = '10px'; zoomDiv.style.fontFamily = 'Arial, sans-serif'; zoomDiv.style.zIndex = '1000'; // Add the zoom level div to a custom control var zoomControl = new ol.control.Control({ element: zoomDiv }); // Add the control to the map OLMap.addControl(zoomControl); // Update the zoom level display function updateZoomLevel() { var zoom = OLMap.getView().getZoom(); var roundedZoom = zoom.toFixed(1); zoomDiv.innerHTML = 'Zoom: ' + roundedZoom; } // Initial zoom level update updateZoomLevel(); // Update zoom level when the resolution changes (zooming in/out) OLMap.getView().on('change:resolution', updateZoomLevel);`
This will show the zoom level in the lower left corner of the map:
I would be nice to have this build in the project.
The text was updated successfully, but these errors were encountered:
Guess it could be behind a config.js setting. Because by default this shouldn't clutter the screen.
Sorry, something went wrong.
No branches or pull requests
I wanted to see the current Zoom level in the lower left of the map above the ruler.
My crude solution was
Edit /usr/local/share/tar1090/html/script_*.js
inbetween
initFilters();
...
new Toggle({
added this code
This will show the zoom level in the lower left corner of the map:
I would be nice to have this build in the project.
The text was updated successfully, but these errors were encountered: