Skip to content

Commit

Permalink
Issue #5 : Added some points
Browse files Browse the repository at this point in the history
Issue #6 : added new marker image
  • Loading branch information
AlvaroTG17 committed Mar 10, 2024
1 parent 1e0ddcf commit 3d8f699
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 5 deletions.
15 changes: 14 additions & 1 deletion .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added app/src/main/ic_marker-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ class OpenStreetMap : AppCompatActivity() {
GeoPoint(40.38956358584258, -3.629046081389352), // Teleco
GeoPoint(40.38992125672989, -3.6281366497769714), // ETSISI
GeoPoint(40.39037466191718, -3.6270256763598447), // Library
GeoPoint(40.389855884803005, -3.626782180787362) // CITSEM
GeoPoint(40.389855884803005, -3.626782180787362), // CITSEM
GeoPoint(40.37192552382719, -3.5917083345440353), //La Gavia DUNKIN
GeoPoint(40.395484086123915, -3.687844694066538), // Bite Me Cafe Arganzuela
GeoPoint(40.3926706041883, -3.7076844647927683), // DUNKIN Plaza Rio
)
val gymkhanaNames = listOf(
"Tennis",
Expand All @@ -45,7 +48,10 @@ class OpenStreetMap : AppCompatActivity() {
"Telecommunications school",
"ETSISI",
"Library",
"CITSEM"
"CITSEM",
"Gavia",
"Arganzuela",
"Plaza Rio"
)

@SuppressLint("MissingInflatedId")
Expand Down Expand Up @@ -116,7 +122,7 @@ class OpenStreetMap : AppCompatActivity() {
marker.position = location
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM)
marker.title = "Marker at ${locationsNames.get(locationsCoords.indexOf(location))} ${location.latitude}, ${location.longitude}"
marker.icon = ContextCompat.getDrawable(this, R.drawable.ic_m3_chip_checked_circle)
marker.icon = ContextCompat.getDrawable(this, R.mipmap.ic_marker_foreground)
mapView.overlays.add(marker)
}
mapView.invalidate() // Refresh the map to display the new markers
Expand All @@ -137,7 +143,7 @@ class OpenStreetMap : AppCompatActivity() {
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM)
val locationIndex = locationsCoords.indexOf(location)
marker.title = "Marker at ${locationsNames[locationIndex]} ${location.latitude}, ${location.longitude}"
marker.icon = ContextCompat.getDrawable(this, org.osmdroid.library.R.drawable.ic_menu_compass)
marker.icon = ContextCompat.getDrawable(this, R.mipmap.ic_marker_foreground)
mapView.overlays.add(marker)
}
mapView.invalidate()
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_marker.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_marker_background"/>
<foreground android:drawable="@mipmap/ic_marker_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_marker_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_marker_background"/>
<foreground android:drawable="@mipmap/ic_marker_foreground"/>
</adaptive-icon>
Binary file added app/src/main/res/mipmap-hdpi/ic_marker.webp
Binary file not shown.
Binary file not shown.
Binary file added app/src/main/res/mipmap-hdpi/ic_marker_round.webp
Binary file not shown.
Binary file added app/src/main/res/mipmap-mdpi/ic_marker.webp
Binary file not shown.
Binary file not shown.
Binary file added app/src/main/res/mipmap-mdpi/ic_marker_round.webp
Binary file not shown.
Binary file added app/src/main/res/mipmap-xhdpi/ic_marker.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_marker.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_marker.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3d8f699

Please sign in to comment.