Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/ActivityMap.java
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | public void makeMarker(GeoPoint geoPoint, String stopName, String ID, boolean isStartMarker) { | ||||
marker.setPosition(geoPoint); | marker.setPosition(geoPoint); | ||||
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM); | marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM); | ||||
// display the marker | // display the marker | ||||
map.getOverlays().add(marker); | map.getOverlays().add(marker); | ||||
// add to it an icon | // add to it an icon | ||||
marker.setIcon(getResources().getDrawable(R.drawable.bus_marker)); | marker.setIcon(getResources().getDrawable(R.drawable.bus_marker)); | ||||
// add to it a title | // add to it a title | ||||
marker.setTitle(stopName); | marker.setTitle(stopName); | ||||
// set the description as the ID | |||||
marker.setSnippet(ID); | |||||
// show popup info window of the searched marker | // show popup info window of the searched marker | ||||
if (isStartMarker) { | if (isStartMarker) { | ||||
marker.showInfoWindow(); | marker.showInfoWindow(); | ||||
} | } | ||||
} | } | ||||
Show All 36 Lines | public void onPause(){ | ||||
super.onPause(); | super.onPause(); | ||||
//this will refresh the osmdroid configuration on resuming. | //this will refresh the osmdroid configuration on resuming. | ||||
//if you make changes to the configuration, use | //if you make changes to the configuration, use | ||||
//SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); | //SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); | ||||
//Configuration.getInstance().save(this, prefs); | //Configuration.getInstance().save(this, prefs); | ||||
map.onPause(); //needed for compass, my location overlays, v6.0.0 and up | map.onPause(); //needed for compass, my location overlays, v6.0.0 and up | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register