X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/53d80f2a01439ee73cf679c53326ec8fb32ab1ed..5e169469ff3e97710a0c380f3cda99d50c32d90b:/js/kivi.CustomerVendor.js diff --git a/js/kivi.CustomerVendor.js b/js/kivi.CustomerVendor.js index bfef730d4..1cb08db49 100644 --- a/js/kivi.CustomerVendor.js +++ b/js/kivi.CustomerVendor.js @@ -77,7 +77,7 @@ namespace('kivi.CustomerVendor', function(ns) { '#country' ]; - this.MapWidget = function(prefix) + this.MapWidget = function(prefix, source_address) { var $mapSearchElements = []; var $widgetWrapper; @@ -117,7 +117,9 @@ namespace('kivi.CustomerVendor', function(ns) { searchString += stmt; } - var url = 'https://maps.google.com/maps?q='+ encodeURIComponent(searchString); + source_address = source_address || ''; + var query = source_address != '' ? 'saddr=' + encodeURIComponent(source_address) + '&daddr=' : 'q='; + var url = 'https://maps.google.com/maps?' + query + encodeURIComponent(searchString); window.open(url, '_blank'); window.focus();