Check out the Spoken English Course. Free Course with Free Certificate
Example of Map API in Android Application
In this video we are going to see example of Map API in Android application.
First of all we will open module settings by pressing f12 key from our keyboard. And after that we will add maps library.
After that we will design the layout, an automatic fragment will be created inside which a map will be displayed. When we open its main activity file, we will see a default code is generated there.
Inside it we will set our local longitude and latitude codes,
LatLng adi=new LatLng(23.038112,72.546602);
These are the codes for Gujarat University Ahmedabad.
By doing this the marker of our application when loaded, will launch on Gujarat University Ahmedabad's location.
We just need to make one simple move before running our code, go to command prompt and write 'telnet localhost 5554' and launch it, where 5554 is emulator code. This is to provide internet to our emulator.
When we run our code, it runs successfully as we needed.
Have a friend to whom you would want to share this course?