• Hi I can’t use the find Lang and Log When I enter a address and hot Search nothing happens, When I fill in the Long and Log manually It goes to the right place but there is no maker visible on the map

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter DennisV

    (@kdvnjoy)

    Search is still not working but the marker issue was because i forgot to verify the url of the website this was not in the manual

    Same problem here. Location search not working. Browser console reports the following error

    `Uncaught TypeError: $ is not a function
    at ebMapFindAddress (eb-google-map-admin.js?ver=1.2.1:1)
    at HTMLFormElement.onsubmit (VM3038 post.php:1)

    Love the plugin otherwise. Thanks for the good work!

    • This reply was modified 4 years, 2 months ago by matbar20.
    Tomas Eklund

    (@tomas-eklund)

    There is a bug in the eb-google-map-admin.js file. Replace it’s content with this and it will work:

    function ebMapFindAddress(ob) {
        var $ = jQuery;
        var address = $(ob).parent().find('input').attr('value');
        if (address != '') {
            geocoder = new google.maps.Geocoder();
            geocoder.geocode({'address': address}, function (results, status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    var output = $(ob).parent().find('.eb-output-result');
                    var latiude = results[0].geometry.location.lat();
                    var longitude = results[0].geometry.location.lng();
                    $(output).html("Latitude: " + latiude + "<br>Longitude: " + longitude + "<br>(Copy and Paste your Latitude & Longitude value below)");
                    $(ob).parents('.elementor-control-map_notice').nextAll('.elementor-control-map_lat').find("input").val(latiude).trigger("input");
                    $(ob).parents('.elementor-control-map_notice').nextAll('.elementor-control-map_lng').find("input").val(longitude).trigger("input")
                } else {
                    alert("Geocode was not successful for the following reason: " + status)
                }
            })
        }
    }
    
    function ebMapFindPinAddress(ob) {
        var $ = jQuery;
        var address = $(ob).parent().find('input').attr('value');
        if (address != '') {
            geocoder = new google.maps.Geocoder();
            geocoder.geocode({'address': address}, function (results, status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    var output = $(ob).parent().find('.eb-output-result');
                    var latiude = results[0].geometry.location.lat();
                    var longitude = results[0].geometry.location.lng();
                    $(output).html("Latitude: " + latiude + "<br>Longitude: " + longitude + "<br>(Copy and Paste your Latitude & Longitude value below)");
                    $(ob).parents('.elementor-control-pin_notice').nextAll('.elementor-control-pin_lat').find("input").val(latiude).trigger("input");
                    $(ob).parents('.elementor-control-pin_notice').nextAll('.elementor-control-pin_lng').find("input").val(longitude).trigger("input")
                } else {
                    alert("Geocode was not successful for the following reason: " + status)
                }
            })
        }
    }

    I’ve simply added var $ = jQuery; to the beginning of each function.

    This obviously hasn’t been fixed but your edit Tomas works perfectly. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Markers not showing and cant search Lat. and Log.’ is closed to new replies.