react-native-maps 1.2.0-beta.1 → 1.2.0-beta.2

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/lib/Geojson.d.ts CHANGED
@@ -130,6 +130,17 @@ export declare type GeojsonProps = {
130
130
  * @platform — Android: Supported
131
131
  */
132
132
  title?: MarkerProps['title'];
133
+ /**
134
+ * Sets whether this marker should track view changes.
135
+ * It's recommended to turn it off whenever it's possible to improve custom marker performance.
136
+ * This is the default value for all point markers in your geojson data. It can be overriden
137
+ * on a per point basis by adding a `trackViewChanges` property to the `properties` object on the point.
138
+ *
139
+ * @default true
140
+ * @platform iOS: Google Maps only
141
+ * @platform Android: Supported
142
+ */
143
+ tracksViewChanges?: boolean;
133
144
  /**
134
145
  * The order in which this tile overlay is drawn with respect to other overlays. An overlay
135
146
  * with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays
package/lib/Geojson.js CHANGED
@@ -31,14 +31,15 @@ const MapMarker_1 = __importDefault(require("./MapMarker"));
31
31
  const MapPolyline_1 = __importDefault(require("./MapPolyline"));
32
32
  const MapPolygon_1 = __importDefault(require("./MapPolygon"));
33
33
  const Geojson = (props) => {
34
- const { geojson, strokeColor, fillColor, strokeWidth, color, title, image, zIndex, onPress, lineCap, lineJoin, tappable, miterLimit, lineDashPhase, lineDashPattern, markerComponent, } = props;
34
+ const { geojson, strokeColor, fillColor, strokeWidth, color, title, image, zIndex, onPress, lineCap, lineJoin, tappable, tracksViewChanges, miterLimit, lineDashPhase, lineDashPattern, markerComponent, } = props;
35
35
  const pointOverlays = makePointOverlays(geojson.features);
36
36
  const lineOverlays = makeLineOverlays(geojson.features);
37
37
  const polygonOverlays = makePolygonOverlays(geojson.features);
38
38
  return (<React.Fragment>
39
39
  {pointOverlays.map((overlay, index) => {
40
40
  const markerColor = getColor(color, overlay, 'marker-color');
41
- return (<MapMarker_1.default key={index} coordinate={overlay.coordinates} image={image} title={title} pinColor={markerColor} zIndex={zIndex} onPress={() => onPress && onPress(overlay)}>
41
+ const pointOverlayTracksViewChanges = overlay.feature.properties?.tracksViewChanges || tracksViewChanges;
42
+ return (<MapMarker_1.default key={index} coordinate={overlay.coordinates} tracksViewChanges={pointOverlayTracksViewChanges} image={image} title={title} pinColor={markerColor} zIndex={zIndex} onPress={() => onPress && onPress(overlay)}>
42
43
  {markerComponent}
43
44
  </MapMarker_1.default>);
44
45
  })}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "lib/index.js",
6
6
  "author": "Leland Richardson <leland.m.richardson@gmail.com>",
7
7
  "homepage": "https://github.com/react-native-maps/react-native-maps#readme",
8
- "version": "1.2.0-beta.1",
8
+ "version": "1.2.0-beta.2",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",