expo-maps 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/android/build.gradle +6 -7
- package/android/src/main/java/expo/modules/maps/PropsData.kt +13 -13
- package/android/src/main/java/expo/modules/maps/googleMaps/GoogleMapsCallbacks.kt +4 -4
- package/android/src/main/java/expo/modules/maps/googleMaps/GoogleMapsCameraAnimations.kt +0 -1
- package/android/src/main/java/expo/modules/maps/googleMaps/GoogleMapsCircles.kt +4 -4
- package/android/src/main/java/expo/modules/maps/googleMaps/GoogleMapsUtils.kt +4 -4
- package/android/src/main/java/expo/modules/maps/googleMaps/GoogleMapsView.kt +1 -1
- package/ios/ExpoMaps.podspec +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.4.1 — 2024-01-24
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- Replace deprecated `com.facebook.react:react-native:+` Android dependency with `com.facebook.react:react-android`. ([#26237](https://github.com/expo/expo/pull/26237) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
## 0.4.0 — 2023-11-14
|
|
20
|
+
|
|
21
|
+
### 🛠 Breaking changes
|
|
22
|
+
|
|
23
|
+
- Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
24
|
+
- On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
|
|
25
|
+
|
|
13
26
|
## 0.3.0 — 2023-10-17
|
|
14
27
|
|
|
15
28
|
### 🛠 Breaking changes
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.
|
|
6
|
+
version = '0.4.1'
|
|
7
7
|
|
|
8
8
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
9
|
if (expoModulesCorePlugin.exists()) {
|
|
@@ -53,11 +53,11 @@ afterEvaluate {
|
|
|
53
53
|
android {
|
|
54
54
|
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
55
55
|
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
56
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
57
|
-
|
|
56
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
57
|
+
|
|
58
58
|
defaultConfig {
|
|
59
59
|
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
60
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
60
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
lintOptions {
|
|
@@ -80,7 +80,7 @@ android {
|
|
|
80
80
|
namespace "expo.modules.maps"
|
|
81
81
|
defaultConfig {
|
|
82
82
|
versionCode 1
|
|
83
|
-
versionName '0.
|
|
83
|
+
versionName '0.4.1'
|
|
84
84
|
}
|
|
85
85
|
publishing {
|
|
86
86
|
singleVariant("release") {
|
|
@@ -102,6 +102,5 @@ dependencies {
|
|
|
102
102
|
implementation "com.google.android.libraries.places:places:2.6.0"
|
|
103
103
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
104
104
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3"
|
|
105
|
-
|
|
106
|
-
implementation 'com.facebook.react:react-native:+'
|
|
105
|
+
implementation 'com.facebook.react:react-android'
|
|
107
106
|
}
|
|
@@ -9,7 +9,7 @@ enum class MapType(val value: String) {
|
|
|
9
9
|
Normal("normal"),
|
|
10
10
|
Hybrid("hybrid"),
|
|
11
11
|
Satellite("satellite"),
|
|
12
|
-
Terrain("terrain")
|
|
12
|
+
Terrain("terrain")
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
data class MarkerObject(
|
|
@@ -23,7 +23,7 @@ data class MarkerObject(
|
|
|
23
23
|
@Field val draggable: Boolean = false,
|
|
24
24
|
@Field val anchorU: Double? = null,
|
|
25
25
|
@Field val anchorV: Double? = null,
|
|
26
|
-
@Field val opacity: Double = 1.0
|
|
26
|
+
@Field val opacity: Double = 1.0
|
|
27
27
|
) : Record, ClusterItem {
|
|
28
28
|
|
|
29
29
|
override fun getPosition(): LatLng {
|
|
@@ -56,14 +56,14 @@ data class PolygonObject(
|
|
|
56
56
|
@Field val strokeColor: String?,
|
|
57
57
|
@Field val strokeWidth: Float?,
|
|
58
58
|
@Field val strokePattern: List<PatternItem>?,
|
|
59
|
-
@Field val jointType: Int
|
|
59
|
+
@Field val jointType: Int?
|
|
60
60
|
) : Record
|
|
61
61
|
|
|
62
62
|
data class CameraPosition(
|
|
63
63
|
@Field val latitude: Double = 0.0,
|
|
64
64
|
@Field val longitude: Double = 0.0,
|
|
65
65
|
@Field val zoom: Double = 0.0,
|
|
66
|
-
@Field val animate: Boolean = false
|
|
66
|
+
@Field val animate: Boolean = false
|
|
67
67
|
) : Record
|
|
68
68
|
|
|
69
69
|
data class PolylineObject(
|
|
@@ -72,29 +72,29 @@ data class PolylineObject(
|
|
|
72
72
|
@Field val width: Float?,
|
|
73
73
|
@Field val pattern: List<PatternItem>?,
|
|
74
74
|
@Field val jointType: Joint?,
|
|
75
|
-
@Field val capType: Cap
|
|
75
|
+
@Field val capType: Cap?
|
|
76
76
|
) : Record
|
|
77
77
|
|
|
78
78
|
data class PatternItem(
|
|
79
79
|
@Field val type: PatternItemType,
|
|
80
|
-
@Field val length: Float
|
|
80
|
+
@Field val length: Float
|
|
81
81
|
) : Record
|
|
82
82
|
|
|
83
83
|
enum class PatternItemType(val value: String) {
|
|
84
84
|
Stroke("stroke"),
|
|
85
|
-
Gap("gap")
|
|
85
|
+
Gap("gap")
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
enum class Joint(val value: String) {
|
|
89
89
|
Bevel("bevel"),
|
|
90
90
|
Miter("miter"),
|
|
91
|
-
Round("round")
|
|
91
|
+
Round("round")
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
enum class Cap(val value: String) {
|
|
95
95
|
Butt("butt"),
|
|
96
96
|
Round("round"),
|
|
97
|
-
Square("square")
|
|
97
|
+
Square("square")
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
data class CircleObject(
|
|
@@ -102,7 +102,7 @@ data class CircleObject(
|
|
|
102
102
|
@Field val radius: Double,
|
|
103
103
|
@Field val strokeColor: String?,
|
|
104
104
|
@Field val strokeWidth: Float?,
|
|
105
|
-
@Field val fillColor: String
|
|
105
|
+
@Field val fillColor: String?
|
|
106
106
|
) : Record
|
|
107
107
|
|
|
108
108
|
data class ClusterObject(
|
|
@@ -114,7 +114,7 @@ data class ClusterObject(
|
|
|
114
114
|
@Field val icon: String? = null,
|
|
115
115
|
@Field val color: String? = null,
|
|
116
116
|
@Field val opacity: Double = 1.0,
|
|
117
|
-
@Field val markers: List<MarkerObject> = emptyList()
|
|
117
|
+
@Field val markers: List<MarkerObject> = emptyList()
|
|
118
118
|
) : Record
|
|
119
119
|
|
|
120
120
|
data class KMLObject(@Field val filePath: String) : Record
|
|
@@ -161,12 +161,12 @@ data class Bounds(
|
|
|
161
161
|
|
|
162
162
|
data class Gradient(
|
|
163
163
|
@Field val colors: List<String> = emptyList(),
|
|
164
|
-
@Field val locations: FloatArray = floatArrayOf()
|
|
164
|
+
@Field val locations: FloatArray = floatArrayOf()
|
|
165
165
|
) : Record
|
|
166
166
|
|
|
167
167
|
data class HeatmapObject(
|
|
168
168
|
@Field val points: List<PointWithData> = emptyList(),
|
|
169
169
|
@Field val radius: Int?,
|
|
170
170
|
@Field val gradient: Gradient? = null,
|
|
171
|
-
@Field val opacity: Double
|
|
171
|
+
@Field val opacity: Double?
|
|
172
172
|
) : Record
|
|
@@ -87,9 +87,9 @@ class GoogleMapsCallbacks(private val map: GoogleMap, private val context: Conte
|
|
|
87
87
|
context,
|
|
88
88
|
Manifest.permission.ACCESS_FINE_LOCATION
|
|
89
89
|
) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
context,
|
|
91
|
+
Manifest.permission.ACCESS_COARSE_LOCATION
|
|
92
|
+
) != PackageManager.PERMISSION_GRANTED
|
|
93
93
|
) {
|
|
94
94
|
return
|
|
95
95
|
}
|
|
@@ -99,7 +99,7 @@ class GoogleMapsCallbacks(private val map: GoogleMap, private val context: Conte
|
|
|
99
99
|
Looper.getMainLooper()
|
|
100
100
|
)
|
|
101
101
|
/*On location button click listener is set here in order to get permission updates more often.
|
|
102
|
-
|
|
102
|
+
* In the future it should be called only when the permissions change */
|
|
103
103
|
map.setOnMyLocationButtonClickListener {
|
|
104
104
|
locationProvider.lastLocation.addOnSuccessListener { location ->
|
|
105
105
|
onLocationButtonPress?.let { it(UserLocationRecord(location)) }
|
|
@@ -20,7 +20,6 @@ class GoogleMapsCameraAnimations(private val googleMap: GoogleMap) {
|
|
|
20
20
|
)
|
|
21
21
|
|
|
22
22
|
if (cameraMove.latLngDelta != null) {
|
|
23
|
-
|
|
24
23
|
val x1 = target.latitude - cameraMove.latLngDelta!!.latitudeDelta / 2
|
|
25
24
|
val y1 = target.longitude - cameraMove.latLngDelta!!.longitudeDelta / 2
|
|
26
25
|
val bottomLeft = LatLng(x1, y1)
|
|
@@ -39,25 +39,25 @@ class GoogleMapsCircles(map: GoogleMap) : Circles {
|
|
|
39
39
|
0xFF,
|
|
40
40
|
Integer.decode("0x" + colorString[1] + colorString[1]),
|
|
41
41
|
Integer.decode("0x" + colorString[2] + colorString[2]),
|
|
42
|
-
Integer.decode("0x" + colorString[3] + colorString[3])
|
|
42
|
+
Integer.decode("0x" + colorString[3] + colorString[3])
|
|
43
43
|
)
|
|
44
44
|
5 -> Color.argb(
|
|
45
45
|
Integer.decode("0x" + colorString[4] + colorString[4]),
|
|
46
46
|
Integer.decode("0x" + colorString[1] + colorString[1]),
|
|
47
47
|
Integer.decode("0x" + colorString[2] + colorString[2]),
|
|
48
|
-
Integer.decode("0x" + colorString[3] + colorString[3])
|
|
48
|
+
Integer.decode("0x" + colorString[3] + colorString[3])
|
|
49
49
|
)
|
|
50
50
|
7 -> Color.argb(
|
|
51
51
|
0xFF,
|
|
52
52
|
Integer.decode("0x" + colorString.substring(1..2)),
|
|
53
53
|
Integer.decode("0x" + colorString.substring(3..4)),
|
|
54
|
-
Integer.decode("0x" + colorString.substring(5..6))
|
|
54
|
+
Integer.decode("0x" + colorString.substring(5..6))
|
|
55
55
|
)
|
|
56
56
|
9 -> Color.argb(
|
|
57
57
|
Integer.decode("0x" + colorString.substring(7..8)),
|
|
58
58
|
Integer.decode("0x" + colorString.substring(1..2)),
|
|
59
59
|
Integer.decode("0x" + colorString.substring(3..4)),
|
|
60
|
-
Integer.decode("0x" + colorString.substring(5..6))
|
|
60
|
+
Integer.decode("0x" + colorString.substring(5..6))
|
|
61
61
|
)
|
|
62
62
|
else -> throw IllegalArgumentException("String $colorString is not a valid color representation")
|
|
63
63
|
}
|
|
@@ -27,25 +27,25 @@ fun colorHexStringToInt(hexColorString: String): Int {
|
|
|
27
27
|
0xFF,
|
|
28
28
|
Integer.decode("0x" + hexColorString[1] + hexColorString[1]),
|
|
29
29
|
Integer.decode("0x" + hexColorString[2] + hexColorString[2]),
|
|
30
|
-
Integer.decode("0x" + hexColorString[3] + hexColorString[3])
|
|
30
|
+
Integer.decode("0x" + hexColorString[3] + hexColorString[3])
|
|
31
31
|
)
|
|
32
32
|
5 -> Color.argb(
|
|
33
33
|
Integer.decode("0x" + hexColorString[4] + hexColorString[4]),
|
|
34
34
|
Integer.decode("0x" + hexColorString[1] + hexColorString[1]),
|
|
35
35
|
Integer.decode("0x" + hexColorString[2] + hexColorString[2]),
|
|
36
|
-
Integer.decode("0x" + hexColorString[3] + hexColorString[3])
|
|
36
|
+
Integer.decode("0x" + hexColorString[3] + hexColorString[3])
|
|
37
37
|
)
|
|
38
38
|
7 -> Color.argb(
|
|
39
39
|
0xFF,
|
|
40
40
|
Integer.decode("0x" + hexColorString.substring(1..2)),
|
|
41
41
|
Integer.decode("0x" + hexColorString.substring(3..4)),
|
|
42
|
-
Integer.decode("0x" + hexColorString.substring(5..6))
|
|
42
|
+
Integer.decode("0x" + hexColorString.substring(5..6))
|
|
43
43
|
)
|
|
44
44
|
9 -> Color.argb(
|
|
45
45
|
Integer.decode("0x" + hexColorString.substring(7..8)),
|
|
46
46
|
Integer.decode("0x" + hexColorString.substring(1..2)),
|
|
47
47
|
Integer.decode("0x" + hexColorString.substring(3..4)),
|
|
48
|
-
Integer.decode("0x" + hexColorString.substring(5..6))
|
|
48
|
+
Integer.decode("0x" + hexColorString.substring(5..6))
|
|
49
49
|
)
|
|
50
50
|
else -> throw IllegalArgumentException("String $hexColorString is not a valid hex color representation")
|
|
51
51
|
}
|
|
@@ -305,7 +305,7 @@ class GoogleMapsView(context: Context, appContext: AppContext) : LinearLayout(co
|
|
|
305
305
|
After calling lambda the subscription is canceled.
|
|
306
306
|
StateFlow holds the latest value so even if updateMap is called after
|
|
307
307
|
OnMapReadyCallback, StateFlow emits the latest value letting provided lambda to be executed.
|
|
308
|
-
|
|
308
|
+
*/
|
|
309
309
|
private fun updateMap(update: () -> Unit) {
|
|
310
310
|
CoroutineScope(Dispatchers.IO).launch {
|
|
311
311
|
mapReady.collectLatest {
|
package/ios/ExpoMaps.podspec
CHANGED
|
@@ -10,13 +10,13 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platform = :ios, '13.
|
|
13
|
+
s.platform = :ios, '13.4'
|
|
14
14
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
s.source_files = 'ExpoMaps/**/*.{h,m,swift}'
|
|
17
17
|
s.preserve_paths = 'ExpoMaps/**/*.{h,m,swift}'
|
|
18
18
|
s.requires_arc = true
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
s.dependency 'ExpoModulesCore'
|
|
21
21
|
s.dependency 'GoogleMaps', '7.3.0'
|
|
22
22
|
# s.dependency 'Google-Maps-iOS-Utils', '4.1.0'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-maps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "ExpoMaps standalone module",
|
|
5
5
|
"main": "build/Map.js",
|
|
6
6
|
"types": "build/Map.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/module-template",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"expo-asset": "^
|
|
33
|
+
"expo-asset": "^9.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"expo-module-scripts": "^3.0.0"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"jest": {
|
|
42
42
|
"preset": "expo-module-scripts/ios"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "dd467f9665171a9729dad8837ea595cd046936f4"
|
|
45
45
|
}
|