public void addMarker(GeoPoint point) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); Date date = new Date(); mMarkerOverlay.addItem(point, "marker" + dateFormat.format(date), "snippet"); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString(MAP_POINTS, getMarkerJson()); editor.commit(); }
public String getMarkerJson() { return mMarkerOverlay.getJSON(); }