download separate from map
Dear Sir/Madam, I'd like to have the export and download options in the Waymark plugin separate from the map, and placed below or next to it on the page. Is there a separate shortcode for this?
Thanks for reaching out. Please see this example of how to do this using the callback function.
I hope this helps.
Is niet gelukt Kunt u mij een voorbeeld geven?
Didn't work out Can you give me an example? https://johanmtb.com/proef-gpx/
[Waymark map_id="1801"]
hopelijk voldoende?
I use the cloning the Export Feature function but get multiple exports under each map when I put multiple maps on one page. If I put two cards, then two by three, then three.
Hi @Johanmtb782,
Try this instead, only include the script once on the page:
// Once the page has loaded
jQuery(document).ready(function () {
//Get the shortcodes
const shortcodes = jQuery(".waymark-shortcode");
// Each shortcode
shortcodes.each(function () {
const shortcode = jQuery(this);
const exportContainer = jQuery(".waymark-meta-export_data", shortcode);
//Add after the Map
shortcode.after(exportContainer.clone());
});
});
I hope this helps.
Joe
Sorry another download of the first map, the other maps give the route of the first map.
Hi Joe
This works very well if there is a map on a page. But if there are multiple maps on the page, the next Map indicates the gpx Of the first map, with even more maps, only the first map is downloaded.
GR JOHAN
morehawes left a comment (OpenGIS/Waymark#68) https://github.com/OpenGIS/Waymark/issues/68#issuecomment-3566763372 Hi @Johanmtb782 https://github.com/Johanmtb782,
Try this instead, only include the script once on the page:
// Once the page has loaded jQuery(document).ready(function () { //Get the shortcodes const shortcodes = jQuery(".waymark-shortcode");
// Each shortcode shortcodes.each(function () { const shortcode = jQuery(this); const exportContainer = jQuery(".waymark-meta-export_data", shortcode);
//Add after the Map shortcode.after(exportContainer.clone());}); }); I hope this helps.
Joe
— Reply to this email directly, view it on GitHub https://github.com/OpenGIS/Waymark/issues/68#issuecomment-3566763372, or unsubscribe https://github.com/notifications/unsubscribe-auth/BOGSOM3F427ABM5AGMFDLKT36BYINAVCNFSM6AAAAACMWGX3JCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNRWG43DGMZXGI. You are receiving this because you were mentioned.
What I've done now is split the page, and it works. But it is not the solution.