Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ dependencies {
implementation ("com.google.android.gms:play-services-maps:18.2.0")
implementation ("com.google.android.gms:play-services-location:21.0.1")
implementation ("com.google.android.libraries.places:places:3.3.0")
implementation("com.google.firebase:firebase-firestore:24.10.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

}
}
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:value="@string/api_key" />

<activity
android:name=".MainActivity"
android:name=".MapFragment"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -43,4 +43,4 @@
</activity>
</application>

</manifest>
</manifest>

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions app/src/main/java/com/example/map/Report.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.example.map;

import com.google.firebase.Timestamp;
import com.google.firebase.firestore.GeoPoint;

public class Report {
private String desc;
private GeoPoint location;
private Timestamp timestamp;
private String user;

// Constructor, getters, and setters

public Report() {
// Default constructor required for Firestore
}

public String getDesc() {
return desc;
}

public GeoPoint getLocation() {
return location;
}

public Timestamp getTimestamp() {
return timestamp;
}

public String getUser() {
return user;
}
}
Binary file added app/src/main/res/drawable/ic_purple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions app/src/main/res/layout/custom_info_window.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Loclat"
android:textStyle="bold"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/LocLong"
android:textStyle="bold"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/go"
android:textStyle="bold"
android:layout_marginTop="10dp"
android:text="CLICK TO GO LOCATION"/>
<!-- Add more views here if needed -->
</LinearLayout>
</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/autocomplete_fragment_container"
tools:context=".MainActivity" />
android:layout_marginTop="4dp"
tools:context=".MapFragment" />

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
Expand All @@ -23,43 +24,45 @@

<!-- ImageButton for Legend -->

<!-- Button Under Legend -->

<ImageButton
android:id="@+id/legendButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:layout_alignParentEnd="true"
android:layout_marginTop="78dp"
android:layout_marginEnd="353dp"
android:layout_marginTop="90dp"
android:layout_marginEnd="351dp"
android:src="@android:drawable/ic_info" />

<!-- Button Under Legend -->

<ImageButton
android:id="@+id/btnPolice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/legendButton"
android:layout_alignParentEnd="true"
android:layout_marginTop="21dp"
android:layout_marginEnd="353dp"
android:layout_marginTop="19dp"
android:layout_marginEnd="351dp"
android:src="@drawable/ic_police" />

<ImageButton
android:id="@+id/btnHospital"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/btnPolice"
android:layout_alignParentEnd="true"
android:layout_marginTop="21dp"
android:layout_marginTop="19dp"
android:layout_marginEnd="353dp"
android:src="@drawable/ic_hospital" />

<ImageButton
android:id="@+id/btnFireDepartment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/btnHospital"
android:layout_alignParentEnd="true"
android:layout_marginTop="21dp"
android:layout_marginTop="19dp"
android:layout_marginEnd="353dp"
android:src="@drawable/ic_fire_department" />

Expand Down Expand Up @@ -104,7 +107,7 @@
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/green_icon" /> <!-- Replace with your icon -->
android:src="@drawable/red" /> <!-- Replace with your icon -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -119,11 +122,11 @@
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/red" /> <!-- Replace with your icon -->
android:src="@drawable/ic_purple" /> <!-- Replace with your icon -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Violent Crime"
android:text="Reported Crime"
android:paddingLeft="4dp"/>
</LinearLayout>
<LinearLayout
Expand All @@ -138,10 +141,39 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Property Crime"
android:text="Police"
android:paddingLeft="4dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/green_icon" /> <!-- Replace with your icon -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hospital"
android:paddingLeft="4dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/orange" /> <!-- Replace with your icon -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fire Station"
android:paddingLeft="4dp"/>
</LinearLayout>
<!-- Add more blocks for other marker types -->
</LinearLayout>

Expand Down