Comments (4)
Hi, it's difficult to say without seeing code.
can you give some example of your code of use case?
from ol-tilecache.
Hi,
Code is as below.
ol3
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
tileUrlFunction: ol.TileCacheUrlFunction.createTileUrlFunction( '//localhost/tiles/landmass/{0z}/{x1}/{x2}/{x3}/{-y1}/{-y2}/{-y3}.png')
})
})
],
view: new ol.View({
projection: 'EPSG:4326',
center: [72.8, 18.8],
zoom: 6
}),
})
ol2 code
var globe = new OpenLayers.Layer.TileCache( "Landmass", "../tiles", "landmass", {isBaseLayer: true});
map = new OpenLayers.Map('map', {
maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90),
resolutions: [0.158739, 0.063495, 0.031747, 0.015873, 0.006349, 0.003174, 0.001587, 0.000634, 0.000317, 0.000158, 0.000158, 0.000063, 0.000031]
});
map.addLayers([globe]);
map.setCenter(new OpenLayers.LonLat(72.8, 18.8), 6);
from ol-tilecache.
this extension doesn't reproject coordinates, it uses tile coordinates calculated by ol3 bassed on current projection and tile grid params.
so, i think, your should use custom tile grid object with your resolutions, tileSize and etc.
http://openlayers.org/en/v3.12.1/apidoc/ol.tilegrid.TileGrid.html
and set EPSG:4326 projection on the layer source.
I will try to look into this matter more deeply later.
from ol-tilecache.
also you need to setup correct origin of your custom tileGrid to get correct X and Y in tileCoord
more info
So I close this issue because ol3-tilecache extension isn't responsible for the creation correct tile grid.
Reopen if you have questions
Thanks
from ol-tilecache.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ol-tilecache.