Add my current location as marker on submit page?

New home Forums Visitor Generated Markers General queries Add my current location as marker on submit page?

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #80527
    F225
    Participant

    Couldn’t edit, but forgot to add something:
    When a VGM listing is waiting to be approved, and if i press edit and then save, the uploaded picture disappears from the listing.

    #80537
    Matthew
    Moderator

    Hi there,

    Thank you for your response and continued time on this.

    That is great to hear that the updated code worked, thank you for the confirmation!

    With regards to customizations that go beyond basic custom script customizations, unfortunately we currently do not have the capacity to take on any additional customization requests at this stage. We do apologize for this.

    Please see my responses below regarding each of your points.

    1. You could use some JavaScript that looks like this:

    jQuery(function($){
      jQuery(document).ready(function(){
        jQuery('<img src="">').insertAfter('.wpgmza_map');
      })
    })

    2. Unfortunately we currently do not have a setting for changing the VGM icon, however, I have added this to our feature request list.

    3. This is also currently not supported. This has also been added to the feature request list.

    4. Thank you for reporting this, I have logged this so that we can look into it accordingly.

    In the meantime, please may I ask if you may use this temporary solution to remove the “Get Directions” link in the infowindow:

    jQuery(function($){
      jQuery(document).on('infowindowopen.wpgmza', function(event){
        let marker = event.target.feature;
        let infowindow = jQuery(event.target.element);
        if(marker.id <= 0){
          infowindow.find('.wpgmza_gd').remove();
        }
      })
    })

    5. This does appear to be a small bug, thus I have logged this issue to be resolved in a future update.

    6. The marker listing is placed and displayed on the map on page load, however, the marker listing can only be ordered by ‘distance’ once your browser’s location has been retrieved which is why the reordering according to distance may be delayed in some cases.

    7. Yes this is possible with some custom JS code which you may use below:

    jQuery(function($){
      jQuery(document).on('markersplaced.wpgmza', function(){
        let counter = WPGMZA.maps[0].markers.length;
        jQuery('<p class="wpgmza_custom_counter_element">Counter: ' + counter + '</p>').insertAfter(".wpgmza_map");
      })
    })

    8. I am unable to see the “Share” or “Close by” buttons you are referring to, thus please may you advise? If you are wanting to add functionality to those buttons, you will need to write your own custom JS code for this.

    9. Yes this can be done using the following code:

    jQuery(function($){
      jQuery(document).on('infowindowopen.wpgmza', function(event){
        let infowindow = jQuery(event.target.element);
        infowindow.append('<a href="mailto:[email protected]" class="wpgmza_custom_infowindow_report_button">Report a problem</a>');
      })
    })

    Note that you will need to use some custom CSS code to style the button accordingly.

    10. I have run a few tests and have been unable to recreate this issue. Please may I ask if it would be possible to share a recording of what you are experiencing on your end?

    All custom scripts mentioned can be saved in their respective custom script block (Maps -> Settings -> Custom Scripts).

    I hope this helps?

    Kindest Regards,
    Matthew

    #80554
    F225
    Participant

    Thanks again! This helped me alot!

    6.
    Makes sense, however if i visit the page, i can wait 5 minutes and the location has not been updated(or the list) but if i minimize and maximize my browswer window then suddenly the location is aquired and the list is sorted.

    8.
    I can only see these buttons when using the “panel” style of infowindow, the buttons are called “wpgmza-share” and “wpgmza-nearby”
    Is it possible to add these to the default infowindow box instead?(like you did with the “report a problem” button)

    9.
    Thanks!
    Is it possible to automaticly add the markerID as subject in any way? Whenever a user use this button, it’s not always clear what listing is being reported when i get the email.
    Or would this need to be a custom contact form?

    10.
    I will try some more and come back to this.

    #80595
    Matthew
    Moderator

    Hi there,

    Thank you for your response.

    6. Unfortunately this is not something that we control we simply send a request, and as soon as the request returns a response, we take that data and process it accordingly.

    8. Unfortunately these buttons are not added to the default infowindow, however, you may do this using the custom JS method, thus please update your respective custom JS code section relating to the “Report a problem” code with the below:

    jQuery(function($){
        jQuery(document).on('infowindowopen.wpgmza', function(event){
            let infowindow = event.target;
            let infowindowEl = jQuery(event.target.element);
            let marker = event.target.feature;
            
    
            //Share button
            infowindowEl.append('<a href="javascript:void(0);" class="wpgmza_custom_infowindow_share_button">Share marker</a>');
            jQuery(document).on('click', '.wpgmza_custom_infowindow_share_button', function(){
                infowindow.onShare();
            })
    
            //Nearby button
            infowindowEl.append('<a href="javascript:void(0);" class="wpgmza_custom_infowindow_nearby_button">Find nearby</a>');
            jQuery(document).on('click', '.wpgmza_custom_infowindow_nearby_button', function(){
                let map = marker.map;
                jQuery(map.storeLocator.addressInput.element).val(marker.address);
                map.storeLocator.onSearch();
            })
    
            // Report a Problem button
            infowindowEl.append('<a href="mailto:[email protected]?subject=Reporting marker '+ marker.id +'" class="wpgmza_custom_infowindow_report_button">Report a problem</a>');
        })
      })

    Once this has been done, please may you confirm if this helps?

    9. This may also be possible, thus I have added the update code to achieve this in the code, thus please let me know if this helps?

    Kindest Regards,
    Matthew

    #80617
    F225
    Participant

    Thanks again!
    Exactly what i wanted!

    #80634
    Matthew
    Moderator

    Hi there,

    Thank you for your response and confirmation.

    That is really great to hear and it was my pleasure.

    Have a great day further!

    Kindest Regards,
    Matthew

Viewing 6 posts - 16 through 21 (of 21 total)
  • You must be logged in to reply to this topic.