0

I'm actually working on a project that will involve a Web-App (Ionic framework, pretty new for me..) that will do that:

  1. Posting data to a mySQL DB via an Arduino GPS Tracker (already done, hosted on 000webhost)

  2. Building a Web-App, that will fetch those data, and display them on a map(of course using the Google maps APIs)

  3. Possibly, draw a "daily trip" list, that will show always on a map the route made for each day (the idea here is to 'connect' each marker stored on the db)

Is there any hint on how to correctly fetch those mySQL data in Ionic? Plus, as I've already hosted a some php code in order to check if the Arduino was correctly posting, how can I test the web-app?

2
  • What framework are you using with Ionic? Angular? React? Vue? Commented Aug 2, 2021 at 23:23
  • @Super_Simon actually I would like to use angular as framework Commented Aug 3, 2021 at 7:51

1 Answer 1

1

So first and foremost, you'll need to create an API for your MySQL. You said you've already built a small PHP application so that's a good start.

Maybe take a look at PHP frameworks such as Laravel if you'd like to use something a bit more functional. Of course, you could stick with the pure PHP route if you'd prefer.

Secondly, you need to look at how Angular works with making HTTP requests. It's reasonably straightforward but far too long to provide a comprehensive answer here.

There are some key areas you should look at:

There is an abundance of Ionic Angular tutorials online which will give you a visual starter on how to implement them but it's good to have a read first to ascertain some understanding.

When it comes to testing, try using an API testing tool such as Postman which will give you an overall understanding of the API request you are making and it's responses and/or errors.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the hints! I've already started workin on it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.