简体   繁体   English

我可以在Mapbox中使用栅格jpg,png图像吗

[英]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: 到目前为止,我发现的是:

  • I can use mapbox-gl-draw to draw polygons 我可以使用mapbox-gl-draw绘制多边形
  • I can upload datasets. 我可以上传数据集。 Which consist of position, data. 其中由位置,数据组成。 With that I can upload icons, labels and probably polygons. 这样我就可以上传图标,标签甚至多边形。

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.

相关问题 如果文件的扩展名为jpg或png,我如何使用chrome.downloads.onDeterminingFilename更改下载的文件名? - How can I use chrome.downloads.onDeterminingFilename to change downloaded file names if the files have extension of jpg or png? Mapbox网络服务:将图块格式从PNG更改为JPG - Mapbox webservice: Change format of tiles from PNG to JPG JavaScript可以确定PNG或JPG吗? - Can Javascript Determine PNG or JPG? 我想使用滑脂油将.jpg或.png更改为.jpg:orig或.png:orig - I want to change .jpg or .png to .jpg:orig or .png:orig with greasemonkey 如何在 React-Native 中将 base64 url 转换为图像(png/jpg)文件? - How can I convert a base64 url to an image(png/jpg) file, in React-Native? 如何从 PNG 创建 SDF-Icon(在 Mapbox 中使用)? - How can I create SDF-Icon's (used in Mapbox) from PNG? 我如何像 mapbox 上的rainviewer 一样为雷达光栅制作动画 - How i make animation for radar raster like a rainviewer on mapbox 将 word 和 pdf 文档页面转换为 jpg 或 png 图像 - Convert word and pdf document pages to jpg or png images Image.onload 不适用于 .jpg 图像更改为 .png - Image.onload not working for .jpg images changed to .png 在 angularjs 应用程序中查看 pdf 和图像(jpg、gif、tiff、png) - to view pdf and images(jpg,gif,tiff,png) in angularjs app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM