expo-maps 0.6.0 → 0.6.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 CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.6.1 — 2024-10-29
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
13
17
  ## 0.6.0 — 2024-10-22
14
18
 
15
19
  ### 🛠 Breaking changes
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '0.6.0'
4
+ version = '0.6.1'
5
5
 
6
6
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
7
  apply from: expoModulesCorePlugin
@@ -14,7 +14,7 @@ android {
14
14
  namespace "expo.modules.maps"
15
15
  defaultConfig {
16
16
  versionCode 1
17
- versionName '0.6.0'
17
+ versionName '0.6.1'
18
18
  }
19
19
  }
20
20
 
@@ -115,8 +115,6 @@ export type GeoJsonObject = {
115
115
  *
116
116
  * See {@link GeoJsonProps} for more details.
117
117
  *
118
- * Please note that GeoJSONs are only supported on Apple Maps for iOS versions >= 13.
119
- *
120
118
  * On Android you can style your features individually by specifing supported properties for given feature type:
121
119
  *
122
120
  * For polygon you can use:
@@ -1 +1 @@
1
- {"version":3,"file":"GeoJson.d.ts","sourceRoot":"","sources":["../src/GeoJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE;QACb;;WAEG;QACH,OAAO,CAAC,EAAE;YACR;;eAEG;YACH,SAAS,CAAC,EAAE,MAAM,GAAG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;;eAGG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YACf;;;eAGG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YACf;;;eAGG;YACH,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,EAAE;QACb,OAAO,CAAC,EAAE;YACR,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;YAC9C,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;SAC/B,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;SACzB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;CACH,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,qBAAa,OAAQ,SAAQ,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC;IACxD,MAAM;CAGP"}
package/build/GeoJson.js CHANGED
@@ -7,8 +7,6 @@ import React from 'react';
7
7
  *
8
8
  * See {@link GeoJsonProps} for more details.
9
9
  *
10
- * Please note that GeoJSONs are only supported on Apple Maps for iOS versions >= 13.
11
- *
12
10
  * On Android you can style your features individually by specifing supported properties for given feature type:
13
11
  *
14
12
  * For polygon you can use:
@@ -1 +1 @@
1
- {"version":3,"file":"GeoJson.js","sourceRoot":"","sources":["../src/GeoJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiH1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAuB;IACxD,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import React from 'react';\n\nimport { Color, PatternItem } from './Common.types';\n\n/**\n * GeoJson specific props.\n */\nexport type GeoJsonProps = {\n /**\n * JSON string containing GeoJSON\n */\n geoJsonString: string;\n /**\n * Default style for different GeoJSON feature types\n */\n defaultStyle?: {\n /**\n * Default style for `Polygon` GeoJSON feature\n */\n polygon?: {\n /**\n * See {@link PolygonProps}\n */\n fillColor?: string | Color;\n /**\n * See {@link PolygonProps}\n */\n strokeColor?: string | Color;\n /**\n * See {@link PolygonProps}\n */\n strokeWidth?: number;\n /**\n * See {@link PolygonProps}\n * Works only on `Android`.\n */\n strokeJointType?: 'bevel' | 'miter' | 'round';\n /**\n * See {@link PolygonProps}\n * Works only on `Android`.\n */\n strokePattern?: PatternItem[];\n };\n /**\n * Default style for `LineString` GeoJSON feature\n */\n polyline?: {\n /**\n * See {@link PolylineProps}\n */\n color?: string | Color;\n /**\n * See {@link PolylineProps}\n * Works only on `Android`.\n */\n pattern?: PatternItem[];\n /**\n * See {@link PolylineProps}\n * Works only on `iOS`.\n */\n width?: number;\n };\n /**\n * Default style for `Point` GeoJSON feature\n * Works only on `Android`.\n */\n marker?: {\n /**\n * See {@link MarkerProps}\n * Works only on `Android`.\n */\n color?: string;\n /**\n * See {@link MarkerProps}\n * Works only on `Android`.\n */\n title?: string;\n /**\n * See {@link MarkerProps}\n * Works only on `Android`.\n */\n snippet?: string;\n };\n };\n};\n\n/**\n * Internal JSON object for representing GeoJSON in Expo Maps library.\n *\n * See {@link GeoJsonProps} for more detail.\n */\nexport type GeoJsonObject = {\n type: 'geojson';\n defaultStyle?: {\n polygon?: {\n fillColor?: string;\n strokeColor?: string;\n strokeWidth?: number;\n strokeJointType?: 'bevel' | 'miter' | 'round';\n strokePattern?: PatternItem[];\n };\n polyline?: {\n color?: string;\n pattern?: PatternItem[];\n };\n marker?: {\n color?: number;\n title?: string;\n snippet?: string;\n };\n };\n} & Omit<GeoJsonProps, 'defaultStyle'>;\n\n/**\n * GeoJSON component of Expo Maps library.\n *\n * Displays data provided in .json file.\n * This component should be ExpoMap component child to work properly.\n *\n * See {@link GeoJsonProps} for more details.\n *\n * Please note that GeoJSONs are only supported on Apple Maps for iOS versions >= 13.\n *\n * On Android you can style your features individually by specifing supported properties for given feature type:\n *\n * For polygon you can use:\n * * fillColor\n * * strokeColor\n * * strokeWidth\n * * strokeJointType\n * * strokePattern\n * props. Please check documentation for these five here {@link PolygonProps}.\n *\n * For polyline you can use:\n * * color\n * * pattern\n * props. Please check documentation for these two here {@link PolylineProps}.\n *\n * For marker you can use:\n * * color\n * * title\n * * snippet\n * props. Please check documentation for these three here {@link MarkerProps}.\n *\n * @example\n * {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": { \"type\": \"Point\", \"coordinates\": [102.0, 0.5] },\n \"properties\": {\n \"color\": \"blue\",\n \"title\": \"Marker\",\n \"snippet\": \"This is marker from GeoJSON\"\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [1.75, 47.69],\n [21.89, 42.79],\n [43.65, 53.22],\n [58.58, 48.58]\n ]\n },\n \"properties\": {\n \"color\": \"magenta\",\n \"pattern\": [\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"gap\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"gap\", \"length\": 10 }\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [15.73, 53.84],\n [16.31, 51.11],\n [50.14, 22.07],\n [53.18, 22.11]\n ]\n ]\n },\n \"properties\": {\n \"fillColor\": \"blue\",\n \"strokeColor\": \"#000000\",\n \"strokeWidth\": 10,\n \"strokeJointType\": \"bevel\",\n \"strokePattern\": [\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"gap\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"gap\", \"length\": 10 }\n ]\n }\n }\n ]\n }\n */\nexport class GeoJson extends React.Component<GeoJsonProps> {\n render() {\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"GeoJson.js","sourceRoot":"","sources":["../src/GeoJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiH1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAuB;IACxD,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import React from 'react';\n\nimport { Color, PatternItem } from './Common.types';\n\n/**\n * GeoJson specific props.\n */\nexport type GeoJsonProps = {\n /**\n * JSON string containing GeoJSON\n */\n geoJsonString: string;\n /**\n * Default style for different GeoJSON feature types\n */\n defaultStyle?: {\n /**\n * Default style for `Polygon` GeoJSON feature\n */\n polygon?: {\n /**\n * See {@link PolygonProps}\n */\n fillColor?: string | Color;\n /**\n * See {@link PolygonProps}\n */\n strokeColor?: string | Color;\n /**\n * See {@link PolygonProps}\n */\n strokeWidth?: number;\n /**\n * See {@link PolygonProps}\n * Works only on `Android`.\n */\n strokeJointType?: 'bevel' | 'miter' | 'round';\n /**\n * See {@link PolygonProps}\n * Works only on `Android`.\n */\n strokePattern?: PatternItem[];\n };\n /**\n * Default style for `LineString` GeoJSON feature\n */\n polyline?: {\n /**\n * See {@link PolylineProps}\n */\n color?: string | Color;\n /**\n * See {@link PolylineProps}\n * Works only on `Android`.\n */\n pattern?: PatternItem[];\n /**\n * See {@link PolylineProps}\n * Works only on `iOS`.\n */\n width?: number;\n };\n /**\n * Default style for `Point` GeoJSON feature\n * Works only on `Android`.\n */\n marker?: {\n /**\n * See {@link MarkerProps}\n * Works only on `Android`.\n */\n color?: string;\n /**\n * See {@link MarkerProps}\n * Works only on `Android`.\n */\n title?: string;\n /**\n * See {@link MarkerProps}\n * Works only on `Android`.\n */\n snippet?: string;\n };\n };\n};\n\n/**\n * Internal JSON object for representing GeoJSON in Expo Maps library.\n *\n * See {@link GeoJsonProps} for more detail.\n */\nexport type GeoJsonObject = {\n type: 'geojson';\n defaultStyle?: {\n polygon?: {\n fillColor?: string;\n strokeColor?: string;\n strokeWidth?: number;\n strokeJointType?: 'bevel' | 'miter' | 'round';\n strokePattern?: PatternItem[];\n };\n polyline?: {\n color?: string;\n pattern?: PatternItem[];\n };\n marker?: {\n color?: number;\n title?: string;\n snippet?: string;\n };\n };\n} & Omit<GeoJsonProps, 'defaultStyle'>;\n\n/**\n * GeoJSON component of Expo Maps library.\n *\n * Displays data provided in .json file.\n * This component should be ExpoMap component child to work properly.\n *\n * See {@link GeoJsonProps} for more details.\n *\n * On Android you can style your features individually by specifing supported properties for given feature type:\n *\n * For polygon you can use:\n * * fillColor\n * * strokeColor\n * * strokeWidth\n * * strokeJointType\n * * strokePattern\n * props. Please check documentation for these five here {@link PolygonProps}.\n *\n * For polyline you can use:\n * * color\n * * pattern\n * props. Please check documentation for these two here {@link PolylineProps}.\n *\n * For marker you can use:\n * * color\n * * title\n * * snippet\n * props. Please check documentation for these three here {@link MarkerProps}.\n *\n * @example\n * {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": { \"type\": \"Point\", \"coordinates\": [102.0, 0.5] },\n \"properties\": {\n \"color\": \"blue\",\n \"title\": \"Marker\",\n \"snippet\": \"This is marker from GeoJSON\"\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [1.75, 47.69],\n [21.89, 42.79],\n [43.65, 53.22],\n [58.58, 48.58]\n ]\n },\n \"properties\": {\n \"color\": \"magenta\",\n \"pattern\": [\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"gap\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"gap\", \"length\": 10 }\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [15.73, 53.84],\n [16.31, 51.11],\n [50.14, 22.07],\n [53.18, 22.11]\n ]\n ]\n },\n \"properties\": {\n \"fillColor\": \"blue\",\n \"strokeColor\": \"#000000\",\n \"strokeWidth\": 10,\n \"strokeJointType\": \"bevel\",\n \"strokePattern\": [\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"stroke\", \"length\": 10 },\n { \"type\": \"gap\", \"length\": 10 },\n { \"type\": \"stroke\", \"length\": 0 },\n { \"type\": \"gap\", \"length\": 10 }\n ]\n }\n }\n ]\n }\n */\nexport class GeoJson extends React.Component<GeoJsonProps> {\n render() {\n return null;\n }\n}\n"]}
@@ -21,23 +21,11 @@ class AppleMapsCameraAnimations {
21
21
  newCamera.heading = cameraMove.bearing ?? mapView.camera.heading
22
22
  newCamera.pitch = cameraMove.tilt ?? mapView.camera.pitch
23
23
 
24
- /*
25
- camera.centerCoordinateDistance is much more similar to GoogleMaps zoom when converting, but
26
- only available on iOS 13+
27
- */
28
24
  if let zoom = cameraMove.zoom {
29
25
  let distance = AppleMapsView.googleMapsZoomLevelToMeters(latitude: newCamera.centerCoordinate.latitude, zoom: Double(zoom))
30
- if #available(iOS 13.0, *) {
31
- newCamera.centerCoordinateDistance = distance
32
- } else {
33
- newCamera.altitude = distance * cos(Double(newCamera.pitch) * Double.pi / 180)
34
- }
26
+ newCamera.centerCoordinateDistance = distance
35
27
  } else {
36
- if #available(iOS 13.0, *) {
37
- newCamera.centerCoordinateDistance = mapView.camera.centerCoordinateDistance
38
- } else {
39
- newCamera.altitude = mapView.camera.altitude
40
- }
28
+ newCamera.centerCoordinateDistance = mapView.camera.centerCoordinateDistance
41
29
  }
42
30
 
43
31
  if let delta = cameraMove.latLngDelta {
@@ -11,41 +11,36 @@ class AppleMapsGeoJsons: GeoJsons {
11
11
 
12
12
  func setGeoJsons(geoJsonObjects: [GeoJsonObject]) {
13
13
  deleteGeoJsons()
14
- if #available(iOS 13.0, *) {
15
- for geoJsonObject in geoJsonObjects {
16
- // swiftlint:disable force_cast force_try
17
- let appleMapsObjects = try! MKGeoJSONDecoder().decode(geoJsonObject.geoJsonString.data(using: .utf8)!) as! [MKGeoJSONFeature]
18
- // swiftlint:enable force_cast force_try
14
+ for geoJsonObject in geoJsonObjects {
15
+ // swiftlint:disable:next force_cast force_try force_unwrapping
16
+ let appleMapsObjects = try! MKGeoJSONDecoder().decode(geoJsonObject.geoJsonString.data(using: .utf8)!) as! [MKGeoJSONFeature]
19
17
 
20
- for object in appleMapsObjects {
21
- let geometry = object.geometry.first
22
- if let polygon = geometry as? MKPolygon {
23
- let expoPolygon = ExpoMKPolygon(points: polygon.points(), count: polygon.pointCount)
24
- applyPolygonDefaultStyle(polygon: expoPolygon, defaultStyle: geoJsonObject.defaultStyle)
25
- mapView.addOverlay(expoPolygon)
26
- overlays.append(expoPolygon)
27
- }
28
- if let polyline = geometry as? MKPolyline {
29
- let expoPolyline = ExpoMKPolyline(points: polyline.points(), count: polyline.pointCount)
30
- applyPolylineDefaultStyle(polyline: expoPolyline, defaultStyle: geoJsonObject.defaultStyle)
31
- mapView.addOverlay(expoPolyline)
32
- overlays.append(expoPolyline)
33
- }
34
- if let marker = geometry as? MKPointAnnotation {
35
- let expoMarker = ExpoMKColorAnnotation(
36
- coordinate: CLLocationCoordinate2D(
37
- latitude: marker.coordinate.latitude,
38
- longitude: marker.coordinate.longitude
39
- )
18
+ for object in appleMapsObjects {
19
+ let geometry = object.geometry.first
20
+ if let polygon = geometry as? MKPolygon {
21
+ let expoPolygon = ExpoMKPolygon(points: polygon.points(), count: polygon.pointCount)
22
+ applyPolygonDefaultStyle(polygon: expoPolygon, defaultStyle: geoJsonObject.defaultStyle)
23
+ mapView.addOverlay(expoPolygon)
24
+ overlays.append(expoPolygon)
25
+ }
26
+ if let polyline = geometry as? MKPolyline {
27
+ let expoPolyline = ExpoMKPolyline(points: polyline.points(), count: polyline.pointCount)
28
+ applyPolylineDefaultStyle(polyline: expoPolyline, defaultStyle: geoJsonObject.defaultStyle)
29
+ mapView.addOverlay(expoPolyline)
30
+ overlays.append(expoPolyline)
31
+ }
32
+ if let marker = geometry as? MKPointAnnotation {
33
+ let expoMarker = ExpoMKColorAnnotation(
34
+ coordinate: CLLocationCoordinate2D(
35
+ latitude: marker.coordinate.latitude,
36
+ longitude: marker.coordinate.longitude
40
37
  )
41
- applyMarkerDefaultStyle(marker: expoMarker, defaultStyle: geoJsonObject.defaultStyle)
42
- mapView.addAnnotation(expoMarker)
43
- annotations.append(expoMarker)
44
- }
38
+ )
39
+ applyMarkerDefaultStyle(marker: expoMarker, defaultStyle: geoJsonObject.defaultStyle)
40
+ mapView.addAnnotation(expoMarker)
41
+ annotations.append(expoMarker)
45
42
  }
46
43
  }
47
- } else {
48
- // Fallback on earlier versions
49
44
  }
50
45
  }
51
46
 
@@ -47,7 +47,6 @@ class AppleMapsPOI: NSObject, PointsOfInterests {
47
47
  }
48
48
 
49
49
  // dispaying poi on map
50
- @available(iOS 13.0, *)
51
50
  func setEnabledPOIs(enabled: Bool) {
52
51
  enabledPOIDisplay = enabled
53
52
  if enabled {
@@ -59,7 +58,6 @@ class AppleMapsPOI: NSObject, PointsOfInterests {
59
58
  }
60
59
 
61
60
  // adding filter with specified categories
62
- @available(iOS 13.0, *)
63
61
  extension AppleMapsPOI {
64
62
  func setEnabledPOIFilter(categories: [POICategoryType]) {
65
63
  if categories.isEmpty {
@@ -165,18 +165,10 @@ public final class AppleMapsView: UIView, ExpoMapView, UIGestureRecognizerDelega
165
165
  }
166
166
 
167
167
  func setEnabledPOIFilter(categories: [POICategoryType]) {
168
- guard #available(iOS 13.0, *) else {
169
- print("Enabling filter for points of interests is not avaliable for < iOS 13.0")
170
- return
171
- }
172
168
  pointsOfInterest.setEnabledPOIFilter(categories: categories)
173
169
  }
174
170
 
175
171
  func setEnabledPOIs(enabled: Bool) {
176
- guard #available(iOS 13.0, *) else {
177
- print("Manipulating points of interests visibility is not avaliable for < iOS 13.0")
178
- return
179
- }
180
172
  pointsOfInterest.setEnabledPOIs(enabled: enabled)
181
173
  }
182
174
 
@@ -62,9 +62,6 @@ extension AppleMapsPOISearch {
62
62
  }
63
63
 
64
64
  private func setSearchFilter(request: MKLocalSearch.Request) {
65
- guard #available(iOS 13.0, *) else {
66
- return
67
- }
68
65
  var filter: MKPointOfInterestFilter
69
66
  if let categories = pointOfInterestCategories, !categories.isEmpty {
70
67
  filter = MKPointOfInterestFilter.init(including: categories)
@@ -32,7 +32,6 @@ class AppleMapsPOISearchCompleter: NSObject, SearchCompleter {
32
32
  searchCompleter.region = region
33
33
  }
34
34
 
35
- @available(iOS 13.0, *)
36
35
  func setSearchCompleterFilters(filter: MKPointOfInterestFilter?) {
37
36
  searchCompleter.resultTypes = .pointOfInterest
38
37
  guard let filter = filter else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-maps",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Provides a Map component that uses Google Maps on Android and Apple Maps or Google Maps on iOS.",
5
5
  "main": "build/Map.js",
6
6
  "types": "build/Map.d.ts",
@@ -46,5 +46,5 @@
46
46
  "jest": {
47
47
  "preset": "expo-module-scripts/ios"
48
48
  },
49
- "gitHead": "7c7d2362fff23bec26cd145ed34edd9c403551bd"
49
+ "gitHead": "8b9f5addf49cb5ef7598ca27ff60c0accff6a1c3"
50
50
  }
package/src/GeoJson.ts CHANGED
@@ -119,8 +119,6 @@ export type GeoJsonObject = {
119
119
  *
120
120
  * See {@link GeoJsonProps} for more details.
121
121
  *
122
- * Please note that GeoJSONs are only supported on Apple Maps for iOS versions >= 13.
123
- *
124
122
  * On Android you can style your features individually by specifing supported properties for given feature type:
125
123
  *
126
124
  * For polygon you can use: