iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.09k stars 293 forks source link

extent in TMSSource seem not work #1079

Open liujingjie opened 5 years ago

liujingjie commented 5 years ago
var extent84 = new itowns.Extent(
    'EPSG:4326',
    116.710666948693, 116.845104311178,
    36.2984934575504, 36.4445095937182);

var tmsSource2 = new itowns.TMSSource({
    format: 'image/png',
    url: 'http://.com/${z}/${x}/${y}.png',
    zoom: {
        min: 8,
        max: 20
    },
    extent: extent84,
    tileMatrixSet: 'PM',
});
var colorLayer2 = new itowns.ColorLayer('msz', {
    source: tmsSource2,
});
view.addLayer(colorLayer2);

i add a tms layer into the view and i use extent to control the extent of the loaded map,but itowns request the png out of the extent,

gchoqueux commented 5 years ago

Thanks to report this issue. Effectively, the extent isn't used in the conditions to display the source, see TMSSource.extentInsideLimit. We'll fix the problem.