Top

Determine the Center of the Map by Customer Location in Mapply

To change the search radius in Mapply, follow these steps:

  1. Visit Mapply Account Page, log in if necessary.

    log in

  2. Select Display Settings.

    select display settings 

  3. Copy and paste this code in the "Page Footer HTML" section:
    <script>
    jQuery(document).ready(function(){
    var infoWindow = new google.maps.InfoWindow({map: map});
     navigator.geolocation.getCurrentPosition(function(position) {
     var pos = {
     lat: position.coords.latitude,
     lng: position.coords.longitude
     };
    
     infoWindow.setPosition(pos);
     infoWindow.setContent('Location found.');
     map.setCenter(pos);
     jQuery('.search_bar button').click();
     }, function() {
     handleLocationError(true, infoWindow, map.getCenter());
     });
    
     function handleLocationError(browserHasGeolocation, infoWindow, pos) {
     infoWindow.setPosition(pos);
     infoWindow.setContent(browserHasGeolocation ?
     'Error: The Geolocation service failed.' :
     'Error: Your browser doesn\'t support geolocation.');
     }
    });
    </script>

    copy and paste this code 

  4. Select Save.

    select save

That's it!

Next Steps