
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@wemap/expo-livemap
Advanced tools
A custom WebView component for Expo applications that exposes a Livemap component and methods to interact with it.
npm install @wemap/expo-livemap
import React from 'react';
import { View } from 'react-native';
import { LiveMap } from '@wemap/expo-livemap';
function App() {
const handleCustomMessage = (event) => {
console.log('Received message from LiveMap:', event);
};
return (
<View style={{ flex: 1 }}>
<LiveMap
source={{ uri: 'https://livemap.getwemap.com' }}
onCustomMessage={handleCustomMessage}
/>
</View>
);
}
import React, { useRef } from 'react';
import { View, Button } from 'react-native';
import { LiveMap, LiveMapRef } from '@wemap/expo-livemap';
function App() {
const mapRef = useRef<LiveMapRef>(null);
const handleCustomMessage = (event) => {
console.log('Received message from LiveMap:', event);
};
const sendMessageToMap = () => {
mapRef.current?.postCustomMessage('Hello from React Native!');
};
return (
<View style={{ flex: 1 }}>
<LiveMap
ref={mapRef}
source={{ uri: 'https://livemap.getwemap.com' }}
onCustomMessage={handleCustomMessage}
/>
<Button
title="Send Message to LiveMap"
onPress={sendMessageToMap}
/>
</View>
);
}
Inside your web content, you can send messages to React Native using the injected postCustomMessage function:
// Send message from LiveMap to React Native
window.postCustomMessage({
type: 'mapEvent',
data: 'Map is ready!'
});
The component accepts all standard React Native WebView props plus:
onCustomMessage: (event: any) => void Callback function that handles messages sent from the LiveMap
postCustomMessage(message: string): Sends a message to the LiveMap reload(): Reloads the LiveMap
The package includes TypeScript definitions. For TypeScript projects, you can import types:
import { LiveMapProps, LiveMapRef } from '@wemap/expo-livemap';
MIT
Simon Milleto simon@getwemap.com
FAQs
Expose a Livemap component and methods to interact with it
We found that @wemap/expo-livemap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.