Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@planet/maps

Package Overview
Dependencies
Maintainers
7
Versions
626
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planet/maps - npm Package Compare versions

Comparing version 8.0.0-dev.1666713300824 to 8.0.0-dev.1666714337006

2

package.json
{
"name": "@planet/maps",
"version": "8.0.0-dev.1666713300824",
"version": "8.0.0-dev.1666714337006",
"description": "Declarative mapping components for React",

@@ -5,0 +5,0 @@ "type": "module",

@@ -5,13 +5,17 @@ # @planet/maps

## Background
## Use
React lets you build interactive UIs with (mostly) declarative syntax. OpenLayers provides an imperative API for building mapping apps. It can be awkward to map React's component API to an imperative API. However, the React team provides a package for creating custom renderers: [`react-reconciler`](https://www.npmjs.com/package/react-reconciler). This is how they integrate with imperative APIs themselves. The `react-dom` package uses `react-reconciler` to provide a mapping to the imperative DOM API. `react-native` uses `react-reconciler` to map to imperative native APIs.
```
npm install @planet/maps
```
This library provides declarative mapping components representing imperative APIs from OpenLayers.
Import the components you need for your map. Provide an `options` prop to pass to the underlying OpenLayers constructor. Provide other props for values that you want to update with state changes.
## Example
```js
import Map from '@planet/maps/lib/Map';
import OSM from '@planet/maps/source/OSM';
import ScaleLine from '@planet/maps/control/ScaleLine';
import View from '@planet/maps/lib/View';
import WebGLTile from '@planet/maps/layer/WebGLTile';
Here is an example of what a map looks like with components from this package:
```js
function MyApp() {

@@ -32,2 +36,8 @@ return (

## Background
React lets you build interactive UIs with (mostly) declarative syntax. OpenLayers provides an imperative API for building mapping apps. It can be awkward to map React's component API to an imperative API. However, the React team provides a package for creating custom renderers: [`react-reconciler`](https://www.npmjs.com/package/react-reconciler). This is how they integrate with imperative APIs themselves. The `react-dom` package uses `react-reconciler` to provide a mapping to the imperative DOM API. `react-native` uses `react-reconciler` to map to imperative native APIs.
This library provides declarative mapping components representing imperative APIs from OpenLayers.
## Design Goals

@@ -34,0 +44,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc