美好的一天,
我想知道,是否可以使用Mapbox for iOS创建"室内"地图(或者有人有其他建议)吗?我有室内平面图的PDF.我想我需要将其转换为MBTiles(http://mapbox.com/developers/mbtiles/)格式.我怎么能这样做呢?
所以,当把人的"行走路线"划出到建筑物中的某些设施时."它"应该知道这个人可以走路的地方.
目前,我试图创造与CATiledLayers东西(但我有点卡住(我可以显示地图,采用"瓦片"格式),并一直在寻找,并因为它的东西就像在地图上"溺水"向量MapBox可能是有用的或与信息和图标等.对于步行路线我在想关于"点睛"的行走路线等等"Dijkstra的"算法"能够确定的路径.我怎么能去这在Mabbox,即使可能吗?
任何正确方向的帮助将不胜感激.
亲切的问候,
Matthijn Dijkstra
我正在使用Mapbox矢量切片从后端进程收集特定数据.在示例中,它们提供了曼哈顿磁贴的链接:
http://a.tiles.mapbox.com/v3/examples.map-zr0njcqy/14/4823/6160.png
作为瓦片Ž/X/ý坐标14/4823/6160
我知道从地图导航到纬度40.706119和经度-74.017554的位置在该区域内.
我还从地图的工作原理中减去了使用缩放14的整个地图是由16384 x 16384的图块组成的,左边是瓷砖的14/0/0.
然而,采用180度纬度和360度经度与总瓦片列和行给出了14/7464/4486,这不是相同的瓦片.(除非我没做对吗?)
这个问题
知道纬度和经度如何获得瓷砖坐标?
我目前正在寻找使用mapbox对所有注释进行排序.
我知道我应该使用以下过程:
//implementing this method and do the sort here
(NSComparator)annotationSortingComparatorForMapView:(RMMapView *)mapView
// remove current annotation and use the sorted array to redraw them
[mapView removeAnnotations:[mapView annotations]];
[mapView addAnnotations:annotationSorted];
Run Code Online (Sandbox Code Playgroud)
这里的问题是我迷失了我应该称之为这个过程的地方.
我实际上是mapView:layerForAnnotation:用来返回应该绘制的形状,但如果我没有错,那么它是一个回调,所以不是从代码中调用的.
谢谢你的帮助.
感谢jszumski,我想出了一个实现.对于那些在未来需要它的人来说,它是:
- (NSComparator)annotationSortingComparatorForMapView:(RMMapView *)RmapView
{
NSComparator sort =^(RMAnnotation *annotation1, RMAnnotation *annotation2)
{
// Sort user location annotations above all.
//
if ( annotation1.isUserLocationAnnotation && ! annotation2.isUserLocationAnnotation)
return NSOrderedDescending;
if ( ! annotation1.isUserLocationAnnotation && annotation2.isUserLocationAnnotation)
return NSOrderedAscending;
// Amongst user location annotations, sort properly.
//
if …Run Code Online (Sandbox Code Playgroud) 我在Android中尝试Mapbox,但它没有显示在android片段上
我收到以下错误
10-29 11:34:25.300 17208-17208/? I/art: Late-enabling -Xcheck:jni
10-29 11:34:25.657 17208-17208/com.example I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
10-29 11:34:25.795 17208-17251/com.example I/mbgl: {Map}[Android]: Not activating as we are not ready
10-29 11:34:25.796 17208-17251/com.example I/mbgl: {Map}[Android]: Not deactivating as we are not ready
10-29 11:34:25.852 17208-17252/com.example D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
10-29 11:34:25.876 17208-17208/com.example D/Atlas: Validating map...
10-29 11:34:25.950 17208-17252/com.example I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.1_RB1.05.00.02.042.016_msm8226_LA.BF.1.1.1_RB1__release_AU ()
10-29 11:34:25.950 17208-17252/com.example I/Adreno-EGL: OpenGL ES Shader Compiler Version: E031.25.03.00 …Run Code Online (Sandbox Code Playgroud) 我正在使用MapBox GL JS来创建带有自定义标记的地图:
var marker = new mapboxgl.Marker(container)
.setLngLat([
datacenters[country][city].coordinates.lng,
datacenters[country][city].coordinates.lat
])
.addTo(map);
Run Code Online (Sandbox Code Playgroud)
但是,我似乎对标记有某种偏移问题.问题是:当缩小一点时,标记的底部并没有真正指向确切的位置:
当我进一步放大它到达目的地时,它指向确切的位置.
我真的很喜欢MapBox GL,但这个特殊的问题让我烦恼,我很想知道如何解决它.当这个问题得到解决时,我的实现远比我使用的原始映射软件更优越.
尝试在我的React-Native应用程序上安装Mapbox(在此处找到)时,我一直收到此错误.

我的文件如下:
在OpenMapTiles的文档中,它可以为MapBox GL JS提供矢量图块。
但是在挖掘这两个项目的文档时,我没有找到一个选择:如何配置自托管的MapBox GL JS库以使用自托管的OpenMapTiles服务器中的图块?
宣传单是开源的,免费的.但是,传单站点上的示例使用Mapbox来渲染地图.Mapbox比谷歌地图(Mapbox定价)更贵.问题是:任何人都可以免费使用Leaflet吗?
尝试在mapboxgl中显示箭头以指示方向。该箭头仅在高缩放时可见,而在低缩放时不可见。
使用添加图像图层 'symbol-placement': 'line'
线层
map.addLayer({
'id': 'route',
'type': 'line',
'source': 'mapSource',
'filter': ['==', '$type', 'LineString'],
'layout': {
'line-join': 'round',
'line-cap': 'round'
},
'paint': {
'line-color': '#3cb2d0',
'line-width': {
'base': 1.5,
'stops': [[1, 0.5], [8, 3], [15, 6], [22, 8]]
}
}
});
Run Code Online (Sandbox Code Playgroud)
箭头层
const url = 'img/arrow.png'
map.loadImage(url, (err, image) => {
if (err) { return; }
map.addImage('arrow', image);
map.addLayer({
'id': 'arrowId',
'type': 'symbol',
'source': 'mapSource',
'layout': {
'symbol-placement': 'line',
'symbol-spacing': 1,
'icon-allow-overlap': true,
// 'icon-ignore-placement': true,
'icon-image': 'arrow', …Run Code Online (Sandbox Code Playgroud) mapbox ×10
android ×3
javascript ×3
mapbox-gl-js ×3
google-maps ×2
ios ×2
leaflet ×2
mapbox-gl ×1
maps ×1
navigation ×1
objective-c ×1
openmaptiles ×1
react-native ×1
reactjs ×1
sorting ×1