175
Views
9
Comments
Solved
How to draw directions with google maps
Question
Application Type
Mobile

Hi, good afternoon.


I'm new in Outsystems ecossystems. I need to draw direction between two points (coordinates {lat,long}) in google maps mobile app.


I'm using the GoogleMapsMobileCustom, using the UI MAP to show my map.

My question here is: how can I draw direction between my current location (I already have it in a local variable) and other location desired? I know that I need to pass a structure with Data type MapDirections, but, when I should pass it? My flow is: the user open the app and app get the current location. So, when user click in the search button, and type an address, I need to draw the route direction on the map. I think I should reload the map,or I'm wrong?


Thanks ,

Daniel Nogueira

2021-01-04 08-13-48
Toto
 
MVP
Solution

Hi Daniel,

It seems like João said, your google API key is not configured. As you can the the watermark "For Development Purpose Only"

Thanks


2018-10-29 08-31-03
João Marques
 
MVP

Hi Daniel,


Have you checked the Google Maps Mobile Samples Forge component?

It has a sample for several use cases using Google Maps in a mobile app, including the drawing distance between two coordinates.


Regards,
João

UserImage.jpg
Daniel Nogueira

Hi João, I saw this samples now, but in the sample, when I click on a marker and then, click on car icon, to get the direction, nothing happen.



2018-10-29 08-31-03
João Marques
 
MVP

Hi Daniel,


Have you set up the maps api key?

2021-01-04 08-13-48
Toto
 
MVP
Solution

Hi Daniel,

It seems like João said, your google API key is not configured. As you can the the watermark "For Development Purpose Only"

Thanks


UserImage.jpg
Daniel Nogueira

Thanks, this was my problem.
I thought that because it was in development, I didn't need to activate the billing.


thanks

2023-01-19 15-05-03
Sirajeddine Bouasker

Hi @João Marques ,
I tried to have a look on these samples, but I have got many errors, despite I have a valid API Key.
Please have a look on the attached pic.

I want to live track a truck, so I need to use Google Maps Mobile plugin.

Could you please tell me what's wrong?

Kind regards,
Sirajeddine

Errors_demo_Maps_samples.png
2021-01-04 08-13-48
Toto
 
MVP

Hi,

Please share the oml file (but remove the API key)

It seems the javascript cannot "getMap" function.

2023-01-19 15-05-03
Sirajeddine Bouasker


Hi Toto, thanks for your reply.

OK please find attached the oml file.

GoogleMapMobileSamples.oml
2021-01-04 08-13-48
Toto
 
MVP

Hi,

You are using MapId variable, but this is never paired with the widget ID of the Map.

Thats why the error is showing.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.