Get started with vue-cesium CDN

MIT licensed

Vue-Cesium: Vue.js library for Cesium 3D globe integration.

Tags:
  • Vue
  • Cesium
  • GIS
  • WebGIS

Stable version

Copied!

How to start using vue-cesium CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with vue-cesium CDN - cdnhub.io</title>
  <style>
    #cesiumContainer {
      width: 100%;
      height: 100vh;
    }
  </style>
</head>
<body>
  <div id="cesiumContainer"></div>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
  <script src="https://cdn.cdnhub.io/vue-cesium/3.2.6/index.full.min.js"></script>
  <script>
    Vue.use(Cesium.Vue);

    new Vue({
      el: '#cesiumContainer',
      data: {
        viewer: null,
      },
      mounted() {
        this.viewer = new Cesium.Viewer('cesiumContainer', {
          infoBox: false,
          timeline: false,
          baseLayerPicker: false,
          homeButton: false,
          scene3DOnly: true,
        });

        const position = Cesium.Cartesian3.fromDegrees(-105.25, 40.25, 5000.0);
        this.viewer.camera.setView(position);
      },
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions