• Resolved chaosad2

    (@chaosad2)


    Hi,

    Two questions about overview map :

    • Is it possible to keep latitude, longitude and zoom level in page address ? It would be useful when a user clicks on pop up link and come back on overview map.
    • Where can I customize popup content ? (I would like to change picture size first and, if possible, add some informations, like custom fields).

    Thank you for your great job !

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

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author hupe13

    (@hupe13)

    Is it possible to keep latitude, longitude and zoom level in page address ? It would be useful when a user clicks on pop up link and come back on overview map.

    No it isn’t. But the user can click the “back” botton of the browser. Or you can use targetmarker.

    Where can I customize popup content ? (I would like to change picture size first and, if possible, add some informations, like custom fields).

    The popup content is made up with the title and the permalink, the featured image and the categories of the post. It should be useable for all users. I could imagine using another custom field to create an own popup content. But won’t that be too complicated for the user (i.e. for you)?

    Thread Starter chaosad2

    (@chaosad2)

    Thank you for your answer.

    I usually use back button (I want a really simple website), but sometimes, back button sends me on original zoom, latitude and longitude. I don’t know why.

    Another custom field would be useful : I don’t know if many users need it, but it would be useful to show some additional informations (ex : track distance)

    Last question : what about picture size? Can it be changed?

    • This reply was modified 3 months, 1 week ago by chaosad2.
    • This reply was modified 3 months, 1 week ago by chaosad2.
    Plugin Author hupe13

    (@hupe13)

    I usually use back button (I want a really simple website), but sometimes, back button sends me on original zoom, latitude and longitude. I don’t know why.

    I think, this is a browser (cache) thing. But go back to the state, which the user leaves is not possible. Maybe it works somehow, I don’t know.

    Another custom field would be useful : I don’t know if many users need it, but it would be useful to show some additional informations (ex : track distance)

    Last question : what about picture size? Can it be changed?

    The popup content is fixed, the picture size also. But I tested yesterday some things. I will provide a custom field for popup content.

    Thread Starter chaosad2

    (@chaosad2)

    Thanks, great.

    I will be beta tester !

    Thread Starter chaosad2

    (@chaosad2)

    I gonna have a look to this leaflet extension :

    https://github.com/MarcChasse/leaflet.Permalink

    Do you think it can be added with a custom shortcode ?

    Demo : https://marcchasse.github.io/leaflet.Permalink/

    Plugin Author hupe13

    (@hupe13)

    It took a while, because there was a problem to display the code. See here.

    Thread Starter chaosad2

    (@chaosad2)

    Well, no, it didn’t take a while (less one day !). Thank you for spending your time on this project.

    I tried it and I can see lat, lon and zoom level in address bar. Pretty cool.

    But I met an issue ??

    When moving map, coords and zoom level are updated -> ok

    If you refresh the map (or copy/past it, or click on back button from another page), address is kept (ok)… but map is set on initial lat, lon and zoom level (defined in leaflet map plugin).

    I thought that was because of fitbounds option, I disabled it, same issue.

    It seems to be the same issue on your example map, but not on plugin demo map.

    • This reply was modified 3 months, 1 week ago by chaosad2.
    Plugin Author hupe13

    (@hupe13)

    Try it again.

    Thread Starter chaosad2

    (@chaosad2)

    Well, sorry, but it doesn’t work for me.

    If I refresh the page (or copy/past address, or click on back button from another page), address is kept (ok)… but map is set on initial lat, lon and zoom level (defined in leaflet map plugin) again.

    If I move the map and click back button, no problem, I can see all previous coords.

    Same issue (for me) on your demo page.

    Does it work for you ?

    Plugin Author hupe13

    (@hupe13)

    Please test it again. You must “click” or “touch” (with one finger), then it begins to work if it is no hash. If you zoom it with two fingers as first action it does not work.

    If you call it with a hash, it works immediately.

    Changed: It does not work correct always with the hash in the original URL. It is an interaction with browser cache, lat, lng, zoom resp. fitbounds from leaflet-map and the hash.

    • This reply was modified 3 months ago by hupe13.
    Thread Starter chaosad2

    (@chaosad2)

    Well, it seems to work ! ??

    Really thank you for spending time on it !

    Have a nice Sunday !

    Plugin Author hupe13

    (@hupe13)

    I will be beta tester !

    Test it! You can now use a custom field for the popup, see the documentation in backend. (Note).

    Thread Starter chaosad2

    (@chaosad2)

    Well, first try this evening (github version installed) !

    New acf field (called “overview-pop-up”), auto-filled from a php file.

    It gives me text in acf field and pop-up content is OK.

    Using this field disable pop-up title and thumbnail : is it right or is it an issue ?

    If it’s right, I gonna add link on title and add a new thumbnail.

    You can have a look here :

    https://mymaps.fr/carte-generale/#46.33632,4.14262,13z

    “Anzy le Duc” and “Oyé” tracks are updated with new field.

    Plugin Author hupe13

    (@hupe13)

    Should I provide the categories, permalink, title (and thumbnail(?)) for use with curly brackets {categories} {permalink} {title} like for geojson?

    Thread Starter chaosad2

    (@chaosad2)

    Well, I never use geojson files on my website, I gonna have a look.

    If you keep active :

    • title (and permalink) (always needed, I think)
    • category (enable if using “show_category”) and thumbnail (enable if using “show_thumbnails”)

    and let user optionnaly enable “popup=overview-popup” to customize pop-up content, it would be enough and almost easy to use.

Viewing 15 replies - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.