mapbox制作动态地图——storytelling(附html代码)

mapbox-gl开发:动态画线标绘 在mapbox-gl地图上,实现动态画线的效果,点击左键增加画线的点,鼠标移动,实现线随着鼠标移动位置的效果,点击右键结束画线。 mapbox-gl接口实现标绘数据存储在geojson数据中,通过添加数据源、修改数据源,实现地图上的标绘数据实时更新。 //添加geojson数据源: this.map.addSource(this.sourceid, { type: 'geojson', data: this.geojsondata }) 阅读详情

        相信大家不管是在日常工作,还是制作自己的博客,都希望有炫酷且能准确get到使用者的页面,大家可以参考以下代码:

config.js:

var config = {
    style: 'mapbox://styles/branigan/cjzsvonse027m1co4nkxp13b3',
    accessToken: 'pk.eyJ1IjoibWJ4c29sdXRpb25zIiwiYSI6ImNrMm01aG9hdTBlZGwzbXQ1ZXVrNHNmejAifQ.QHQA0N6XPWddCXtvoODHZg',
    showMarkers: false,
    theme: 'light',
    title: '',
    subtitle: '',
    byline: '',
    footer: '',
    chapters: [
        {
            id: 'phl',
            alignment: 'right',
            title: 'Philadelphia Bicycle Infrastructure',
            image: '',
            description: 'Getting around Philadelphia on two wheels is fast, fun, and cheap. As a typical East Coast large city, the urban core is dense, so there is a lot within reach of a 15 minute ride... even mountain bike trails. Paired with the public transit infrastructure, cycling can be more efficient and much less expensive than driving (and parking) a car.',
            location: {
                center: [-75.13080, 39.97790],
                zoom: 9.83,
                pitch: 0.00,
                bearing: 0.00
            },
            onChapterEnter: [
                {
                    layer: 'phl-city-limits',
                    opacity: .45
                }
            ],
            onChapterExit: [
                {
                    layer: 'phl-city-limits',
                    opacity: 0
                }
            ]
        },
        {
            id: 'bike-lanes',
            alignment: 'right',
            title: 'Bike Lanes',
            image: '',
            description: 'Philadelphia has XX miles of bike lanes, XX miles of which are protected. Drivers are getting more used to sharing the road, but ride defensively.',
            location: {
                center: [-75.13901, 39.97085],
                zoom: 11.62,
                pitch: 55.50,
                bearing: -7.20
            },
            onChapterEnter: [
                {
                    layer: 'phl-bike-network',
                    opacity: 1
                }
            ],
            onChapterExit: []
        },
        {
            id: 'indego',
            alignment: 'right',
            title: 'Indego Bike Share',
            image: '',
            description: 'Indego has been operating in Philadelphia since 20XX. The system initally was focused on Center City, but has expanded service to neighboring areas to support equitable mobility options to the city\'s residents.',
            location: {
                center: [-75.16468, 39.94503],
                zoom: 13.15,
                pitch: 60.00,
                bearing: -16.80
            },
            onChapterEnter: [
                {
                    layer: 'indego-stations',
                    opacity: 0.8
                }
            ],
            onChapterExit: [
                {
                    layer: 'indego-stations',
                    opacity: 0
                }
            ]
        },
        {
            id: 'belmont',
            alignment: 'right',
            title: 'Belmont Plateau Trails',
            image: '',
            description: 'A short ride along the Schuylkill River Trail from the Art Museum, Belmont is a twisty, log-ridden rollercoaster of a trail network. It is easy to get turned around, the underbrush is at times impenetrable, and short steep sections come out of nowhere. In other words, it\'s really fun',
            location: {
                center: [-75.20325, 39.99574],
                zoom: 14.99,
                pitch: 44.00,
                bearing: -40.00
            },
            onChapterEnter: [
                {
                    layer: 'belmont',
                    opacity: 1
                }
            ],
            onChapterExit: [
                {
                    layer: 'belmont',
                    opacity: 0
                }
            ]
        },
        {
            id: 'wiss',
            alignment: 'right',
            title: 'Wissahickon Park Trails',
            image: '',
            description: 'This steep, rocky gorge can be surprisingly technical. Follow the orange and yellow trails to repeatedly climb and descend through the schist hillsides (careful of the cliffs), or stick to the gravel Forbidden Drive for a relaxing ride along the creek. You\'ll forget you\'re in a city.',
            location: {
                center: [-75.21223, 40.05028],
                zoom: 13.08,
                pitch: 47.50,
                bearing: 32.80
            },
            onChapterEnter: [
                {
                    layer: 'wissahickon',
                    opacity: 1
                }
            ],
            onChapterExit: [
                {
                    layer: 'wissahickon',
                    opacity: 0
                }
            ]
        },
        {
            id: 'pennypack',
            alignment: 'right',
            title: 'Pennypack Park Trails',
            image: '',
            description: 'Pennypack is a great introduction trail system. Not too steep and not too technical, the beautiful wooded park also provides a great escape from urban life. The south side trails are originally bridle trails, so be nice to equestrians and dismount when you approach them.',
            location: {
                center: [-75.05685, 40.06839],
                zoom: 13.73,
                pitch: 43.50,
                bearing: 96.80
            },
            onChapterEnter: [
                {
                    layer: 'pennypack',
                    opacity: 1
                }
            ],
            onChapterExit: [
                {
                    layer: 'pennypack',
                    opacity: 0
                }
            ]
        }
    ]
};

index.html

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8' />
    <title>Mapbox Storytelling</title>
    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
    <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v2.0.0/mapbox-gl.js'></script>
    <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v2.0.0/mapbox-gl.css' rel='stylesheet' />
    <script src="https://unpkg.com/intersection-observer@0.5.1/intersection-observer.js"></script>
    <script src="https://unpkg.com/scrollama"></script>
    <style>
        body {
            margin:0;
            padding:0;
            font-family: sans-serif;
        }
        a, a:hover, a:visited {
            color: #0071bc;
        }
        #map {
            top:0;
            height: 100vh;
            width:100vw;
            position: fixed;
        }
        #header {
            margin: auto;
            width: 100%;
            position: relative;
            z-index: 5;
        }
        #header h1, #header h2, #header p {
            margin: 0;
            padding: 2vh 2vw;
            text-align: center;
        }
        #footer {
            width: 100%;
            min-height: 5vh;
            padding-top: 2vh;
            padding-bottom: 2vh;
            text-align: center;
            line-height: 25px;
            font-size: 13px;
            position: relative;
            z-index: 5;
        }
        #features {
            padding-top: 10vh;
            padding-bottom: 10vh;
        }
        .hidden {
            visibility: hidden;
        }
        .centered {
            width: 50vw;
            margin: 0 auto;
        }
        .lefty {
            width: 33vw;
            margin-left: 5vw;
        }
        .righty {
            width: 33vw;
            margin-left: 62vw;
        }
        .fully {
            width: 100%;
            margin: auto;
        }
        .light {
            color: #444;
            background-color: #fafafa;
        }
        .dark {
            color: #fafafa;
            background-color: #444;
        }
        .step {
            padding-bottom: 50vh;
            /* margin-bottom: 10vh; */
            opacity: 0.25;
        }
        .step.active {
            opacity: 0.9;
        }

        .step div {
            padding:  25px 50px;
            line-height: 25px;
            font-size: 13px;
        }

        .step img {
            width: 100%;
        }

        @media (max-width: 750px) {
            .centered, .lefty, .righty, .fully {
                width: 90vw;
                margin: 0 auto;
            }
        }

        /* Fix issue on mobile browser where scroll breaks  */
        .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,
        .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas {
            touch-action: unset;
        }

        </style>
</head>
<body>

<div id="map"></div>
<div id="story"></div>
<script src="./config.js"></script>
<script>
var layerTypes = {
    'fill': ['fill-opacity'],
    'line': ['line-opacity'],
    'circle': ['circle-opacity', 'circle-stroke-opacity'],
    'symbol': ['icon-opacity', 'text-opacity'],
    'raster': ['raster-opacity'],
    'fill-extrusion': ['fill-extrusion-opacity'],
    'heatmap': ['heatmap-opacity']
}

var alignments = {
    'left': 'lefty',
    'center': 'centered',
    'right': 'righty',
    'full': 'fully'
}

function getLayerPaintType(layer) {
    var layerType = map.getLayer(layer).type;
    return layerTypes[layerType];
}

function setLayerOpacity(layer) {
    var paintProps = getLayerPaintType(layer.layer);
    paintProps.forEach(function(prop) {
        var options = {};
        if (layer.duration) {
            var transitionProp = prop + "-transition";
            options = { "duration": layer.duration };
            map.setPaintProperty(layer.layer, transitionProp, options);
        }
        map.setPaintProperty(layer.layer, prop, layer.opacity, options);
    });
}

var story = document.getElementById('story');
var features = document.createElement('div');
features.setAttribute('id', 'features');

var header = document.createElement('div');

if (config.title) {
    var titleText = document.createElement('h1');
    titleText.innerText = config.title;
    header.appendChild(titleText);
}

if (config.subtitle) {
    var subtitleText = document.createElement('h2');
    subtitleText.innerText = config.subtitle;
    header.appendChild(subtitleText);
}

if (config.byline) {
    var bylineText = document.createElement('p');
    bylineText.innerText = config.byline;
    header.appendChild(bylineText);
}

if (header.innerText.length > 0) {
    header.classList.add(config.theme);
    header.setAttribute('id', 'header');
    story.appendChild(header);
}

config.chapters.forEach((record, idx) => {
    var container = document.createElement('div');
    var chapter = document.createElement('div');

    if (record.title) {
        var title = document.createElement('h3');
        title.innerText = record.title;
        chapter.appendChild(title);
    }

    if (record.image) {
        var image = new Image();
        image.src = record.image;
        chapter.appendChild(image);
    }

    if (record.description) {
        var story = document.createElement('p');
        story.innerHTML = record.description;
        chapter.appendChild(story);
    }

    container.setAttribute('id', record.id);
    container.classList.add('step');
    if (idx === 0) {
        container.classList.add('active');
    }

    chapter.classList.add(config.theme);
    container.appendChild(chapter);
    container.classList.add(alignments[record.alignment] || 'centered');
    if (record.hidden) {
        container.classList.add('hidden');
    }
    features.appendChild(container);
});

story.appendChild(features);

var footer = document.createElement('div');

if (config.footer) {
    var footerText = document.createElement('p');
    footerText.innerHTML = config.footer;
    footer.appendChild(footerText);
}

if (footer.innerText.length > 0) {
    footer.classList.add(config.theme);
    footer.setAttribute('id', 'footer');
    story.appendChild(footer);
}

mapboxgl.accessToken = config.accessToken;

const transformRequest = (url) => {
    const hasQuery = url.indexOf("?") !== -1;
    const suffix = hasQuery ? "&pluginName=scrollytellingV2" : "?pluginName=scrollytellingV2";

    return {
      url: url + suffix
    }
}

var map = new mapboxgl.Map({
    container: 'map',
    style: config.style,
    center: config.chapters[0].location.center,
    zoom: config.chapters[0].location.zoom,
    bearing: config.chapters[0].location.bearing,
    pitch: config.chapters[0].location.pitch,
    interactive: false,
    transformRequest: transformRequest
});

if (config.showMarkers) {
    var marker = new mapboxgl.Marker({ color: config.markerColor });
    marker.setLngLat(config.chapters[0].location.center).addTo(map);
}

// instantiate the scrollama
var scroller = scrollama();

map.on("load", function() {
    if (config.use3dTerrain) {
        map.addSource('mapbox-dem', {
            'type': 'raster-dem',
            'url': 'mapbox://mapbox.mapbox-terrain-dem-v1',
            'tileSize': 512,
            'maxzoom': 14
        });
        // add the DEM source as a terrain layer with exaggerated height
        map.setTerrain({ 'source': 'mapbox-dem', 'exaggeration': 1.5 });

        // add a sky layer that will show when the map is highly pitched
        map.addLayer({
            'id': 'sky',
            'type': 'sky',
            'paint': {
                'sky-type': 'atmosphere',
                'sky-atmosphere-sun': [0.0, 0.0],
                'sky-atmosphere-sun-intensity': 15
            }
        });
    };

    // setup the instance, pass callback functions
    scroller
    .setup({
        step: '.step',
        offset: 0.5,
        progress: true
    })
    .onStepEnter(response => {
        var chapter = config.chapters.find(chap => chap.id === response.element.id);
        response.element.classList.add('active');
        map[chapter.mapAnimation || 'flyTo'](chapter.location);

        if (config.showMarkers) {
            marker.setLngLat(chapter.location.center);
        }
        if (chapter.onChapterEnter.length > 0) {
            chapter.onChapterEnter.forEach(setLayerOpacity);
        }
        if (chapter.callback) {
            window[chapter.callback]();
        }
        if (chapter.rotateAnimation) {
            map.once('moveend', function() {
                const rotateNumber = map.getBearing();
                map.rotateTo(rotateNumber + 90, {
                    duration: 24000, easing: function (t) {
                        return t;
                    }
                });
            });
        }
    })
    .onStepExit(response => {
        var chapter = config.chapters.find(chap => chap.id === response.element.id);
        response.element.classList.remove('active');
        if (chapter.onChapterExit.length > 0) {
            chapter.onChapterExit.forEach(setLayerOpacity);
        }
    });
});

// setup resize event
window.addEventListener('resize', scroller.resize);

</script>

</body>
</html>

效果如图:

 

使用mapbox+turf.js完成迁徙图,流向图教程 尽管它这段弧线不是很明显,因为它的角度比较大,因此如果距离短的话,几乎就是一条直线,为了优化这一缺陷。我们可以配合另一个函数叫做:bezierSpline,这个函数是贝塞尔曲线函数,它能够将一段折线变得更加平滑,我们把greatCircle的结果放入bezierSpline中就会让这条线更有弧度。首先我们要把思路捋清楚,迁徙图表示的是从一个点出发向多个点均有流向(这个流向用线条表示)或者是从多个地方向一个地方汇总。也就是一对多或者是多对一,这里面的多和一都是城市位置,也就是经纬度坐标点。 阅读详情

相关推荐

mapbox基础,加载视频到地图

本文详细介绍如何基于mapbox-gl v3.*.* 版本,加载视频到地图,亲测可用。希望能帮助到您。一起学习,加油!加油!

我哎GIS博客 440

Mapbox Sprite精灵图生成

sprite 文件主要是将一堆小图生成一种大图的方法,并且将每张小图的位置信息保存下来,方便读取。在网络请求中会减少请求的数量,mapbox借鉴前端中CSS Sprite方法存储图标信息的。sprite.png文件保存图标,sprite.json保存名称及位置信息,下图图展示的是小图标与大图文件的示例。下面我讲一下两种文件转换。 ...

DX奥特曼的博客 5088

Flutter for web 首次加载过慢问题优化

Flutter web 加载慢优化

Bright_TY的专栏 7836

Mapbox GL JS实现炫酷的地图背景

经常看到网上的各种地图,有着炫酷的地图背景,用户体验非常不错。在Mapbox GL JS这块,其实关于地图的背景没有太多的设置。但当我们想基于Mapbox GL JS实现炫酷的地图背景改怎么办呢?这里我从三方面介绍一下,如何实现炫酷的Mapbox GL JS地图背景,建议使用第三种。

做GIS梦的人 2356

总结目前开源的视频生成/视频编辑大模型

随着Sora的爆火,视频生成和视频编辑受到了越来越多的关注。这篇博客总结一下目前开源的视频生成和视频编辑的大模型,并分析他们各自的优缺点,以及在自己进行科研任务或者工作中应该如何选用对应的开源模型,希望能给从事这一领域研究和使用的小伙伴们帮助。

沉迷单车的追风少年 3550

RK3588 , 基于mpp 解码 Jpeg To RGB

本文介绍了在RK3588开发板上使用Rockchip MPP(Media Process Platform)硬件加速接口将JPEG图像解码为RGB格式的完整流程。主要包括三个关键步骤:1) 读取JPEG文件数据;2) 配置MPP解码器,包括初始化上下文、设置RGB888输出格式和解码参数;3) 执行解码任务并将结果保存为图像文件。通过硬件加速,该方法能高效完成JPEG到RGB的转换,适用于嵌入式多媒体处理场景。

J。 1212

MapBox GL集成自定义Canvas制作动态效果

问题描述 当我们在使用MapBox过程中,有时需要添加动态图标或者一些其他复杂的效果。由于MapBox未提供添加GIF格式图片的接口。所以添加起来比较麻烦。而往往这些效果使用HTML或使用Canvas绘制很容易实现,所以本文主要介绍如何在MapBox中集成HTML或集成自定义Canvas效果。 相关接口 MapBox提供了addImage(id,image,options)方法,其具体介绍如下: ...

giscoder的博客 5013

[明道云] -基础教学1- 创建第一个工作表:从 0 到实用

明道云工作表相当于数据库表,是存储业务数据的核心组件。创建工作表主要有两种方式:1)从空白新建,通过添加字段(最多200个)、设置属性、配置表单样式;2)从Excel导入,需选择sheet、配置字段映射。创建后系统自动生成默认视图,支持多种视图形式(看板/日历等)。建议设置合适的标题字段和关联关系,初学者可在一小时内完成基础应用搭建。后续可扩展权限控制、工作流自动化等功能。

每日出拳老爷子的博客 558

Mapbox实现蒙版掩膜效果

Mapbox实现蒙版掩膜效果

Sakura1998gis的博客 1272

2025年06月中国电子学会青少年软件编程(Python)等级考试试卷(二级)答案 + 解析

2025年06月中国电子学会青少年软件编程(Python)等级考试试卷(二级)答案 + 解析

伶俐角少儿编程 463

lammps蒙特卡洛MC模拟案例

在lammps中,和MC相关的模拟命令有三个:fix gcmc、fix atom/swap、fix sgcmc。在一个lammps模拟中,mc和md可同时存在,间隔运行,所以设置fix sgcmc命令的同时,可以同时设置系综(nve、nvt或者npt)。lammps官网自带案例中也有一个fix sgcmc的案例,主要模拟FeCu合金的MC建模。sgcmc命令可应用到合金的模拟中,如短程有序模拟。MC运行间隔为100步,最终的浓度比例为0.02,也就是2%的Fe原子交换为Cu原子。大家好,我是小马老师。

lammps_jiayou的博客 1829

mapbox gl+tween.js实现地图服务渐入渐出效果

mapbox gl+tween.js实现地图服务渐入渐出效果

taozi8957的博客 393

无人驾驶Autoware导读

认知有限,望大家多多包涵,有什么问题也希望能够与大家多交流,共同成长!本文先对无人驾驶Autoware介绍做个简单的介绍,具体内容后续再更,其他模块可以参考去我其他文章提示:以下是本篇文章正文内容。

qq_35635374的博客 2399

地图框架之mapbox——(六)

今天跟大家分享一下popup、标注、以及canvas,到这里基本上mapbox的基本内容也就告一段落,后续根据我在工作中遇到的问题再做相关的分享。核心逻辑:把canvas动画与layout结合添加到图层中设置图层样式。首先记住标记不是图层,他只是作为一个单独的对象,被添加到地图上了。1、popup和marker结合使用。3、通过点击事件添加canvas动画。一、标注(marker)1、设置canvas动画。2、封装canvas动画。六、控制图层的显示和隐藏。1、如何向地图添加标记。四、canvas动画。

qq_45751819的博客 1958

C#实现OPC客户端与S7-1200 PLC通信:工控场景稳定通信的实战指南(附完整代码)

标准化优先:OPC UA是工业通信的标准,相比直接通信,更适合多设备集成的工控场景;稳定性第一:必须封装断线重连、异常处理、资源释放逻辑,满足7×24小时运行需求;效率优化:高频采集场景优先用批量读写,避免单个变量频繁请求;细节把控:节点ID、变量类型、端口配置等细节是新手最容易踩坑的地方,建议先用UA Expert验证。这套代码和方案已在多个工业项目中落地,从单台S7-1200到多台S7-1200/1500集群,都能稳定运行。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 1044

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

【MAPBOX基础功能】24、mapbox通过canvas方式绘制波纹点位

mapbox通过canvas方式绘制波纹点位

汪同学丶的博客 1029

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

Mapbox HTML可视化点,线,多线,面带底图

Mapbox HTML可视化点,线,多线,面带底图1. 效果图2. 源码参考 1. 效果图 如下所示:可显示蓝色点、红色线、红色多线、浅紫色多边形面; 2. 源码 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Add multiple geometries from one GeoJSON source</title> <meta

qq_40985985的博客 1970

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

mapbox使用

一、实例化化地图https://www.mapbox.com/mapbox-gl-js/example/simple-map/ <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.js'></script> <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.css' rel='style.

qq_43159578的博客 2557

使用mapbox实现动态轨迹,设置对象图标,点击弹出框

mapbox动态轨迹及对象标识、还有弹出框

weixin_41165803的博客 5125

uniapp 3D地图 效果模拟 mapbox 或者 其他设备

module="mapContainer" lang="renderjs" 的更改。如果你还添加一些东西怎么办呢 只需要在加一个script 就可以了。一, mapbox 地图 先进行数据的引入 然后在行。腾讯位置服务 - 立足生态,连接未来 (qq.com)二, uniapp 腾讯地图的 使用方式。首先打开uniapp 找到 地图选项。

weixin_68266812的博客 2312

使用mapboxgl实现实时车辆移动效果,并优化卡顿

mapboxgl 方法 这个在最初实现功能的时候出现过,最初使用source源和layer的方式添加及setData更新的方式,但数据过多时页面卡顿严重,后续经过几个方法的实现,最后上文中是最优方式,目前demo中数据量也不会造成卡顿。以服务形式启动就可以查看了。

m0_45456399的博客 1696

mapbox一学就会系列:01 第一个地图页面

最近开始入坑前端mapbox地图,跟大家一起慢慢深入学习mapboxhttps://docs.mapbox.com/mapbox-gl-js/guides/Mapbox GL JS 是一个客户端JavaScript库,用于使用Mapbox的现代地图技术构建web地图和web应用程序。您可以使用Mapbox GL JS在web浏览器或客户端中显示Mapbox地图,添加用户交互性,并在应用程序中定制地图体验。 npm 形式安装 然后引入 2.使用方法 无账号则申请,有账号则登录 申请地址:https://ac

成茂峰 1万+

mapboxgl 中热力图的实现以及给热力图点增加鼠标移上 popup 效果

注意:因为热力图本身不可以添加鼠标以上效果,所以还是使用了点,将鼠标以上效果加给点,然后把点的透明度设置为0,大小和热力图中点相同,即可完成上图中效果。注意:vue中引入图片要使用require引入,路径不能以传参的形式传入,最好写相对路径。本篇文章还是关于最近做到的 mapboxgl 地图展开的。本方法主要还是使用点和热力图重叠同时显示效果。

李水灵的博客 1867

Mapbox 添加标记点(一)

效果图: 实现: map组件: <template> <div style="height: 100%; width: 100%; text-align: left"> <div ref="basicMapbox" :style="mapSize" class="mapClass"></div> </div> </template> <script> import mapboxgl from 'mapbox

不同场景下的水平居中 3337

MapBox GL JS动态空间数据渲染策略

动态空间数据是指面向主题的、集成的、动态更新的、持久的空间数据集合。 在开发过程中经常用到动态数据:数据某个属性需要实时更新。例如:全省各地区的污染值数据,污染值数据是实时更新的。 如果我们想按照污染值对地区渲染不同的颜色,并可以在前端查询历史数据,我们无法按照传统的方法,将污染值信息作为一个字段将其发布成服务,因为这个字段实时更新,如果要实时更新修改数据服务,会非常麻烦,如果还想查询历史数据...

ScapeD的博客 3045

mapbox-gl中的web墨卡托转换

mapbox-gl的api开放了web墨卡托和经纬度的转换,直接使用mapbox-gl的api能够进行web墨卡托的坐标操作。 api说明网址: https://docs.mapbox.com/mapbox-gl-js/api/geography/#mercatorcoordinate web墨卡托的坐标说明: http://epsg.io/3857 api使用说明 将经纬度坐标转换成web墨卡托坐标,包含了高度的信息: let modelAsMercatorCoordinate = mapboxgl.Me

地理信息技术杂谈 博客,欢迎技术交流 2194
上一篇: (三)django后台admin接收excel等文件对数据库增添删改(Django+Vue+Mysql,数据库管理数据分析网站)
下一篇: python折线图保存后是空白怎么办?
唐开甲
博客等级 码龄6年 343粉丝 6原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

唐开甲

共勉

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值