npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cedarstudios/react-native-cedarmaps

v2.0.0

Published

A mapping service and highly detailed and spatially accurate GIS vector data application that covers the whole country of Iran.

Downloads

13

Readme

CedarMasp SDK for React Native

What is CedarMaps?

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.

Sign up for CedarMaps

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.

Table of Contents

Installation

Dependencies

Yarn

yarn add @cedarstudios/react-native-cedarmaps

Npm

npm install @cedarstudios/react-native-cedarmaps --save

Platform Specific Installation Guides

Getting Started

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:

Vector Tiles (Recommended)

  • style://streets-light
  • style://streets-dark

Raster Tiles

  • style://streets-light-raster

Documentation

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.

Functions

  • getMap(): Getting the map ref object.

Components

Sources

Layers

Examples

Mapbox has a plethora of examples for different use cases such as Showing User Location, Adding Annotations, etc. You can consult those here.