• Resolved ellocosolo

    (@ellocosolo)


    Dear Joe,

    I’m trying to center my “Global Map” (see provided link) using the map_centre shortcode, and set a zoom level at the same time with map_zoom, as I don’t want to show everything on that map but just the last part with markers. It seems I cannot use both at the same time. I want to center on the city of Rome (lat,long = 41.89193,12.51133) use a zooom set at 8.

    I did some tests and here are the results :

    Case A
    [Waymark map_id=”466″ map_centre=”41.89193,12.51133″ map_zoom=”8″ shortcode_header=”0″ showfilter=”0″]

    neither map_centre nor map_zoom are respected. Map is set with default behaviour to show all visible data (markers and gpx track).

    Case B
    [Waymark map_id=”466″ map_centre=”41.89193,12.51133″ shortcode_header=”0″ showfilter=”0″]

    map_centre is correct (=”41.89193,12.51133″) and set on Rome

    Case C
    [Waymark map_id=”466″ map_zoom=”8″ shortcode_header=”0″ showfilter=”0″]

    map_zoom is correct (=”8″) but the center is the same as in Case A

    Case D
    [Waymark map_zoom=”8″ map_centre=”41.89193,12.51133″ shortcode_header=”0″ showfilter=”0″]

    map_centre and map_zoom are correct, but unfortunately I cannot show my map with gpx and markers…

    I tried to switch the shortcodes order, to no avail.

    I do then think that bthose 3 shortcodes cannot be used at the same time, and do not see any other test case to prove it. If you have any idea of such tests, I would gladly do.

    Can you confirm that interoperability problem?

    Thanks in advance for your help and best regards

    Gilles

    • This topic was modified 1 year, 3 months ago by ellocosolo.
    • This topic was modified 1 year, 3 months ago by ellocosolo. Reason: test without map_id

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Joe

    (@morehawes)

    Hi @ellocosolo,

    Thank you for the detailed information. However I have tested this on my setup and am not seeing the issue you mentioned :-/

    Are you still having issues with this? Looking at the page you linked to, I am seeing the Map centered on Rome, and not adjusted to view all data (i.e. default behaviour).

    Please do let me know if you are still experiencing issues and I will take another look.

    Cheers,

    Joe

    Thread Starter ellocosolo

    (@ellocosolo)

    Hello Joe,

    Many thanks for your reply and trying to reproduce the problem. The actual global map is indeed centered on Rome because the shortcode map_centre is used but not the shortcode map_zoom. As soon as I add map_zoom, it is not centered anymore and just shows the standard behaviour by adapting to show all data.

    I did some further tests that will probably help pinpoint the problem. Actually for the Global Map and that gpx that extends from Switzerland to Italy (~1600km), I tried different zoom settings. Here are the results :

    map_zoom set from 15 to 11 -> OK map is centered on Rome and has the right zoom level
    map_zoom set from 10 to 2 -> NOK both map_centre and map_zoom are not respected and standard behaviour is set (show all data)
    map_zoom set to 1 -> OK map is centered on Rome (hard to check but presumably) and has the right zoom level

    I created a second map with the much smaller stretch I cycled yesterday from Rome (~130km) and did the same tests. Here are the results :

    map_zoom set from 15 to 14 -> OK map is centered on Rome and has the right zoom level
    map_zoom set from 13 to 10 -> NOK both map_centre and map_zoom are not respected and standard behaviour is set (show all data)
    map_zoom set to 9 -> OK map is centered on Rome and has the right zoom level
    map_zoom set from 8 to 5 -> NOK both map_centre and map_zoom are not respected and standard behaviour is set (show all data)
    map_zoom set from 4 to 1 -> OK map is centered on Rome (hard to check but presumably) and has the right zoom level

    I created a third map with a gpx I created for a train stretch I took across the Alps (~30km), containing only 2 trackpoints. Here are the results :

    map_zoom set to 15 -> NOK both map_centre and map_zoom are not respected and standard behaviour is set (show all data)
    map_zoom set to 14 -> OK map is centered on Domodossola and has the right zoom level
    map_zoom set from 13 to 12 -> NOK both map_centre and map_zoom are not respected and standard behaviour is set (show all data)
    map_zoom set from 11 to 10 -> OK map is centered on Domodossola and has the right zoom level
    map_zoom set from 9 to 7 -> NOK both map_centre and map_zoom are not respected and standard behaviour is set (show all data)
    map_zoom set from 6 to 1 -> OK map is centered on Domodossola (hard to check but presumably) and has the right zoom level

    Strange, no ? From the results of the Global Map, I would have thought that there is something happening based on the level required to show all and the level set manually through the shortcode. But the tests with the smaller stretches make me doubt it. The only relation I see is between the size of the stretch and the number of variations in the correct setting of the map_zoom shortcode.

    I would gladly send you those gpx if you want to reproduce any of those tests.

    I did one further test, for info, but I don’t think it will help in any way, but who am I to know ? Still, here is the result :

    I created a map centered on Rome and with map_zoom=”8″. It was shown correctly. I then added the gpx with my full track to the map. Refreshed the page and then the standard behaviour was shown (show all data).

    Tell me if you need further tests, and any thanks in advance for your precious help.

    Best regards

    Plugin Author Joe

    (@morehawes)

    Hi @ellocosolo,

    Apologies in my delay getting back to you. I have tried to recreate this issue on my end, however I have been unsuccessful.

    I have put up a demo here. Please can you confirm you are still seeing something different?

    If so, could you recreate a similar page to demonstrate this? I’m sorry you are experiencing this weird glitch!

    Joe

    Thread Starter ellocosolo

    (@ellocosolo)

    Dear Joe,

    Please do not apologize, your plugin is great and you’ve been very helpful with all my questions/problems.

    Unfortunately, the problem remains on my site. As requested, I created a page that you’ll find here : Map Centre/Zoom Test – Loco Solo (loco-solo.ch).

    Thanks for your support !

    Thread Starter ellocosolo

    (@ellocosolo)

    Hello again,

    As the only difference between your page and mine is the elevation graph, I tested a Case E on the same page as above, and added show_elevation=”0″. And… Bingo ! It works if I do no show the elevation graph. Can you reproduce it on your end ?

    If this is the problem, then I still do not understand why the behaviour is different when the gpx’s are different (see my tests from 2 weeks ago).

    Plugin Author Joe

    (@morehawes)

    Hi @ellocosolo,

    added show_elevation=”0″. And… Bingo ! It works if I do no show the elevation graph. Can you reproduce it on your end ?

    Yes, that’s it! Very strange, I will need to investigate further. Thanks for your perseverance 🙂

    Joe

    Plugin Author Joe

    (@morehawes)

    Hi @ellocosolo,

    I am happy to report that I have figured this out and a fix will be included in the next release 🙂

    The elevation plugin was resetting the view upon load and ignoring the settings. I have now stopped this.

    I appreciate your efforts in getting to the bottom of this!

    Joe

    Thread Starter ellocosolo

    (@ellocosolo)

    Dear Joe,

    Glad to be part of making a wonderful product even better.

    Thanks for your time and for the fix !

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘map_id, map_centre and map_zoom shortcodes cannot be used at the same time’ is closed to new replies.