# aframe-wms-component

> WMS (Web Map Service) in A-Frame

Latest version **1.0.2** (published 2017-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install aframe-wms-component
pnpm add aframe-wms-component
yarn add aframe-wms-component
bun add aframe-wms-component
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-11-16 |
| First published | 2017-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Luis Calisto |
| Maintainers | lcalisto |
| Keywords | aframe, aframe-component, aframe-vr, vr, mozvr, webvr, wms, wms-service, gis |

## Links

- npm: https://www.npmjs.com/package/aframe-wms-component
- Repository: https://github.com/lcalisto/aframe-wms-component
- Issues: https://github.com/lcalisto/aframe-wms-component/issues
- npm.io page: https://npm.io/package/aframe-wms-component

## Recent versions

- 1.0.2 (latest) — 2017-11-16
- 1.0.1 — 2017-11-16
- 1.0.0 — 2017-11-15

## README

# aframe-wms-component

An A-Frame component to deal with WMS (Web Map Service).

This library implements a WMS GetMap request, the result is a single image which is added into the component material _"SRC:"_ parameter. 

Make sure you request a valid WMS with the correct parameters.

Example with a globe:
![Example](doc/globe.png)

### Schema

| Property | Description | Default Value | Required |
| -------- | ----------- | ------------- | ---- |
| **url** | The main URL of the WMS. | | true|
| **bbox** | The bonding box of the requested area.  | | true |
| **projection** | The projection. This projection must be available in the WMS.  | | true |
| **layers** | The WMS layers which will be requested.  | | true |
| **width** | Image request width. It is recommended to change this value according to your needs.   | 250 px | false |
| **height** | Image request height. It is recommended to change this value according to your needs.   | 250 px | false |
| **version** | The WMS version.  | 1.3.0 | false |
| **format** | The image format.  | png | false |
| **transparent** | If true the resulting image will allow transparency.   | true | false |
| **styles** | Used for specify the WMS/layer styles.   | none | false |

### Installation


#### npm

Via npm:

```bash
npm install aframe-wms-component
```

Then

```js
require('aframe');
require('aframe-wms-component');
```

#### Directly including the [minified file](dist)

```html
<html>
  <head>
    <title>A-Frame WMS Component - Simple example</title>
    <meta name="description" content="Simple example for WMS component in a flat panel."></meta>
        <script src="https://aframe.io/releases/0.7.1/aframe.min.js"></script> 
    <script src="https://unpkg.com/aframe-wms-component/dist/aframe-wms-component.min.js"></script> 
  </head>
  <body>
    <a-scene>
      <a-assets>
      </a-assets>
      <a-entity position="1 1.8 -2">
        <a-entity 
        material="color: #000;opacity:1;"
        geometry="primitive: plane; width:4;height:2;"
          wms="
          url: http://ows.terrestris.de/osm/service;
          bbox: -88,-180,88,180;
          projection: EPSG:4326;
          version: 1.3.0;
          format: PNG;
          layers: OSM-WMS;
          width: 4048;
          height: 2024;
          "
         /></a-entity>
        </a-entity>
    </a-scene>
  </body>
</html>
```

### Examples

[Simple plane](https://lcalisto.github.io/aframe-wms-component/examples/simple/)

[Rotating globe and a plane](https://lcalisto.github.io/aframe-wms-component/examples/rotating/)

[Inverted globe](https://lcalisto.github.io/aframe-wms-component/examples/inverted/)


### Further development
A WMS Get Feature Info request based on the raycaster may be implemented in future releases.

---
_Source: https://npm.io/package/aframe-wms-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
