Adjust overlap of markers
This commit is contained in:
parent
dd82470835
commit
096e0a371e
|
@ -34,7 +34,7 @@ function build_map(map_id, coordinates, routes) {
|
||||||
var offset_lines = [];
|
var offset_lines = [];
|
||||||
|
|
||||||
function getIconBounds(latlng) {
|
function getIconBounds(latlng) {
|
||||||
let iconSize = 30; // Assuming the icon size as a square of 30x30 pixels
|
let iconSize = 20; // Assuming the icon size as a square
|
||||||
if (!latlng) return null;
|
if (!latlng) return null;
|
||||||
let pixel = map.project(latlng, map.getZoom());
|
let pixel = map.project(latlng, map.getZoom());
|
||||||
let sw = map.unproject([pixel.x - iconSize / 2, pixel.y + iconSize / 2], map.getZoom());
|
let sw = map.unproject([pixel.x - iconSize / 2, pixel.y + iconSize / 2], map.getZoom());
|
||||||
|
|
Loading…
Reference in a new issue