简体   繁体   English

在OL3中使用来自静态路径的tileimages

[英]Using tileimages from static path in OL3

I had generated tile images using gdal2tiles. 我已经使用gdal2tiles生成了图块图像。 I am deploying my application in tomcat which is in C drive. 我正在将我的应用程序部署在C驱动器的tomcat中。 Since tile images occupy more space, I had created a new drive E and placing all the images there. 由于平铺图像占用更多空间,因此我创建了一个新的驱动器E并将所有图像放置在那里。 Now, can I use the tile images from E drive? 现在,我可以使用E驱动器中的平铺图像吗? if my images are in E: maps and my application is running in C: tomcat: OL3 how do I use images from E drive for my application running in C drive? 如果我的图像在E:映射中,并且我的应用程序在C:Tomcat中运行:OL3我如何将E驱动器中的图像用于在C驱动器中运行的应用程序?

new ol.layer.Tile({
                    source: new ol.source.XYZ({
                        url: '..../{z}/{x}/{-y}.png'
                    })
                })

You have to create separate server pointing to image folder and use that server address to serve images in your current project. 您必须创建指向图像文件夹的单独服务器,并使用该服务器地址在当前项目中提供图像。 Hope it will solve your problem. 希望它能解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM