cesiumvectortile
Cesium VectorTileImageryProvider
Last updated 4 months ago by weixiuyong .
Original npm · Tarball · package.json
$ cnpm install cesiumvectortile 
SYNC missed versions from official npm registry.

Cesium VectorTileImageryProvider 支持小数据量的geojson、shape文件矢量动态切片,实现贴地

npm 安装

    npm install cesiumvectortile

示例:

        VectorTileImageryProvider = Cesium.VectorTileImageryProvider;

        viewer = new Cesium.Viewer("cesiumContainer");
        var imageryProviderViewModels = viewer.baseLayerPicker.viewModel.imageryProviderViewModels;
        viewer.baseLayerPicker.viewModel.selectedImagery = imageryProviderViewModels[imageryProviderViewModels.length - 1];
        viewer.scene.debugShowFramesPerSecond = true;
        
        var provinceLayer = null;
        var provinceProvider = new VectorTileImageryProvider({
            source: appConfig.BaseURL + "Assets/Data/json/china_province.geojson",
            defaultStyle: {
                outlineColor: "rgb(255,255,255)",
                lineWidth: 2,
                fill: false,
                tileCacheSize: 200
            },
            maximumLevel: 20,
            minimumLevel: 1,
            simplify: false
        });
        provinceProvider.readyPromise.then(function () {
            provinceLayer = viewer.imageryLayers.addImageryProvider(provinceProvider);
        });

        var worldLayer = null;
        var worldProvider = new VectorTileImageryProvider({
            source: appConfig.BaseURL + "Assets/Data/shp/world/国家简化边界.shp",
            defaultStyle: {
                outlineColor: "rgb(255,0,0)",
                lineWidth: 1,
                fill: false,
                tileCacheSize: 200,
                showMaker: false,
                showCenterLabel: true,
                fontColor: "rgba(255,0,0,1)",
                labelOffsetX: -10,
                labelOffsetY: -5,
                fontSize: 13,
                fontFamily: "黑体",
                centerLabelPropertyName: "NAME"
            },
            maximumLevel: 20,
            minimumLevel: 1,
            simplify: false
        });
        worldProvider.readyPromise.then(function () {
            worldLayer = viewer.imageryLayers.addImageryProvider(worldProvider);
        });
依赖
更新
2020.03.17
  • 1、支持leaflet(仅支持EPSG4326);
  • 2、解决与第三方库(如Vue)结合的一些问题。
2019.06.03
  • 1、支持要素查询:增加构造函数可选参数allowPick,事件featuresPicked
2018.07.15:
  • 1、支持虚线和阴影
2018.07.14:
  • 1、支持最新版Cesium;
  • 2、支持以注记的方式显示关键属性,如地名等。

Current Tags

  • 1.2.0                                ...           latest (4 months ago)

11 Versions

  • 1.2.0                                ...           4 months ago
  • 1.1.9                                ...           5 months ago
  • 1.1.8                                ...           5 months ago
  • 1.1.7                                ...           5 months ago
  • 1.1.6                                ...           5 months ago
  • 1.0.6                                ...           10 months ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 11
Last Day 0
Last Week 10
Last Month 48
Dependencies (0)
None
Dev Dependencies (20)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |