Android code to display a location picker. The user can select a point on the map, and the code returns the latitude and longitude value, and the name of the place according to Google Map.
(For the time being this project works as a wrapper for the jQuery latitude and longitude picker project. Read about it more: github.com/wimagguc/jquery-latitude-longitude-picker-gmaps)
Simply create an Android project and add the following files:
- com/wimagguc/locationpicker/LocationPickerActivity.java
- assets/locationPicker/*
- res/layout/activity_location_picker.xml
- res/menu/location_picker.xml
- res/drawable-*
Then modify the AndroidManifest.xml to include this activity:
<application>
<activity
android:name="com.wimagguc.locationpicker.LocationPickerActivity"
android:uiOptions="splitActionBarWhenNarrow" />
</application>
See cubi/rafi/locationpickertest/MainActivity
for exmaple usage.
The app is should work on any Android device with API level 11+. To use it in API 8+, use Actionbar Sherlock/Appcompat and modify files accordingly (for example, replace Activity
with SherlockActivity
, fix Menu
and MenuItem
imports etc.).
Do with the code whatever you please.
This code uses the jQuery Javascript library and the Google Maps API. To read more about these, go to: jquery.com/ and developers.google.com/maps/
- Dive Log Android app
(If you are using this code for another project, please add it here - or just let me know and it will be featured here.)
Richard Dancsi (www.wimagguc.com)
- twitter: @wimagguc
- linkedin: linkedin.com/in/richarddancsi
- gplus: plus.google.com/u/0/115939246085616544919
Rafi Kamal (rafi-kamal.com)
- linkedin: linkedin.com/in/rafikamal
- gplus: plus.google.com/+RafiKamal