mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-19 07:37:31 +01:00
Merge pull request #3 from ThibG/master
Allow clicking/tapping on the map.
This commit is contained in:
commit
975ff9bd69
@ -87,21 +87,24 @@ public class GoogleMapImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void prepareMapView() {
|
private void prepareMapView() {
|
||||||
mapView.setOnClickListener(new View.OnClickListener() {
|
mapView.getOverlays().add(new com.google.android.maps.Overlay() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public boolean onTap(com.google.android.maps.GeoPoint p, MapView mapView)
|
||||||
|
{
|
||||||
Log.d(TAG, "onClick");
|
Log.d(TAG, "onClick");
|
||||||
IOnMapClickListener listener = mapClickListener;
|
IOnMapClickListener listener = mapClickListener;
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
try {
|
try {
|
||||||
// TODO: Handle LatLng right
|
listener.onMapClick(new LatLng(p));
|
||||||
listener.onMapClick(new LatLng(0, 0));
|
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, e);
|
Log.w(TAG, e);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// TODO: this is actually never called
|
||||||
mapView.setOnLongClickListener(new View.OnLongClickListener() {
|
mapView.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user