magicbug / Cloudlog

Web based amateur radio logging application built using PHP & MySQL supports general station logging tasks from HF to Microwave with supporting applications to support CAT control.
http://www.cloudlog.co.uk
MIT License
460 stars 189 forks source link

Gridmap - When zoomed in to 6 char colouring isn't shown #3136

Closed magicbug closed 4 months ago

magicbug commented 4 months ago

Discussed in https://github.com/magicbug/Cloudlog/discussions/3130

Originally posted by **emics** June 7, 2024 With v2.6.14 in Gridmap i can see all grid worked and confirmed (red and green square). If I zoom in a 4 chars square i can see detailed grid (6 chars) but i don't have the square coloured green and red although my QSO are correct with 6 chars grid. have you the same ? thanks
emics commented 4 months ago

I Have investigated , the first thing is to enable: $config['map_6digit_grids'] = TRUE; in application/config/cloudlog.php the second thing is wrong parameters in d3 variable (located in line 37 - assets/js/leaflet/L.MaidenheadColouredGridMap.js)

redraw: function () {
        var d3 = new Array(20, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1 / 24, 1 / 24, 1 / 24, 1 / 24, 1 / 24, 1 / 240, 1 / 240, 1 / 240, 1 / 240, 1 / 240 / 24, 1 / 240 / 24);

zomming the map some 6digit square are green and red but in the wrong position. the bounds variable in line 67 contains the corners of confirmed square and the coordinates are wrong.

i hope to help someone to fix the bug!!!

magicbug commented 4 months ago

Fixed

emics commented 4 months ago

Hi Peter, in the new realease there is always the problem in 4 digit gridsqare. I show you some screen in GridSquare Map:

This is the grid of Rome (Italy) zoom1

if I zoom in the squares changes zoom2

another level of zoom and change again zoom3

the only QSO I have in JN61 grid are in

there is somthing wrong in d3 variable (located in line 37 - assets/js/leaflet/L.MaidenheadColouredGridMap.js) read my comment here