Todos los proyectosDemo en vivo con la forma de la API de react-native-maps. Arrastrá para moverte; los marcadores son sintéticos.
react-native-web-maps
Una sola API de mapas para React Native y la web: react-native-maps en iOS y Android, Google Maps en el navegador. Entre sus dependientes en npm hay paquetes de builders de apps como Draftbit, Vibecode y Rork.
Instalar
npm i @teovilla/react-native-web-maps- Estrellas
- 75 estrellas
- Descargas (npm)
- 8.888.067 · 331,1 mil en el último mes
- Dependientes en npm, entre otros
- Vibecode
- Creado
- Último push
- Licencia
- MIT
- Lenguajes
- TypeScript 95%
- JavaScript 4%
// On the web, react-native-maps resolves to
// @teovilla/react-native-web-maps via a bundler alias.
import MapView, { Marker, Polyline } from "react-native-maps";
<MapView initialRegion={region}>
<Marker
coordinate={{ latitude: -34.6012, longitude: -58.3843 }}
title="Retiro"
/>
<Marker
coordinate={{ latitude: -34.6087, longitude: -58.3712 }}
title="Recolector"
/>
<Marker
coordinate={{ latitude: -34.6021, longitude: -58.3669 }}
title="Reciclador"
/>
<Polyline coordinates={route} strokeWidth={4} />
</MapView>README
Tomado del README del proyecto en GitHub (en inglés).
@teovilla/react-native-web-maps
Cross platfrom maps for react & react-native
Installation
$ yarn add @teovilla/react-native-web-maps
Usage with Expo web / Webpack
For this to work you must alias react-native-maps to @teovilla/react-native-web-maps in your webpack config.
Example with Expo Web:
// webpack.config.js
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
config.resolve.alias['react-native-maps'] = '@teovilla/react-native-web-maps';
return config;
};
Example with Next.js:
// next.config.js
module.exports = {
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
'react-native-maps$': '@teovilla/react-native-web-maps',
};
return config;
},
};
Documentation
The docs for the project can be found here.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
