您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes the icons smaller on the map, so you can see more of the map at once.
// ==UserScript== // @name MapGenie - Smaller Icon Size // @namespace https://github.com/Auncaughbove17/my-userscripts/ // @version 0.3.3 // @description Makes the icons smaller on the map, so you can see more of the map at once. // @author Alistair1231 // @match https://mapgenie.io/* // @icon https://icons.duckduckgo.com/ip2/mapgenie.io.ico // @license MIT // ==/UserScript== // https://gf.qytechs.cn/en/scripts/464497-mapgenie-smaller-icon-size // https://openuserjs.org/scripts/Alistair1231/MapGenie_-_Smaller_Icon_Size (function () { function adjustIconSize() { // Get the current zoom level var zoom = map.getZoom(); var maxZoom = map.getMaxZoom(); var minZoom = map.getMinZoom(); // Loop through all the symbols on the 'locations' layer var iconSizeAtMaxZoom = .9; // replace with actual value var iconSizeAtMinZoom = .7; // replace with actual value var logarithmicScale = Math.max(0, Math.log(iconSizeAtMaxZoom / iconSizeAtMinZoom) / Math.log(maxZoom / minZoom) * Math.log(zoom / minZoom)) * 2.5; // var newZoom= Math.max(0.15, Math.min(1, (zoom - 5) / maxZoom)); console.log(`zoom detected, adjusting icon size to ${logarithmicScale}`); mapManager.setIconSize(logarithmicScale); // Adjust the minimum and maximum size as needed) } if (typeof map !== "undefined") { adjustIconSize(); map.on('zoom', function () { adjustIconSize(); }); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址