HOW TO: Use the Navigate control

Hallo,

thank you very much. I changed the destination and it worked. Good. It means the API key works.
Bad. It means there is a mistake in my code. I got a csv. It needs to read the file, show destinations from the file, the user selects a destination from the file and it shows the way. I will have another look at Read file based on location maybe it helps.
Sorry, another question. I noted in your aias you have Android 5+, Anroid 3..., iOS... How do you get it? If I get iOS can an iPhone connect to the AI Companion or Emulator? Sorry 2 questions.

what is in vertical arrangement 2?

Welcome @Tristan_Holifield

What? The Map component was placed within the VA and all this stuff (look at the aia) . Actually, these components can be placed anywhere you want in your app.

Is that what you wanted to know?

me parece que algo esta mal en este bloque por que no me ubica el lugar de partida aplicandole el check con el GPS por mas que este activado

image

o es necesario obtener mi propio API

por lo demás todo esta bien el único problema es el gps

saludos

yes, the api key is free (see the tutorial).

You must fill in TextBox1 with destination you want using the app.

If the default destination is not on the same continent as your device you will notice error messages.

The Blocks image you posted is blurry. Sorry I can not read it so I do not understand what you are talking about.

What is the problem with the gps? I don't understand your problem. Could you explain in more detail? The gps takes up to a minute to determine where your device is located; it must get a satellite fix.

The actual use of Navigate is easy, the tutorial shows several options that make it appear complicated. :slight_smile:

puse check use currente Location
en el TextBox1 Universal Studios Hollywood

WhatsApp Video 2023-03-15 at 7.11.07 PM

espere el minuto y no salió nada

cambie la dirección de llegada en un lugar mas cercano y sale lo mismo por cierto estoy en el mismo continente

The error message indicates ORS cannot generate a route between your GPS location and the other location. Why I cannot tell; it is possibly because your GPS is not getting a location fix. What

[quote="SteveJG, post:10, topic:5900, full:true"]

The aia works fine for me.

Are you using the latest Companion 2.66?

You say you are in North America. Check the
doitNavigate
value of the StartMarker and the EndMarker using DoIt debugger. What are they?

si estoy utilizando la última Companion 2.66

no modifique nada estoy trabajando con este .aia que enviaste
DirectricesNavegaciónSimple.aia (250.0 KB)

estoy en américa del sur Perú

@elmachi130 The app works as intended without error messages.

You get Error 4003: Routing service failed with status 400 Bad Request since you don't live in North America and select "use current Location" and click Find Route. I expect ORS possibly cannot provide a route to Hollywood because it cannot navigate the Panama Canal and no roads :cry: . Change the Destination Address from Universal Studios Hollywood to something else like Lima Peru. What happens?
navigateLocation . Replace Universal Studios Hollywood with Lima Peru and it should work for you (unless your location is not on an OSM road :cry: and cannot 'connect'.

Although Navigate provides a 'route' the free service is not very smart and does not optimize the route. It works best for short distances. In my opinion, ORS is a toy.

WhatsApp Video 2023-03-16 at 8.57.41 AM
espere hasta 3 minutos y nada la dirección
av el parral comas
si es ubicable cuando busco de un punto a otro punto

el problema es cuando uso
use current Location

y mi ubicación también es ubicable ya que vivo en una zona urbana y nunca e tenido problemas con mi ubicación por GPS

en tu imagen veo 3 Marker rojo verde y amarillo
image

a mi me sale solo rojo y verde Marker1 esta deshabilitado en el .aia

image

será por eso?

av el parral comas Lima Peru perhaps????????? insufficient address

Hi

Anyone has the below error messages?

Error 4003: Routing services failed with status 404 Not Found.

I downloaded your .aia and got this error and my project has same errors.

Please comment me.
Thanks

See here ?

1 Like

Oh good news.
If it is companion bug, do you think if the app build, then no problem happened??

Thanks for you response.

If you use the modified companion app and it works, why not try a compiled app and see if it works ?

1 Like

Great!! It works

hi
This bug causes navigation to not work when building the .apk. And the companion is an older version than the current companion. A companion upgrade is needed quickly. How can I solve problems with companion upgrade and build?

Sorry, you cannot presently build your app using the Companion 2.70d1u , The Companion 2.70d1u ONLY works in development mode at the present time.

Everyone has to wait until MIT fixes the bug, until then you will not be able to build using Navigate. :cry: When will it be fixed? days, weeks, or more.

1 Like

Any news fixes on official page : ai2.appinventor.mit.edu ?
Thanks

This 404 error issue was fixed July 7th

Changes between nb196 and nb197 (July 7, 2024)

This is a component release which includes bugfixes and improvements. It includes a new Android MIT AI2 Companion versions 2.71 (from Google Play) and 2.71u (directly downloaded from MIT App Inventor).

Features:

  • New user interface. Go to Settings > User Interface Settings > Neo to try it out
  • ChatBot component adds a new block, ConverseWithImage to ask questions about images (API key needs payment for gpt-4)
  • Palette categories can be independently expanded/collapsed
  • The main body of MIT App Inventor now loads via the CloudFlare content delivery network. This should result in faster startup of MIT App Inventor.
    • Note: Sites with restrictive firewalls will need to unblock access to https://.appinv.net (where the “” means any site name). This domain (appinv.net) is used exclusively to distribute the code of MIT App Inventor. Different host names are used for different versions.
  • You can now set the “Origin” of Image Sprites. The origin is used to calculate when a Sprite is involved in a collision as well as the point it rotates around.

Bug Fixes:

Fix a 404 error in the Navigation component Internals

Internal Changes:

  • Fix an issue with running d8 on Windows machines