Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 8673ac8

Browse files
author
Langston Smith
authored
Adding line background highlight example (#845)
* adding example * switch to true * onDestroy tweak
1 parent 87a4241 commit 8673ac8

File tree

8 files changed

+477
-0
lines changed

8 files changed

+477
-0
lines changed

MapboxAndroidDemo/src/main/AndroidManifest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@
220220
android:name="android.support.PARENT_ACTIVITY"
221221
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
222222
</activity>
223+
<activity
224+
android:name=".examples.query.HighlightedLineActivity"
225+
android:label="@string/activity_query_highlighted_line_title">
226+
<meta-data
227+
android:name="android.support.PARENT_ACTIVITY"
228+
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
229+
</activity>
223230
<activity
224231
android:name=".examples.annotations.AnimatedMarkerActivity"
225232
android:label="@string/activity_annotation_animated_marker_title">
Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
{
2+
"features": [
3+
{
4+
"type": "Feature",
5+
"properties": {},
6+
"geometry": {
7+
"coordinates": [
8+
[
9+
4.356449,
10+
50.844999
11+
],
12+
[
13+
4.356539,
14+
50.845442
15+
],
16+
[
17+
4.356492,
18+
50.845477
19+
],
20+
[
21+
4.356373,
22+
50.845477
23+
],
24+
[
25+
4.35633,
26+
50.845453
27+
],
28+
[
29+
4.356258,
30+
50.845095
31+
],
32+
[
33+
4.355563,
34+
50.845649
35+
],
36+
[
37+
4.354784,
38+
50.846126
39+
],
40+
[
41+
4.354728,
42+
50.846287
43+
],
44+
[
45+
4.355027,
46+
50.846411
47+
],
48+
[
49+
4.35512,
50+
50.846534
51+
],
52+
[
53+
4.355082,
54+
50.846696
55+
],
56+
[
57+
4.355116,
58+
50.846865
59+
],
60+
[
61+
4.356062,
62+
50.847193
63+
],
64+
[
65+
4.357178,
66+
50.847733
67+
]
68+
],
69+
"type": "LineString"
70+
},
71+
"id": "329d7852bb9ad9fcb8f1e11d85a2d8a0"
72+
},
73+
{
74+
"type": "Feature",
75+
"properties": {},
76+
"geometry": {
77+
"coordinates": [
78+
[
79+
4.357398,
80+
50.845249
81+
],
82+
[
83+
4.355574,
84+
50.844016
85+
],
86+
[
87+
4.35537,
88+
50.844002
89+
],
90+
[
91+
4.355006,
92+
50.84386
93+
],
94+
[
95+
4.353117,
96+
50.84294
97+
],
98+
[
99+
4.352503,
100+
50.842717
101+
]
102+
],
103+
"type": "LineString"
104+
},
105+
"id": "7dcbb630a382c2a9edc7c306c9664cef"
106+
},
107+
{
108+
"type": "Feature",
109+
"properties": {},
110+
"geometry": {
111+
"coordinates": [
112+
[
113+
4.357861,
114+
50.845599
115+
],
116+
[
117+
4.357989,
118+
50.845685
119+
],
120+
[
121+
4.358222,
122+
50.845844
123+
],
124+
[
125+
4.358296,
126+
50.845896
127+
],
128+
[
129+
4.358435,
130+
50.846013
131+
],
132+
[
133+
4.358625,
134+
50.845979
135+
],
136+
[
137+
4.358689,
138+
50.845964
139+
],
140+
[
141+
4.358746,
142+
50.845939
143+
],
144+
[
145+
4.358815,
146+
50.845909
147+
],
148+
[
149+
4.358881,
150+
50.845868
151+
],
152+
[
153+
4.359008,
154+
50.845784
155+
],
156+
[
157+
4.359241,
158+
50.845588
159+
],
160+
[
161+
4.359336,
162+
50.84547
163+
],
164+
[
165+
4.35942,
166+
50.845371
167+
],
168+
[
169+
4.35945,
170+
50.845336
171+
],
172+
[
173+
4.359519,
174+
50.845153
175+
],
176+
[
177+
4.359557,
178+
50.845055
179+
],
180+
[
181+
4.359559,
182+
50.844863
183+
],
184+
[
185+
4.359522,
186+
50.844711
187+
],
188+
[
189+
4.3594,
190+
50.844451
191+
],
192+
[
193+
4.359267,
194+
50.844287
195+
],
196+
[
197+
4.359102,
198+
50.844145
199+
],
200+
[
201+
4.358636,
202+
50.84374
203+
],
204+
[
205+
4.358332,
206+
50.843454
207+
],
208+
[
209+
4.358353,
210+
50.843122
211+
],
212+
[
213+
4.358578,
214+
50.842851
215+
],
216+
[
217+
4.359179,
218+
50.842478
219+
],
220+
[
221+
4.359061,
222+
50.842343
223+
],
224+
[
225+
4.358954,
226+
50.842268
227+
],
228+
[
229+
4.358911,
230+
50.842072
231+
],
232+
[
233+
4.358868,
234+
50.841909
235+
],
236+
[
237+
4.35315,
238+
50.83783
239+
]
240+
],
241+
"type": "LineString"
242+
},
243+
"id": "9a852f0d5067dac25217bace83a54d1e"
244+
}
245+
],
246+
"type": "FeatureCollection"
247+
}

MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/MainActivity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
import com.mapbox.mapboxandroiddemo.examples.query.BuildingOutlineActivity;
9292
import com.mapbox.mapboxandroiddemo.examples.query.ClickOnLayerActivity;
9393
import com.mapbox.mapboxandroiddemo.examples.query.FeatureCountActivity;
94+
import com.mapbox.mapboxandroiddemo.examples.query.HighlightedLineActivity;
9495
import com.mapbox.mapboxandroiddemo.examples.query.QueryFeatureActivity;
9596
import com.mapbox.mapboxandroiddemo.examples.query.RedoSearchInAreaActivity;
9697
import com.mapbox.mapboxandroiddemo.examples.query.SelectBuildingActivity;
@@ -582,6 +583,12 @@ private void listItems(int id) {
582583
new Intent(MainActivity.this, BuildingOutlineActivity.class),
583584
R.string.activity_query_building_outline_url, false, BuildConfig.MIN_SDK_VERSION));
584585

586+
exampleItemModels.add(new ExampleItemModel(
587+
R.string.activity_query_highlighted_line_title,
588+
R.string.activity_query_highlighted_line_description,
589+
new Intent(MainActivity.this, HighlightedLineActivity.class),
590+
R.string.activity_query_highlighted_line_url, true, BuildConfig.MIN_SDK_VERSION));
591+
585592
currentCategory = R.id.nav_query_map;
586593
break;
587594
case R.id.nav_java_services:

0 commit comments

Comments
 (0)