[ADD]Locations from JSON now in app. Markers good color. No action bar.

This commit is contained in:
Robin Koedood
2020-12-17 14:45:58 +01:00
parent 9c4eb98fb4
commit 1ca13e3a6b
5 changed files with 36 additions and 29 deletions

View File

@@ -1,133 +1,134 @@
[ [
{ {
"name":"McDonald's Breda Karnemelkstraat", "name":"McDonald's Breda Karnemelkstraat",
"coordinates":"51.586106,4.775444", "coordinates":"51.58596318905295,4.77586651481887",
"description":"McDonald's restaurant", "description":"McDonald's restaurant",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Subway Karnemelkstraat 10 A, 1", "name":"Subway Karnemelkstraat 10 A, 1",
"coordinates":"60.2101387,24.7109503", "coordinates":"51.58632782568612,4.775219531501114",
"description":"4811 KJ Breda", "description":"4811 KJ Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Wok To Go Halstraat 40", "name":"Wok To Go Halstraat 40",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.58650312572897,4.777467069592386",
"description":"4811HX Breda", "description":"4811HX Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"De Boterhal Grote Markt 19", "name":"De Boterhal Grote Markt 19",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.588069667604756,4.7762685632180695",
"description":"4811XL Breda", "description":"4811XL Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Gauchos Grote Markt 33", "name":"Gauchos Grote Markt 33",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.58859328857082,4.77601349563689",
"description":"4811XP Breda", "description":"4811XP Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"The Tosti Club Breda A4, Vlaszak 2", "name":"The Tosti Club Breda A4, Vlaszak 2",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.58905632735254,4.780729463841719",
"description":"4811GR Breda", "description":"4811GR Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Coffee & Lunch 4 you Oude Vest 31", "name":"Coffee & Lunch 4 you Oude Vest 31",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.58741730235298,4.779832967540571",
"description":"4811HS Breda", "description":"4811HS Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"t Zusje Breda Vismarktstraat 28", "name":"t Zusje Breda Vismarktstraat 28",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.590133292554434,4.773911506170458",
"description":"4811WE Breda", "description":"4811WE Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"VR-World Nassaustraat 2", "name":"VR-World Nassaustraat 2",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.5913566342086,4.786256804321071",
"description":"4811DD Breda", "description":"4811DD Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Kees Kroket Houtmarkt 9", "name":"Kees Kroket Houtmarkt 9",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.58647180329833,4.77741809637617",
"description":"KEEEEES KROKET!", "description":"KEEEEES KROKET!",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Prison Escape Kloosterlaan 168", "name":"Prison Escape Kloosterlaan 168",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.59073795635181,4.784917104321059",
"description":"4811EE Breda", "description":"4811EE Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"De Koepel - FutureDome Events Nassausingel 26", "name":"De Koepel - FutureDome Events Nassausingel 26",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.590431588532105,4.786756741648511",
"description":"4811HP Breda", "description":"4811HP Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Escaping Breda: Escape Room Games Boschstraat 114", "name":"Escaping Breda: Escape Room Games Boschstraat 114",
"coordinates":" 51.5887845,4.7760237", "coordinates":" 51.59110835530862,4.784147222780912",
"description":"4811GK Breda", "description":"4811GK Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"MEZZ Breda Keizerstraat 101", "name":"MEZZ Breda Keizerstraat 101",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.58394697737321,4.779757901349616",
"description":"4811HL Breda", "description":"4811HL Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Het Klooster Breda Schorsmolenstraat 13", "name":"Het Klooster Breda Schorsmolenstraat 13",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.58775443759389,4.765568874365066",
"description":"4811VN Breda", "description":"4811VN Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Beach & Lounge club Spider “rooftop bar” Nieuwe Prinsenkade", "name":"Beach & Lounge club Spider “rooftop bar” Nieuwe Prinsenkade",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.59212977605884,4.774043765582372",
"description":"4811VC Breda", "description":"4811VC Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Koningin Wilhelmina Paviljoen Kraanstraat 4b", "name":"Koningin Wilhelmina Paviljoen Kraanstraat 4b",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.590645369292396,4.776045124415531",
"description":"4811XV Breda", "description":"4811XV Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Hercules en de Nemeïsche leeuw", "name":"Hercules en de Nemeïsche leeuw",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.59130522182325,4.778161739135078",
"description":"4811XJ Breda", "description":"4811XJ Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Nassau-Baroniemonument - 1905 - Pierre Cuypers Delpratsingel 1", "name":"Nassau-Baroniemonument - 1905 - Pierre Cuypers Delpratsingel 1",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.592530636759136,4.780278353833301",
"description":"4811AM Breda", "description":"4811AM Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Station Breda Gravinnen van Nassauboulevard 43", "name":"Station Breda Gravinnen van Nassauboulevard 43",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.59569850758307,4.780295549958155",
"description":"4815CA Breda", "description":"4815CA Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"Belcrum Beach Veilingkade 12a", "name":"Belcrum Beach Veilingkade 12a",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.599434239284726,4.76632797992092",
"description":"4815HC Breda", "description":"4815HC Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
}, },
{ {
"name":"De Belcrum Watertoren (1935) Speelhuislaan 158", "name":"De Belcrum Watertoren (1935) Speelhuislaan 158",
"coordinates":"51.5887845,4.7760237", "coordinates":"51.60135351009892,4.7705765989322755",
"description":"4815CJ Breda", "description":"4815CJ Breda",
"imageUrl":"NULL" "imageUrl":"NULL"
} }

View File

@@ -97,11 +97,17 @@ public class HomeFragment extends Fragment {
mLocationOverlay.enableMyLocation(); mLocationOverlay.enableMyLocation();
mapView.getOverlays().add(mLocationOverlay); mapView.getOverlays().add(mLocationOverlay);
CustomOverlay customOverlay = new CustomOverlay(getResources().getDrawable(R.drawable.common_google_signin_btn_icon_dark),mapView); CustomOverlay customOverlay = new CustomOverlay(getResources().getDrawable(R.drawable.ic_baseline_location_on_24),mapView);
GeoPoint p = new GeoPoint(51.49635644532748, 4.2862774306334686);
OverlayItem overlayItem = new OverlayItem("willys","doner",p); for (com.a1.nextlocation.data.Location l : LocationListManager.INSTANCE.getLocationList()) {
GeoPoint p = new GeoPoint(l.getLat(), l.getLong());
OverlayItem overlayItem = new OverlayItem(l.getName(),l.getDescription(), p);
customOverlay.addOverlayItem(overlayItem);
Log.d(TAG, "initMap: " + "succes");
}
customOverlay.addOverlayItem(overlayItem);
mapView.getOverlays().add(customOverlay); mapView.getOverlays().add(customOverlay);

View File

@@ -5,6 +5,6 @@
android:viewportHeight="24" android:viewportHeight="24"
android:tint="?attr/colorControlNormal"> android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@android:color/white" android:fillColor="@color/primaryColour"
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/> android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/>
</vector> </vector>

View File

@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item> <item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/purple_700</item>

View File

@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/primaryColour</item> <item name="colorPrimary">@color/primaryColour</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->