openlayers 3 - Load local zoomify tileset in OL3 -



openlayers 3 - Load local zoomify tileset in OL3 -

i produced zoomify tileset digitized map image , utilize ol3 display map on website. however, script fails loading map local file uri (later, in production, upload tiles on web server , reference tiles using http). here have far:

var url = 'file:///home/user/map_zoomfiy/'; var imgwidth = 17244; var imgheight = 9684; var imgcenter = [imgwidth / 2, - imgheight / 2]; var proj = new ol.proj.projection({ code: 'zoomify', units: 'pixels', extend: [0, 0, imgwidth, imgheight] }); var source = new ol.source.zoomify({ url: url, size: [imgwidth, imgheight], crossorigin: 'anonymous' }); var map = new ol.map({ target: 'map', layers: [ new ol.layer.tile({ source: source }) ], view: new ol.view({ projection: proj, center: imgcenter, zoom: 1 }) }); </script>

any ideas why fails? thx.

it's not right way e.g https://developer.mozilla.org/en-us/docs/webguide/api/file_system/introduction#file

i don't see why not create local server instead of fighting access file local url.

some times ago, compiled some recipes so.

open command line, go code root dir , follow recipes depending of favorite programming language.

openlayers-3 zoomify

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -