简体   繁体   中英

Using tileimages from static path in OL3

I had generated tile images using gdal2tiles. I am deploying my application in tomcat which is in C drive. Since tile images occupy more space, I had created a new drive E and placing all the images there. Now, can I use the tile images from E drive? 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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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