mapbox

基于 QGIS 在内网中离线加载卫星地图的方法

戏子无情 提交于 2020-08-05 18:10:54
1. 概述 我们之前为大家分享过在三维地球开源平台离线加载卫星影像的方法,主要包括基于桌面端的OsgEarth开源三维地球和基于Web端的Cesium开源三维地球等平台的局域网离线影像加载。 另外,也为大家分享过在二维开源平台离线加载卫星影像的方法,主要包括基于OpenLayers的内网WebGIS离线部署、基于MapBox的内网WebGIS离线部署和基于 GoogleMap 离线 API 在内网中加载离线卫星地图等具体操作方法。 但由于有客户咨询过如何在QGIS中离线加载谷歌卫星影像的问题,因此觉得有必要再针对这个问题为大家作一下分享。 那么什么是QGIS呢? QGIS原称为Quantum GIS,是一个用户界面友好的开源桌面端软件,支持数据的可视化、管理、编辑、分析以及印刷地图的制作,并支持多种矢量、栅格与数据库格式及功能。 你也可以简单粗暴地把它理解为是一个开源且免费的ArcGIS,因为它和ArcGIS一样都有着很多非常强大的GIS功能。 2. 准备工作 在开始之前,需要先准备离线数据发布软件、离线卫星影像示例数据、QGIS安装包和本机IP地址等。 地图发布软件: 需要在内网发布离线卫星影像,请确保地图发布服务中间件版本为4.0.6以上,如果低于该版本,请通过私信并回复"中间件"免费获取最新版本安装包,也可以直接在水经注官方网站下载。 离线示例数据:

地图开发中WebGL着色器32位浮点数精度损失问题

前提是你 提交于 2020-08-05 10:45:12
以下内容转载自木的树的文章《WebGL着色器32位浮点数精度损失问题》 作者:木的树 链接: https://www.cnblogs.com/dojo-lzz/p/11250327.html 来源:博客园 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 前言 Javascript API GL 是基于WebGL技术打造的3D版地图API,3D化的视野更为自由,交互更加流畅。 提供丰富的功能接口,包括点、线、面绘制,自定义图层、个性化样式及绘图、测距工具等,使开发者更加容易的实现产品构思。 充分发挥GPU的并行计算能力,同时结合WebWorker多线程技术,大幅度提升了大数据量的渲染性能。最高支持百万级点、线、面绘制,同时可以保持高帧率运行。 同步推出基于Javascript API GL的 位置数据可视化API库 ,欢迎体验。 问题 WebGL浮点数精度最大的问题是就是因为js是64位精度的,js往着色器里面穿的时候只能是32位浮点数,有效数是8位,精度丢失比较严重。 分析 在基础底图中,所有的要素拿到的都是瓦片里面的相对坐标,坐标范围在0-256之间。在每次渲染时都会重新实时计算瓦片相对中心点的一个偏移来计算瓦片自己的矩阵,这种情况下精度损失比较小,而且每个zoom级别都会加载新的瓦片,不会出现精度损失过大问题。 但是对于一些覆盖物,比如marker

how to export a mapbox studio map as .mbtiles file

谁说胖子不能爱 提交于 2020-07-18 06:09:26
问题 So I'm guessing the answer to this is "no", but is there any way to export a map I've designed online with mapbox studio (https://www.mapbox.com/studio/) into a .mbtiles file so I can host it myself? Honestly, I'd be willing to pay money for this (saving me the trouble of getting a world .pbf file and getting it into a postgresql db is really a pain, especially with a mediocre computer like mine) It sounds like maybe there used to be a way to do this, but as of now it looks like they've taken

How to return value out of completion handler (special case)?

徘徊边缘 提交于 2020-07-10 08:45:08
问题 I'm trying to get Mapbox's in app navigation to work on SwiftUI. Right now viewController returns nil. I've looked at other answers to this question and most of them recommend putting another completion handler in the function where the callback takes place. Here is the code: func makeUIViewController(context: Context) -> NavigationViewController { getRoute { route in let viewController = NavigationViewController(for: route as! Route) viewController.modalPresentationStyle = .fullScreen } /

Android MapBox inflating error. Didn't find class MapView

核能气质少年 提交于 2020-07-09 06:45:07
问题 When I launch android app with MapBox library I get exception: "android.view.InflateException: Binary XML file line #9: Error inflating class com.mapbox.mapboxsdk.views.MapView" Field "cause" contains this text: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.mapboxsdk.views.MapView" on path: DexPathList[[zip file "/data/app/com.example.my.mymapbox-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.my.mymapbox-2/lib/arm, /vendor/lib, /system/lib]] Help please This is

Android MapBox inflating error. Didn't find class MapView

落花浮王杯 提交于 2020-07-09 06:45:07
问题 When I launch android app with MapBox library I get exception: "android.view.InflateException: Binary XML file line #9: Error inflating class com.mapbox.mapboxsdk.views.MapView" Field "cause" contains this text: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.mapboxsdk.views.MapView" on path: DexPathList[[zip file "/data/app/com.example.my.mymapbox-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.my.mymapbox-2/lib/arm, /vendor/lib, /system/lib]] Help please This is

MapBox ESRI Data Layer

谁说胖子不能爱 提交于 2020-07-08 02:44:01
问题 I have a mapbox, and want to display a layer of esri data onto it. The data I'm getting is being pulled in from this json file: https://gis.usps.com/arcgis/rest/services/EDDM/selectZIP/GPServer/routes/execute?f=json&env%3AoutSR=102100&ZIP=93003&Rte_Box=R&UserName=EDDM The data['results'][0]['value']['features'] array looks something like this: [{'attributes': {'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}, {'attributes': {'key':'value'}},{'geometry':{

MapBox ESRI Data Layer

谁说胖子不能爱 提交于 2020-07-08 02:43:19
问题 I have a mapbox, and want to display a layer of esri data onto it. The data I'm getting is being pulled in from this json file: https://gis.usps.com/arcgis/rest/services/EDDM/selectZIP/GPServer/routes/execute?f=json&env%3AoutSR=102100&ZIP=93003&Rte_Box=R&UserName=EDDM The data['results'][0]['value']['features'] array looks something like this: [{'attributes': {'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}, {'attributes': {'key':'value'}},{'geometry':{

react-native mapbox is not showing user location and annotation

心已入冬 提交于 2020-06-29 20:41:14
问题 I am currently learning react-native with maps using mapbox https://github.com/mapbox/react-native-mapbox-gl I followed everything that the map shows, if I give it a lon and lat it does show a location on my emulator but the problem is the annotation and show user location doesn't show at all. Does anyone have any idea what I might be missing? I have been rebuilding the app a few times and checked debugging that there is no errors though here is my simple code export default class App extends

react-native mapbox is not showing user location and annotation

岁酱吖の 提交于 2020-06-29 20:41:14
问题 I am currently learning react-native with maps using mapbox https://github.com/mapbox/react-native-mapbox-gl I followed everything that the map shows, if I give it a lon and lat it does show a location on my emulator but the problem is the annotation and show user location doesn't show at all. Does anyone have any idea what I might be missing? I have been rebuilding the app a few times and checked debugging that there is no errors though here is my simple code export default class App extends