Skip to content

Commit e029fb7

Browse files
authored
Use @teovilla/react-native-web-maps instead of web-maps (47.3.3) (#683)
* Updated MapView to use @teovilla/react-native-web-maps * Updated MapMarker and MapCallout to use @teovilla/react-native-web-maps * Deprecate web-maps package * Map default provider as google when on web * Override react-native UIManager.getViewManagerConfig to fix issue on snack * Revert "Override react-native UIManager.getViewManagerConfig to fix issue on snack" This reverts commit 347ba26. * Updated comment on why imports are done that way * Expo 48 (#679) * Upgraded packages to expo 48 versions * v48.0.0 * ci on 47 branch instead of 46 * yarn.lock * Upgrade rn + remove webpack config resolution * Cast aspect ratio to number * Remove fonts from examples to get rid of warnings * Remove webpack alias for react-native * Move deprecated components into deprecated folder + minor cleanup * Delete rn maps patch * Added deprecated comments * Fixed linting * Downgrade date time picker due to react-native-datetimepicker/datetimepicker#750 not fixed yet * Made versions exact * yarn.lock * Updated @teovilla/react-native-web-maps version * Updates to accomdate latest of @teovilla/react-native-web-maps * Moved web-maps to deprecated folder * yarn.lock * Updated imports and types of @teovilla/react-native-web-maps * Export callout directly * Updated export of callout * Use 'initialCamera' prop instead of 'camera' * Added @teovilla/react-native-web-maps package * v47.3.3
1 parent 1531a44 commit e029fb7

40 files changed

+1315
-717
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# `@draftbit/web-maps`
22

3+
## DEPRECATED
4+
5+
### Use `@draftbit/maps` for both native and web maps
6+
7+
---
8+
39
`MapView`, `MapMarker`, and `MapCallout` components, powered by `@react-google-maps/api`. For use on web.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
},
3838
"homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
3939
"dependencies": {
40-
"@draftbit/types": "47.3.2",
4140
"@react-google-maps/api": "^2.10.2"
4241
},
4342
"eslintIgnore": [

packages/web-maps/src/components/MapCallout.tsx renamed to deprecated-packages/web-maps/src/components/MapCallout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import * as React from "react";
22
import { TouchableOpacity } from "react-native";
33
import { InfoWindow } from "./ReactGoogleMaps";
44
import { markerContext } from "./MapMarker";
5-
import { MapCalloutProps } from "@draftbit/types";
5+
import { MapCalloutProps } from "../mapTypes";
66

7+
/**
8+
* @deprecated DEPRECATED: Use @draftbit/maps
9+
*/
710
const MapCallout: React.FC<React.PropsWithChildren<MapCalloutProps>> = ({
811
anchor,
912
onPress = () => {},

packages/web-maps/src/components/MapMarker.tsx renamed to deprecated-packages/web-maps/src/components/MapMarker.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react";
22
import { View, Text, StyleSheet } from "react-native";
3-
import { MapMarkerProps } from "@draftbit/types";
3+
import { MapMarkerProps } from "../mapTypes";
44
import { Marker as WebMarker } from "./ReactGoogleMaps";
55
import MapCallout from "./MapCallout";
66

@@ -23,6 +23,9 @@ export const markerContext = React.createContext<IMarkerContext>({
2323
toggleCallout: () => {},
2424
});
2525

26+
/**
27+
* @deprecated DEPRECATED: Use @draftbit/maps
28+
*/
2629
const MapMarker: React.FC<React.PropsWithChildren<MapMarkerProps>> = ({
2730
pinImage,
2831
pinImageSize = 50,

packages/web-maps/src/components/MapScriptLoader.tsx renamed to deprecated-packages/web-maps/src/components/MapScriptLoader.tsx

File renamed without changes.

packages/web-maps/src/components/MapView.tsx renamed to deprecated-packages/web-maps/src/components/MapView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from "react";
22
import { GoogleMap, Marker } from "./ReactGoogleMaps";
33
import NoApiKey from "./NoApiKey";
44
import MapScriptLoader from "./MapScriptLoader";
5-
import { MapViewProps, MapRegion } from "@draftbit/types";
5+
import { MapViewProps, MapRegion } from "../mapTypes";
66
import { StyleSheet } from "react-native";
77

88
type State = {
@@ -23,6 +23,9 @@ type State = {
2323
mapHeight?: number;
2424
};
2525

26+
/**
27+
* @deprecated DEPRECATED: Use @draftbit/maps
28+
*/
2629
class MapView extends React.Component<
2730
React.PropsWithChildren<MapViewProps<any>>,
2831
State
File renamed without changes.

packages/web-maps/src/components/ReactGoogleMaps.tsx renamed to deprecated-packages/web-maps/src/components/ReactGoogleMaps.tsx

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)