1 | package org.mapsforge.android.maps;
|
---|
2 |
|
---|
3 | import org.mapsforge.android.maps.overlay.OverlayItem;
|
---|
4 | import org.mapsforge.core.GeoPoint;
|
---|
5 |
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * An OverlayTextAudioItem holds all parameters of a single element (capable of displaying text
|
---|
9 | * and/or audio in {@link ItemizedOverlay}. If the item has not raw audio file, then it will use
|
---|
10 | * Text-To-Speech (TTS) to synthesize the audio
|
---|
11 | */
|
---|
12 | public class OverlayTextAudioItem extends OverlayItem
|
---|
13 | {
|
---|
14 | protected final String ttsTitle;
|
---|
15 | protected final String ttsSnippet;
|
---|
16 | protected final String audioFile;
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * Constructs a new OverlayTextAduioItem.
|
---|
20 | *
|
---|
21 | * @param point
|
---|
22 | * the geographical position of the item.
|
---|
23 | * @param title
|
---|
24 | * the title of the item.
|
---|
25 | * @param snippet
|
---|
26 | * the short description of the item.
|
---|
27 | * @param tts_snippet
|
---|
28 | * optinal phonetically based version of the short description; can be null in
|
---|
29 | * which case the text in snippet is used.
|
---|
30 | * @param audio
|
---|
31 | * the audio file to use
|
---|
32 | */
|
---|
33 | public OverlayTextAudioItem(GeoPoint point, String title, String ttsTitle, String snippet, String ttsSnippet,
|
---|
34 | String audio)
|
---|
35 | {
|
---|
36 | super(point,title,snippet);
|
---|
37 | this.ttsSnippet = (ttsSnippet != null) ? ttsSnippet : snippet;
|
---|
38 | this.ttsTitle = (ttsTitle != null) ? ttsTitle : title;
|
---|
39 | this.audioFile = audio;
|
---|
40 | }
|
---|
41 |
|
---|
42 | /**
|
---|
43 | * Constructs a new OverlayTextAudioItem.
|
---|
44 | *
|
---|
45 | * @param point
|
---|
46 | * the geographical position of the item.
|
---|
47 | * @param title
|
---|
48 | * the title of the item.
|
---|
49 | * @param snippet
|
---|
50 | * the short description of the item.
|
---|
51 | */
|
---|
52 | public OverlayTextAudioItem(GeoPoint point, String title, String ttsTitle, String snippet, String ttsSnippet)
|
---|
53 | {
|
---|
54 | super(point,title,snippet);
|
---|
55 | this.ttsSnippet = (ttsSnippet != null) ? ttsSnippet : snippet;
|
---|
56 | this.ttsTitle = (ttsTitle != null) ? ttsTitle : title;
|
---|
57 | this.audioFile = null;
|
---|
58 | }
|
---|
59 |
|
---|
60 | public String getTTSSnippet()
|
---|
61 | {
|
---|
62 | return ttsSnippet;
|
---|
63 | }
|
---|
64 |
|
---|
65 | public String getTTSTitle()
|
---|
66 | {
|
---|
67 | return ttsTitle;
|
---|
68 | }
|
---|
69 | }
|
---|
70 |
|
---|