Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Directions #125

Open
elaintarha opened this issue Mar 26, 2024 · 1 comment
Open

Support for Directions #125

elaintarha opened this issue Mar 26, 2024 · 1 comment
Assignees

Comments

@elaintarha
Copy link

Currently there is no module that supports DirectionsService for obtaining and rendering a route between points. This would be hugely useful feature!

https://developers.google.com/maps/documentation/javascript/directions

Example of use:
`
function initMap() {
var directionsService = new google.maps.DirectionsService();
var directionsRenderer = new google.maps.DirectionsRenderer();
var chicago = new google.maps.LatLng(41.850033, -87.6500523);
var mapOptions = {
zoom:7,
center: chicago
}
var map = new google.maps.Map(document.getElementById('map'), mapOptions);
directionsRenderer.setMap(map);
}

function calcRoute() {
var start = document.getElementById('start').value;
var end = document.getElementById('end').value;
var request = {
origin: start,
destination: end,
travelMode: 'DRIVING'
};
directionsService.route(request, function(result, status) {
if (status == 'OK') {
directionsRenderer.setDirections(result);
}
});
}
`

@paodb paodb moved this to Inbox (needs triage) in Flowing Code Addons May 6, 2024
@paodb paodb moved this from Inbox (needs triage) to To Do in Flowing Code Addons Jul 22, 2024
@paodb paodb self-assigned this Jul 22, 2024
@paodb
Copy link
Member

paodb commented Nov 13, 2024

The web-component part already have support for directions, so the complexity would be to create a Java API to handle that. I did some testing adding the apikey as requested but I'm getting this errors in console:
image
I think we need to follow these instructions to enable the service. Is this something we can do @mlopezFC? Also in the next section it mentions "pricing". The Directions API uses a pay-as-you-go pricing model as explained here so, would it be okay to move forward with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

2 participants