mapbox

Mapbox-gl.js map is undefined in angular-cli project on load event

青春壹個敷衍的年華 提交于 2021-01-28 06:52:43
问题 Started an angular-cli project and installed mapbox-gl via npm. Included the mapbox-gl script and styles in the angular-cli.json file. I can get the map to show, but I cannot add a layer on the load event. The map is undefined suddenly? Here is the template html (app.component.html): <div id="map" style="margin:0; padding:0; position:absolute; top:25px; bottom:0; width:100%;"> </div> And here is my component code (app.component.ts): import { Component, ViewChild, AfterViewInit, OnInit } from

Fatal Error: Duplicate keys of type 'Geocoded Placemark' were found in a dictionary. (Mapbox Geocoder)

旧街凉风 提交于 2021-01-28 01:50:48
问题 I quote: "This usually means either that the type violates Hashable's requirements, or that members of such a dictionary were mutated after insertion." I'm using the Mapbox Geocoder , and when this runtime error occured, my XCode brought me to Thread 1, 0_swift_runtime_on_report and the error occured on the commented line below: libswiftCore.dylib`_swift_runtime_on_report: 0x10fdd2180 <+0>: pushq %rbp //this line right here I've never seen this error before and I don't even begin to know how

Button in ContentView that zooms to current location on MapBox map?

北城余情 提交于 2021-01-27 18:32:47
问题 So....in my coordinator--which conforms to the mapbox delegate protocol, I can just do: mapView.setCenter(mapView.userLocation!.coordinate, zoomLevel: 13, animated: true) and this function works fine in the coordinator or when it is called in the mapView class. The only problem is I don't know how to pass this mapView instance around (specifically back into ContentView where I want to have a button that does the same thing). I also have a LocationManager struct but I don't know how much use

Problem With MapBox iOS MGLPolyline when crossing the (180 or -180) Longitude

旧城冷巷雨未停 提交于 2021-01-27 14:19:03
问题 in MapBox iOS sdk 4.4.1 if the MGLPolyline crosses the (180 or -180) Longitude , the map shows that it is going the longer way around the globe instead of going the shorter way. override func viewDidAppear(_ animated: Bool) { let points = [ CLLocationCoordinate2D(latitude: 50.0, longitude: -170.0), CLLocationCoordinate2D(latitude: 50.0, longitude: 170), ] let line = MGLPolyline(coordinates: points, count: UInt(points.count)) line.title = "line" mapView.addAnnotation(line) } 回答1: It makes

免费提供离线地图部署服务

百般思念 提交于 2021-01-27 09:55:15
1. 概述 当需要在内网离线发布卫星影像地图时,如果只是一个小数据量的市县范围,则只需要直接将卫星影像地图导出为散例的瓦片进行离线发布即可。 但如果需要离线发布一个省,或者全国乃至全球范围的卫星影像地图时,就强烈建议要通过基于DAT文件的金字塔分块模式进行发布了。 关于DAT文件的相关说明,请参阅" DAT与IDX格式文件如何打开? "一文【点击查看】中的详细描述。 如果你不了解DAT文件如何在内网中进行离线发布,我们可以通过远程为你免费提供离线地图部署服务,手把手教会你如何离线发布基于DAT文件的海量卫星影像。 当你完全掌握了离线部署的方法技巧之后,就可以在一个完全与互联网进行物理隔离的内网进行离线发布了。 2. 离线发布卫星影像地图的准备工作 为了说明基于DAT文件的离线卫星影像发布方法,请先免费领取一个省的DAT离线卫星影像数据,你只需要通过关注微信公众号"水经注GIS",并回复"免费数据"即可根据流程说明进行免费领取。 发布一个省的DAT离线卫星影像数据,由于数据量比较大,我们需要通过《水经注地图发布服务中间件》进行发布,请通" 《地图发布服务中间件》下载安装教程 "一文【点击查看】了解它在Windows系统中的安装使用方法。 如果你的地图服务器是Linux系统,请通过" 《水经注地图发布服务中间件》For Linux 版发布 "一文【点击查看

What is the best way to add markers on MapBox?

廉价感情. 提交于 2021-01-25 06:55:29
问题 As most of you know, mapbox.addMarker() is deprecated! I tried to figure the new way to add markers which are using Symbol Layer I'm using this code, it is working for me! but it re-define the Style of the map every time I want to add a marker here is the code: //Add Marker to the Map public void addMarker(@NonNull LatLng point) { Feature feature = Feature.fromGeometry(Point.fromLngLat(point.getLongitude(), point.getLatitude())); mapboxMap .setStyle(new Style.Builder() .fromUri("mapbox:/

关于用Unity实现校区AR导航毕业设计的建议

不问归期 提交于 2021-01-19 13:13:08
最近有人问,怎么用ARCore来做校园AR导航的毕业设计。因为不是第一个了,后面估计还会有,就专门说一下。 先说室内导航,毕竟很多人问都是因为我做过AR室内导航的内容。AR室内导航有2种技术方式实现,运动跟踪和稀疏空间地图或云锚点。运动跟踪因为中途不能自动校正,而稀疏空间地图或云锚点能自动校正,所以后者更可靠,不推荐用运动跟踪实现。 那么,可以用稀疏空间地图或云锚点实现校区范围的AR导航么?技术上可以,但是,做毕业设计的大概不行。用稀疏空间地图或云锚点实现AR导航,首先需要建立地图或者锚点。 这里有手机建图的演示,有兴趣可以看下。 https://www.bilibili.com/video/BV1Y7411K7HT?p=2 这个过程,如果用手机的话,很慢,百多平米的办公室就需要花10多分钟,简单理解就是1分钟也就实现10平米范围的建图。如果是校区范围,额,特别现在的学校都越来越大呢。这还没用考虑外部干扰造成半途而费的情况,所以,用手机建立校区范围的地图还是不靠谱呢。当然厂商有提供更高效率的建图方式,例如用全景摄像机。全景摄像机租一天也就三五十块钱,倒也不贵,问题是这个功能通常不会开放给个人用户,都是给企业级的用户,毕业设计的学生应该是没有这种机会的说。 这里有通过全景相机的建图演示,有兴趣可以看下。 https://www.bilibili.com/video

12月份GitHub上最热门的开源项目

余生长醉 提交于 2021-01-16 12:48:22
Python实战社群 Java实战社群 长按识别下方二维码, 按需求添加 扫码关注添加客服 进Python社群▲ 扫码关注添加客服 进Java社群 ▲ 开源最前线(ID:OpenSourceTop) 猿妹整编 转载请注明来源作者 12月份GitHub上最热门的开源项目排行已经出炉啦,这个月Java相关的开源项目上榜有点多哦,一起来看看上榜详情: 1 coding-interview-university https://github.com/jwasham/coding-interview-university Star 152k 该项目是由国外一个叫John Washam的小哥创建的,John Washam是一名自学编程的谷歌软件工程师,将自学经验编写成了一份教程,在GitHub上线以来,已收获近15万星的好评。 2 PaddleHub https://github.com/PaddlePaddle/PaddleHub Star 4310 PaddleHub是一个深度学习模型开发工具。它基于飞桨领先的核心框架,精选效果优秀的算法,提供了百亿级大数据训练的预训练模型,方便用户不用花费大量精力从头开始训练一个模型。PaddleHub可以便捷地获取这些预训练模型,完成模型的管理和一键预测。 3 takenote https://github.com/taniarascia

How to pass custom fields into mapbox-gl js to create points on map?

眉间皱痕 提交于 2021-01-07 07:00:31
问题 I've created a map using mapbox and plotted multiple custom points that you can interact with. I am also using Wordpress and want to use advanced custom fields to create each point so they can easily be managed from a non-technical person. The fields are all setup, but I am having trouble passing them into the javascript in my php template. I've tried using a loop but I can't use the loop inside javascript. Here is my Mapbox code that I am using to plot the points and want to use advanced

How to pass custom fields into mapbox-gl js to create points on map?

流过昼夜 提交于 2021-01-07 06:59:18
问题 I've created a map using mapbox and plotted multiple custom points that you can interact with. I am also using Wordpress and want to use advanced custom fields to create each point so they can easily be managed from a non-technical person. The fields are all setup, but I am having trouble passing them into the javascript in my php template. I've tried using a loop but I can't use the loop inside javascript. Here is my Mapbox code that I am using to plot the points and want to use advanced