环境:Vue2.6.11、OpenLayers6.5.0
需求:OpenLayers6使用WebGL方式加载50万个点

<template>
    <div class="earth">
        <div id="ol-container"></div>
    </div>
</template>

<script>
    import 'ol/ol.css';
    import Map from 'ol/Map';
    import View from 'ol/View';
    import proj from 'ol/proj';
    import TileLayer from 'ol/layer/Tile';
    import OSM from 'ol/source/OSM';
    import VectorSource from 'ol/source/Vector';
    import Point from 'ol/geom/Point';
    import Feature from 'ol/Feature';
    import VectorLayer from 'ol/layer/Vector';
    import Style from 'ol/style/Style';
    import WebGLPointsLayer from 'ol/layer/WebGLPoints';

export default {
    name: 'Earth',
    mounted() {
        this.initMap();
        this.test();
    },
    methods: {
        initMap() {
            window.map = new Map({
                target: 'ol-container

此内容 登录注册 后可见
说点什么吧...