rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
338 stars 105 forks source link

Exist DistanceMatrix service? #212

Closed mirkotnn closed 2 years ago

mirkotnn commented 2 years ago

Exist DistanceMatrix service in this library?

valentasm1 commented 2 years ago

Could you give more information or examples?

mirkotnn commented 2 years ago

example in Js:

var service = new google.maps.DistanceMatrixService(); var origins = []; origins.push(new google.maps.LatLng(lat, lng));

function getDistance(place) { var destinationA = new google.maps.LatLng(place.geometry.location.lat(), place.geometry.location.lng());

service.getDistanceMatrix({
    origins: origins,
    destinations: [destinationA],
    travelMode: 'DRIVING',
    unitSystem: google.maps.UnitSystem.METRIC,
}, callback);

}

function callback(response, status) { if (status == 'OK') { ... } }

valentasm1 commented 2 years ago

No it dont exists. Sorry. As always PR is wellcome.