mapbox

MapBox: How to remove a shape and draw another shape?

♀尐吖头ヾ 提交于 2019-12-08 04:30:43
问题 I created annotation for shape _path = [RMAnnotation annotationWithMapView:_mapView coordinate: _userLocation.coordinate andTitle:@"Path"]; [_mapView addAnnotation:_path]; in delegate I wrote - (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMAnnotation *)annotation { if ([annotation.title isEqualToString:@"Path"]) { _lineBetweenTwoBeacon = [[RMShape alloc] initWithView:mapView]; _lineBetweenTwoBeacon.lineColor = [UIColor redColor]; _lineBetweenTwoBeacon.lineWidth = 10.0f;

Mapbox Android SDK crash - “java.lang.Error: Vertex shader fill failed to compile”

試著忘記壹切 提交于 2019-12-08 03:47:06
问题 After upgrading my Android Studio version to 2.1.3, my application crashes every time I launch it. More precisely, it crashes when trying to load my Mapbox View (that was perfectly working before that). I did some research, and it seems to be a known issue, but I couldn't find any workaround to pass through it... I think it MAY be a problem with the Emulator only, but for now I couldn't try on a lot of physical devices, so I'm not sure about that. But anyway, I really need to use the emulator

Do embedded GeoJSON styles work with Mapbox GL?

旧城冷巷雨未停 提交于 2019-12-08 02:35:59
问题 Is it possible to utilize the built-in properties attribute of a GeoJSON data source to automatically style a Mapbox GL map without having to pre-specify a style? I have a use case where I dynamically load in GeoJSON LineString data that needs to be a particular color and it already has style data built in: {"properties": {"color": "#ffff33"... Right now, I have a rather inelegant setup where the relevant color is parsed out, translated into a style, and added to the map upon every load:

Xcode build error clang failed

拟墨画扇 提交于 2019-12-08 02:23:46
问题 Something's missing in my iPhone application. I do not success to fix this error, that seams to be a martian error for me... I do not understand at all, even after many searches... ProcessPCH /Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/PrecompiledHeaders/IntraMuros-Prefix-etlohrlrqzwcjicedfazzdvoaqbq/IntraMuros-Prefix.pch.pth IntraMuros/IntraMuros-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd "

Missing MapBox CSS using React

南楼画角 提交于 2019-12-07 14:29:37
问题 I'm trying to work with MapBox using React. I've created the project with create-react-app, added mapbox-gl ("mapbox-gl": "^0.46.0-beta.1"), but I have a problem with css file. It shows me this warning: This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/ I've followed all steps: 1 - Install the npm package: npm install --save

Open a Mapbox map in QGis

强颜欢笑 提交于 2019-12-07 13:06:46
问题 I'm looking for a way to display one of my Mapbox map in QGis (baselayer edited on mapbox.com & data uploaded from tilemill). Did someone here already find a way ? Is there a feature or a plugin to do that ? Thanks for your future answers ! Adrien 回答1: Yesterday, I found two solutions by myself : 1) the pretty official "TileLayer Plugin" QGis plugin You'll have to write a TSV file (Tab Separated Values) with, at least, the name, the credits and the URL of your Mapbox map. The URL should look

How to convert a map location (lat, lng) pair to a screen position (x, y) pair in mapbox

可紊 提交于 2019-12-07 12:18:49
问题 I am using mapbox javascript API to do some cool stuff on a map. Now I have a map location (latitude, longitude) pair and I want to set the view to this location then use javascript to simulate a click at this location. The problem is that I need to find out the screen position (x, y) pair of this location after setting the view. But how do I do that? It seems there is an API L.ICRS. I tried but it returned NaN for both x and y -- please check my example javascript codes below. var latlng =

setBounds to two different featureGroups at once mapbox leaflet?

血红的双手。 提交于 2019-12-07 11:30:29
I am working on a map where I have two feature layers. var myFeatureGroup1 = L.featureGroup().addTo(map); var myFeatureGroup2 = L.featureGroup().addTo(map); I am setting bounds like: map.fitBounds(myFeatureGroup1.getBounds()); map.fitBounds(myFeatureGroup2.getBounds()); But for obvious reasons, myFeatureGroup2 is set bounds on. Is ther a way by which I can fit bounds to multiple layerGroups? Like both of them at once? Is there a way I can merge them into a third layerGroup and fit bounds on it? map.fitBounds(myFeatureGroup1.getBounds().extend(myFeatureGroup2.getBounds())); See the LatLngBounds

leaflet.js: too slow with custom svg markers (and a lot of points)

怎甘沉沦 提交于 2019-12-07 10:57:17
问题 I am trying to use some user defined svg icons for markers on leaflet but I think the whole task gets too heavy for my browser. Until now I was using L.circleMarker but I now have to use markers like asterisks, arrows, stars etc instead so I decided to do them as svg path and then plug them in instead of my circleMarkers. To make things more complicated I have more than 300K points. With the circleMarkers I was able to make a workable chart, not lightning fast but quite acceptable especially

JupyterLab安装地图插件

旧巷老猫 提交于 2019-12-07 09:23:21
JupyterLab安装地图插件 (本文所述软件还在发展之中,欢迎加入开源项目,提供建议、测试和开发。) 在 Jupyter 中进行数据分析时,往往需要将数据叠加到地图上。简单的地图需求可以利用matplotlib/echarts/bokeh的地图显示功能,更为复杂的可以使用SuperMap/Leaflet/GMaps提供的地图插件,实现交互的地图操作,可以显示和操作大比例尺的专业级地图,甚至调用专业GIS服务进行空间分析,当然这操作起来也会更复杂一些。 上图来自于Kubernetes和JupyterLab支持, https://github.com/openthings/iclient-python 1、iClientPy iClientPy是由超图软件公司(http://www.supermap.com)开发的一个开源项目,可以将SuperMap iServer和Online服务通过python API访问,并支持Jupyter的编程和集成化分析。目前该项目还在开发之中,尚未形成发布版本(预计2018年底发布)。项目地址如下: 文档, http://iclientpy.supermap.io/geticlientpy.html 源码, https://github.com/SuperMap/iclient-python 由于conda安装国内访问较慢,可以加入镜像站