aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-17 01:11:04 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-17 01:11:04 -0600
commitc8d423b0933b21c9e16475f9bf89160fc8861825 (patch)
tree250cb5ebda41c42ec8ca0e89d3623b14b117f021
parent70d21d0dab61fc2b30f64721279b27a2c8a01d7a (diff)
downloadetbsa-trackermap-mobile-c8d423b0933b21c9e16475f9bf89160fc8861825.tar.gz
etbsa-trackermap-mobile-c8d423b0933b21c9e16475f9bf89160fc8861825.tar.bz2
etbsa-trackermap-mobile-c8d423b0933b21c9e16475f9bf89160fc8861825.zip
Branded merge
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt3
-rw-r--r--androidApp/src/main/res/menu/map_layers.xml8
-rw-r--r--androidApp/src/main/res/values-es-rMX/map_layers.xml4
-rw-r--r--androidApp/src/main/res/values/map_layers.xml5
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/MapLayer.kt17
5 files changed, 23 insertions, 14 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt
index e9b9010..475575e 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt
@@ -96,7 +96,8 @@ class UnitsActivity : AppCompatActivity() {
popOver.setOnMenuItemClickListener { item ->
val layer = when (item.itemId) {
R.id.layerStreets -> MapLayer.Type.STREETS
- R.id.layerSatellite -> MapLayer.Type.SATELLITE
+ R.id.layerGmapsStreets -> MapLayer.Type.GMAPS_STREETS
+ R.id.layerGmapsSatellite -> MapLayer.Type.GMAPS_SATELLITE
else -> MapLayer.Type.STREETS
}
unitsViewModel.setMapLayerType(layer)
diff --git a/androidApp/src/main/res/menu/map_layers.xml b/androidApp/src/main/res/menu/map_layers.xml
index 46165da..db0a813 100644
--- a/androidApp/src/main/res/menu/map_layers.xml
+++ b/androidApp/src/main/res/menu/map_layers.xml
@@ -7,11 +7,11 @@
android:title="@string/layer_streets"/>
<item
- android:id="@+id/layerGmaps"
- android:title="@string/layer_gmaps"/>
+ android:id="@+id/layerGmapsStreets"
+ android:title="@string/layer_gmaps_streets"/>
<item
- android:id="@+id/layerSatellite"
- android:title="@string/layer_satellite"/>
+ android:id="@+id/layerGmapsSatellite"
+ android:title="@string/layer_gmaps_satellite"/>
</menu> \ No newline at end of file
diff --git a/androidApp/src/main/res/values-es-rMX/map_layers.xml b/androidApp/src/main/res/values-es-rMX/map_layers.xml
index ef56b76..8afadc4 100644
--- a/androidApp/src/main/res/values-es-rMX/map_layers.xml
+++ b/androidApp/src/main/res/values-es-rMX/map_layers.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="layer_streets">OpenStreetMap</string>
- <string name="layer_gmaps">Google Calles</string>
- <string name="layer_satellite">Google Satélite</string>
+ <string name="layer_gmaps_streets">Google Calles</string>
+ <string name="layer_gmaps_satellite">Google Satélite</string>
</resources> \ No newline at end of file
diff --git a/androidApp/src/main/res/values/map_layers.xml b/androidApp/src/main/res/values/map_layers.xml
index 034f3e5..50e1a7c 100644
--- a/androidApp/src/main/res/values/map_layers.xml
+++ b/androidApp/src/main/res/values/map_layers.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="layer_streets">Streets</string>
- <string name="layer_satellite">Satellite</string>
+ <string name="layer_streets">OpenStreetMap</string>
+ <string name="layer_gmaps_streets">Google Streets</string>
+ <string name="layer_gmaps_satellite">Google Satellite</string>
</resources> \ No newline at end of file
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/MapLayer.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/MapLayer.kt
index ff0489e..4a48952 100644
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/MapLayer.kt
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/MapLayer.kt
@@ -8,7 +8,8 @@ data class MapLayer(
) {
enum class Type {
STREETS,
- SATELLITE
+ GMAPS_STREETS,
+ GMAPS_SATELLITE
}
companion object {
@@ -19,11 +20,17 @@ data class MapLayer(
maxZoom = 23,
attribution = "&#169; OpenStreetMap France | &#169; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors"
),
- Type.SATELLITE to MapLayer(
- url = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
+ Type.GMAPS_STREETS to MapLayer(
+ url = "https://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}&s=Ga",
minZoom = 1,
- maxZoom = 20,
- attribution = "Tiles &#169; Esri &#8212; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
+ maxZoom = 23,
+ attribution = "&#169; Google"
+ ),
+ Type.GMAPS_SATELLITE to MapLayer(
+ url = "https://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga",
+ minZoom = 1,
+ maxZoom = 23,
+ attribution = "&#169; Google"
)
)