I would like to know how can I get the city name by using geolocation API.
I can see something explained here:
But I can't turn it into Titanium Code :)
If you are talking about taking your GPS location and getting a city, address, etc. from it, the Kitchen Sink sample project has an example already. Check out geolocation.js the functionality exists within Titanium.Geolocation.reverseGeocoder. You may want to look at google only to better understand the places object that is returned, but Titanium should do the rest.