So, i have a project about tracking location, get the latitude and longitude value. Sometimes i have to manually update the Data for a some reason.
- Insert the new Lat and Long in the TextField
- UPDATE (BUTTON)
- Lat & Long Updated
- MAP Updated
here is my Preview :
- [TextField1] ... Latitude Value ...
- [TextField2] ... Longitude Value ...
- [GMAP]
How can I get live update the MAP as i finish type the Lat & Long in the TextField? To confirm the Location's right accuracy.
any help is appreciated
I've tried this Action listener for a JTextField to change value in another textfield but i'm not quite understand.
if (salesman.getLatitude() != null && salesman.getLongitude() != null) {
latLng = new GLatLng(salesman.getLatitude(), salesman.getLongitude());
latLng = new GLatLng(-7.2587324, 112.7539422);
}
map = new GMap("map", ConstantUtils.googleMapApiKey);
map.setStreetViewControlEnabled(false);
map.setScaleControlEnabled(true);
map.setScrollWheelZoomEnabled(true);
map.setCenter(latLng);
map.setZoom(17);
map.setOutputMarkupId(true);
if (salesman.getLatitude() != null && salesman.getLongitude() != null) {
GMarkerOptions gMarkerOptions = new GMarkerOptions(map, latLng);
GMarker marker = new GMarker(gMarkerOptions);
map.addOverlay(marker);
}