13.1.0 • Published 22 days ago

hslayers-cesium-app v13.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
22 days ago

Installation

npm install hslayers-cesium-app

Create empty html page and include <hslayers-cesium-app></hslayers-cesium-app> Where you want the map to appear (See example).

Include HSLayers-NG styles in page <head>:

<link rel="stylesheet" href="node_modules/hslayers-cesium-app/styles.css">

Include hslayers-cesium-app bundle scripts after <hslayers-cesium-app>:

<script src="node_modules/hslayers-cesium-app/runtime.js"></script>
<script src="node_modules/hslayers-cesium-app/polyfills-es5.js"></script>
<script src="node_modules/hslayers-cesium-app/polyfills.js"></script>
<script src="node_modules/hslayers-cesium-app/vendor.js"></script><!-- Must be included since 4.x -->
<script src="node_modules/hslayers-cesium-app/main.js"></script>

Configuration

A global hslayersNgConfig function and cesium specific hslayersCesiumConfig, which return a configuration objects, NEED TO BE CREATED BEFORE loading the main.js script. Functions return a JSON objects that describes the application's look, behavior and data to display. See Hslayers configuration options and Cesium configuration options for the list of available config options. HSLayers-ng exposes OpenLayers as global 'ol' variable, which is used in defining layers and configuration. Example

<script>
    function hslayersNgConfig(ol) {
      return {
        assetsPath: 'node_modules/hslayers-cesium-app/assets/',
        default_layers: [],

        default_view: new ol.View({
          center: ol.proj.fromLonLat([17.474129, 52.574000]),
          zoom: 4,
        })
      }
    } 

    function hslayersCesiumConfig() {
        return {
          cesiumBase: 'node_modules/hslayers-cesium-app/assets/cesium/',
        };
      }
  </script>
14.0.0-next.2

22 days ago

14.0.0-next.1

29 days ago

13.1.0

2 months ago

13.0.0

6 months ago

12.1.0

7 months ago

12.0.0

9 months ago

11.0.0

1 year ago

10.0.0

2 years ago

10.0.0-next.0

2 years ago

9.3.0

2 years ago

9.2.0

2 years ago

9.1.0

2 years ago

9.0.0

2 years ago

8.1.0

2 years ago

8.0.1

2 years ago

7.0.0

2 years ago

8.0.0

2 years ago

7.0.2

2 years ago

7.0.1

2 years ago

6.0.0

3 years ago

5.1.0

3 years ago

5.0.0

3 years ago

4.0.0

3 years ago

4.0.0-rc1

3 years ago