in openstreetmap wiki there nice example how use local tiles openlayers, version 2 of openlayers. i'm looking same openlayers 3. there examples of how this?
thanks in advance.
in openlayers 3 can (you need access local files browser):
var newlayer = new ol.layer.tile({ source: new ol.source.osm({ url: 'maps/{z}/{x}/{y}.png' }) }); var map = new ol.map({ layers: [ newlayer ], controls: [], target: 'map', view: new ol.view({ center: ol.proj.transform([4.666389, 50.009167], 'epsg:4326', 'epsg:3857'), zoom: 4, minzoom: 1, maxzoom: 20 }) });
Comments
Post a Comment