Creating a custom navigation application for campus setup

What you have in your FeatureCollectiion are the coordinates of a Polygon with multiple coordinates. A single set of coordinates is necessary to navigate for each building. Make a List of buildings and their coordinate or write very complex code to use the json for the destination coordinates to build your destination selection ListView

An example List for two buildings:

What is possible using a List of Buildings in the form Building, latitude, longitude is shown here:


using the Navigate by foot option (left) and car option (right).
The user's location is the green marker; the destination is the red marker. I used the coordinates of the first coordinate shown for the Great Hall polygon.

The directions are pretty vague ( in my opinion). They certainly do not provide the best route using the Navigation tool and probably do not need to be displayed. Showing just the user location, destination location and track on the map might be sufficient.

I will try to make use of the first suggestion of creating a list of buildings and their coordinates. This means that l will have to do so for all the other datasets that l have for example parking spaces and sports grounds. I also agree with advice that you stated above of using a track on the map l will definitely take into considerations. Kindly provide the full blocks that you used for creating the samples of the navigation app that you sent ( the one showing great hall)

Also l wanted to ask how many elements can l add to the buildings list (the buildings dataset contains 60 buildings) Is it possible for me to add all of them in the list l will be creating with their single set of coordinates

The full blocks for a basic app might look like this:

To construct the Great Hall images of the app, I had to disable the Blocks that link the LocationSensor to the Navigate.StartLatitude and StartLongitude. I then use a static value for the StartLatitude and StartLongitude. Why? To present an example. The Navigate will give an error if the LocationSensor coordinates and Destination coordinates are not in the same continent or isolated by bodies of water (OSR believes no on can walk on water) and announces a fault.

The StartLatitude/StartLongitude blocks which provide a dummy StartLocation (shown with a red arrow on the Blocks image) need to be greyed out when you use your LocationSensor coordinates. The dummy blocks are there so I can use them since I cannot create a track using my location for the Great Hall (but you can). Removing or greying out will allow you to run using your LocationSensor. Anyone wanting to see the demonstration should leave those blocks in (unless they live in Africa). Remove the two blocks when building a app using a LocationSensor.

I don't know if you want to place the polygons you showed of buildings using the FeatureCollection on the App Inventor map display. The polygons should be possible to show depending of the FeatureCollection file structure. You might be able to do that but I am dubious for multiple reasons.

Yes, you can add all of them in a single List You can use either a ListView or ListPicker with the building (parking lot) List. Both ListView and ListPicker have a feature called Filter which if enabled a user can 'search' for an item. For a large number of items a ListPicker might be a 'better' choice for selecting a Destination. Alternatively you could have two ListPickers; one for buildings another sourced from a different list of coordinates for parking lots etc. :wink:

Good luck with your Project.

Remember, you need to delete the Blocks shown with the red arrow so the start location will be from your device.

Thank you so much you have been of great help. l have created the following list l hope l did it correctly.

I will also take note to delete the blocks shown with the red arrow. Am working on the project currently hopefully tomorrow l will send a positive result

Yes, your Blocks look fine. It is simple for small Lists.

Here is a quick way for generating large lists:
This tutorial shows how to use a spreadsheet to generate a csv file . The csv file can be converted into your list.

Actually the whole block contains 62 blocks of the different buildings and their coordinates so l just sent you a sample so converting into a spread sheet to generate csv will be of great help

Confirm you disabled the textbox blocks?

I disabled them using TextBox Properties using the Designer.

The destination textBlocks only now function like a label to display Destination selected coordinates.
so they should be disabled in your app.

Actually, they are no longer needed. I think they can be deleted from the project although I haven't tested what happens when that is done, :cry:

Thank you. I think you forgot to attach the tutorial for generating large lists

sorry, the link is there now,

Thank you

Good day am facing the following challenges on my navigation application after following the basic simple navigation tutorial

  1. the open routing service is not found (l am using open routeservices)
  2. no satellite fix yet try again after a few seconds

Did you provide your ORS code? Are you connected by wifi or data?

Did you provide a LocationSensor component? Are you working inside a building and the LocationSensor has not yet determined a location change.

This is the code that elicits that response

Yes l provided the location sensor component. When am testing the application l go outside and am using internet
location

You did NOT copy the example blocks exactly. Make a change and try again.

I have seen my error thank you. The ones you have circled am l supposed to change the values.
As for my buildings data l used Qgis to take the centroids coordinates of the buildings so as to address the issues of the multiple coordinates and then converted to a csv thus my data is now as follows
datacorrected

yes l included the ORS

No, do not change the two 0's . They are there to determine if the LocationSensor has made a location change determination. The default coordinates are 0,0 before the satellite fix occurs.

okay let me try again

1 Like