Forum Replies Created

Viewing 15 replies - 1 through 15 (of 72 total)
  • Thread Starter David 279

    (@david-279)

    Brilliant! thanks so much for fixing this Patrick, as usual you are a star.

    Thread Starter David 279

    (@david-279)

    I’m not sure it works for all maps but for single location it works for me, I can’t see why it’s loading the maps one layer earlier than the magnification suggests it should and I don’t know enough about coding to be able to adjust for maps that have a lower (or higher) maxnativezoom

    I mean no disrespect to Patrick by doing this, I would never have been able to do what he’s done and with this plugin, I freely admit to probably at best understanding 10% of how it works, which is probably why I can’t do a better fix than the above, but I’m glad it works for other people.

    Thread Starter David 279

    (@david-279)

    Fixed it sort of

    class-maps.php

    I added the following two lines in the L.tileLayer sections just above }).addTo(thisMap);

    maxNativeZoom: 18,
    maxZoom: 20,

    It’s not perfect as it won’t work with the Hydda maps mainly because for some reason despite having maxNativeZoom set to 18 it’s still loading one level higher, fortunately thats fine for me

    I also changed the mouse scroll zoom from 0.25 to 1 just so I don’t get the 5 showing under the zoom control box when it’s .25 or .75

    Thread Starter David 279

    (@david-279)

    OK I’m still not sure why it’s happening but by comparing my sites map with the default open street maps map of the same location I know what is happening – And yes it makes no sense :

    The map displayed on screen is one level higher than what the screen display says, i.e if the screen says a zoom of 17 it’s actually displaying the zoom of 18, also it’s never loading the level 19 tiles I’ve worked this out by seeing what files are actually loaded and when and comparing them to the OSM page https://www.openstreetmap.org/#map=16/46.6036/7.9174

    But to make matters more complicated the tiles are displayed at the zoom displayed magnification, that is to say that the level 18 tile features are displayed on a level 17 screen which is why all the text appears so tiny

    So hear is the open street map image with a zoom of 17 https://www.downhillonly.com/wp-content/uploads/2019/09/osm-zoom-17.jpg

    And here is the same location from the website with a zoom of 17 https://www.downhillonly.com/wp-content/uploads/2019/09/website-zoom-17.jpg

    note how despite the two lining up exactly for the landscape features because the image from my website uses the tiles from zoom 18 to display at zoom 17 all the text is about half the size

    Thread Starter David 279

    (@david-279)

    With regard to zoom it seems to vary and yes it will depend on the maximum file resolution so using the test here https://plnkr.co/edit/z1p9x05vAv4h1sJJrDQC?p=preview which uses the standard open streetmaps tiles I can use a maximum value of 19 for the MaxNativeZoom setting and zoom up to 35X but if I change MaxNativeZoom to 18 it will only allow me to zoom to 33x although that seems to vary slightly, I’m not worried about silly zoom levels where everything is out of focus anyway it was more curiosity as to how it worked.

    That I have worked out, everywhere is tiled, the larger the magnification the smaller area each tile covers, thus the different folders, once you reach the maximum magnification for the folders then it will still let you go up but it does so by just scaling the highest resolution image it has. So I understand how it works but I still can’t write the code to make it work LOL

    Thread Starter David 279

    (@david-279)

    Hi Patrick sorry I might be misunderstanding this

    Are you saying that on https://www.alexanderagricola.co.uk/locations/test-location/ it loads correctly for you ?

    Or are you saying that it doesn’t because leaflet stops calculating the names ? I assume this was why they had the MaxNativeZoom setting, that way it will calculate the names up until that point and when it reaches the maximum then it just scales up the tiled image (which is why it gets pretty rough very quickly if you have no upper magnification limit)

    Thread Starter David 279

    (@david-279)

    Sorry Patrick you misunderstood, or maybe I didn’t explain it well, I meant the maximum zoom possible with leaflet is something near 36 but in practical terms anything higher than 22 is silly, not that your plugin goes up to 22, I was experimenting with the code on the https://plnkr.co/edit/z1p9x05vAv4h1sJJrDQC?p=preview site earlier trying to understand the issue

    I only found out about MaxNativeZoom when I was trying to find out why I was having problems and using google search, I agree it’s not easy to find in the docs but it’s here https://leafletjs.com/reference-1.5.0.html#gridlayer though it’s not a very easy to understand explanation.

    This is not meant as a moan I really like your plugin, I was just trying to work out why I was getting the grey screens, I’m not a programmer, I can just about manage a bit of CSS and if someone like yourself points me in the right direction I can almost understand PHP, js is beyond me though, I am fairly good at finding faults and working out why they are likely to be occurring, I have a good analytical brain, what I don’t understand is why only a few people are seeing this issue, that’s why I tried installing on a plain old boring site with no extra code, I figured if it was the site then I would get a different result but I didn’t, I also tried several browsers Chrome(my default) firefox, edge and even i.e because I know that sometimes Browsers can make a difference. So I then tried to work out what was going on, I used chrome developer tools to see what was loading and when and discovered that none of the map tiles load until after I drop under 18x magnification, then I looked at other sample sites and worked out that for some reason your plugin appears to be loading the map tiles at the wrong magnification. i.e loading the 18 magnification tiles when zoom is set to 17, so I then wrote everything up, because in the past you have been so helpful and I wanted to try and work out why it was not working for me as it should.

    Anyway it wasn’t meant detrimentally I think it’s a brilliant plugin I just want to get it to work for me

    Thread Starter David 279

    (@david-279)

    Right then, I have installed this on a different website just to see if it was Elementor playing nasty tricks and it’s not https://www.alexanderagricola.co.uk/locations/test-location/ this is a new install of events manager and a new install of your plugin and it will not go to a higher magnification than 17 or to be more precise it will not load the map tiles at a higher magnification than 17, the frame and icon etc are all present but the tiles will not load.

    So a couple of observations I’ve left the test page setup so that it starts at zoom 19, firstly no tiles load until you get to zoom 17, when you do get to zoom level 17 it’s opening https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/18/ (or whichever map server you are using) and then it loads up a folder one step higher than the magnification shown on screen as you go down, I think somewhere you are calling the files incorrectly, looking at the examples elsewhere, such as here https://leafletjs.com/examples/quick-start/ the tiles should be called at the matching zoom level so /18/ at zoom 18 you are currently calling them /18/ at zoom 17 and this is breaking the system – Also from having a play here https://plnkr.co/edit/z1p9x05vAv4h1sJJrDQC?p=preview MaxNativeZoom is important, you can have a MaxZoom greater than MaxNativeZoom (though quite honestly anything much higher than 22 is pointless but if your MaxNativeZoom is greater than the magnification the subdirectories go up to e.g if the directory goes to 19 and you set MaxNativeZoom to 20 it will grey screen

    Anyway that is why it’s greying out, but I’m not up to looking through your code to be able to work out where the error has crept in, if I were to guess however I’d say that somewhere you have linked MaxNativeZoom to the Value of Zoom and that for whatever reason your value for zoom is actually giving out a value 1 higher than it’s displaying

    Thread Starter David 279

    (@david-279)

    Tried without elementor, with default formatting and twenty twelve theme still get grey screens at top two zoom factors (18 & 19)

    Note I appear to not be the only person with this issue as reported earlier in this thread by iamthewebb

    • This reply was modified 5 years, 2 months ago by David 279.
    Thread Starter David 279

    (@david-279)

    Any answers as to why this is happening ?

    Thread Starter David 279

    (@david-279)

    By the way I should mention that the high magnification maps don’t appear in the backend either, sorry that’s probably important, in the previous release they went up to 18x but went grey at 19x is there something you altered in this version that might have an effect there ?

    Thread Starter David 279

    (@david-279)

    Err that gives me a big blank section – I assume I was meant to copy and paste the above as is into my functions.php and then just insert the shortcode [elementor_single_map]

    Thread Starter David 279

    (@david-279)

    I have no idea if this is the problem but I saw somewhere (and can’t find it now) that maxNativeZoom: might be important, apparently it won’t display higher than whatever you have that set to

    Thread Starter David 279

    (@david-279)

    As you will note as soon as you zoom out to mag lvl 17 the maps start to load

    Thread Starter David 279

    (@david-279)

    Pretty certain thats not the issue but I’ve just disabled it you can reload and see

Viewing 15 replies - 1 through 15 (of 72 total)