
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@cedarstudios/react-native-cedarmaps
Advanced tools
A mapping service and highly detailed and spatially accurate GIS vector data application that covers the whole country of Iran.
CedarMaps is the location data platform for mobile and web applications. We provide building blocks to add location features like maps, search, and navigation into any experience you create. Use our simple and powerful APIs & SDKs and our open source libraries for interactivity and control.
Not a CedarMaps user yet? Sign up for an account here. Once you’re signed in, all you need to start building is a CedarMaps access token.
This guide will take you through the process of integrating CedarMaps into your React Native application.
All the mentioned methods and tools in this document are tested on Android Studio v3.5.1 and Xcode 11.1 in October 2019.
Dependencies
Yarn
yarn add @cedarstudios/react-native-cedarmaps
Npm
npm install @cedarstudios/react-native-cedarmaps --save
Once you’ve set up your development environment, created a new React Native project, and installed the CedarMaps SDK for React Native, you’re ready to initialize a map in your App.js file.
First, you’ll import the components that you will need. This includes components from React, React Native, and CedarMaps.
To display a map you’ll need CedarMaps credentials (clientID
and clientSecret
). CedarMaps uses an access token generated from these to associate requests to API resources with your account.
Use the CedarMaps Map component, which is basically an extended MapView component, to initialize your map. The Map component will add a map to the view, and you can add props to specify some parameters for the map such as style and camera.
Here’s a sample code to display a map:
import React from 'react';
import {
StyleSheet,
StatusBar,
View
} from 'react-native';
import CedarMaps from '@cedarstudios/react-native-cedarmaps';
const App: () => React$Node = () => {
return (
<>
<StatusBar barStyle="dark-content" />
<CedarMaps.Map
style={styles.container}
clientId={"YOUR_CLIENT_ID"}
clientSecret={"YOUR_CLIENT_SECRET"}
mapStyle={"style://streets-light"}
>
<CedarMaps.Camera
zoomLevel={15}
centerCoordinate={[51.4093, 35.7546]}
/>
</CedarMaps.Map>
</>
);
};
const styles = StyleSheet.create({
container: {
flex: 1
}
});
export default App;
Other possible values for mapStyle
are:
style://streets-light
style://streets-dark
style://streets-light-raster
CedarMaps SDK is based on Mapbox Maps SDK for React Native v7.0.7.
CedarMaps Component is basically a wrapper component over MapboxGL with some added stuff. All methods and properties available on MapboxGL are available on CedarMaps as well.
getMap()
: Getting the map ref object.Mapbox has a plethora of examples for different use cases such as Showing User Location, Adding Annotations, etc. You can consult those here.
FAQs
A mapping service and highly detailed and spatially accurate GIS vector data application that covers the whole country of Iran.
The npm package @cedarstudios/react-native-cedarmaps receives a total of 0 weekly downloads. As such, @cedarstudios/react-native-cedarmaps popularity was classified as not popular.
We found that @cedarstudios/react-native-cedarmaps demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.