[英]Can I use raster jpg, png images for Mapbox
What I'm trying to achieve is to map icons, labels, polygons to raster images. 我想要实现的是将图标,标签,多边形映射到光栅图像。 And to have an ability to zoom.
并具有缩放功能。
Ie to map furniture to offices / buildings.
即将家具映射到办公室/建筑物。
Also it's needed to be said that user should work with it through API (through web site interface). 还需要指出的是,用户应该通过API(通过网站界面)使用它。
Recently I've spot Mapbox. 最近,我发现了Mapbox。 While Mapbox is awesome and seems to be a good fit to achieve my goal, I find it hard to find docs for implementing it.
虽然Mapbox很棒,而且似乎很适合实现我的目标,但我发现很难找到实现它的文档。
What I've found so far is: 到目前为止,我发现的是:
mapbox-gl-draw
to draw polygons mapbox-gl-draw
绘制多边形 The missing puzzle is: How I can work with raster images?
缺少的难题是:如何处理光栅图像?
and 和
Should I position (edit) icons, labels on my own and later save to
dataset
?我应该自己放置(编辑)图标,标签,然后保存到
dataset
吗? Or there already exist a functionality drag-drop out-of-box?还是已经存在现成的功能拖放功能?
One idea is to use Mapbox with transparent background and to zoom raster image separately. 一种想法是使用具有透明背景的Mapbox并分别缩放栅格图像。 Kind of synchronizing it with the map.
与地图同步的一种。
Any help would be appreciated 任何帮助,将不胜感激
I believe this example from the mapboxGL examples shows what you're looking for: https://www.mapbox.com/mapbox-gl-js/example/image-on-a-map/ . 我相信mapboxGL示例中的该示例显示了您正在寻找的内容: https ://www.mapbox.com/mapbox-gl-js/example/image-on-a-map/。
Note that the radar layer, while it looks like a layer constructed in data, is simply a gif added as an image layer, with a bounding box of of four lngLat coordinates. 请注意,雷达图层虽然看起来像是由数据构造的图层,但只是作为图像图层添加的gif,带有四个lngLat坐标的边界框。 https://www.mapbox.com/mapbox-gl-js/assets/radar.gif
https://www.mapbox.com/mapbox-gl-js/assets/radar.gif
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.