Я хочу создать карту лифтов, используя EPSG: 31466. Я включил библиотеку proj4
, а также плагин proj4leaflet
. Я планирую включить this сервис WMS, используя слой fp_plan
.Листовка + EPSG: 31466 Уровень WMS
Я попытался настроить свою карту, используя следующий подход (fiddle).
// Define CRS (EPSG:31466)
var rs31466 = new L.Proj.CRS(
'EPSG:31466',
'+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs',
{
origin: [
2490547.1867,
5958700.0208
],
resolutions: [
10000000 * 0.00028, //GroundResolutionInMeter * OGC_PixelWidth
5000000 * 0.00028,
2500000 * 0.00028,
1000000 * 0.00028,
500000 * 0.00028,
250000 * 0.00028,
100000 * 0.00028,
50000 * 0.00028
]
}
);
// Create the WMS layer
var wmsLayer = L.tileLayer.wms('http://xplanung.lkee.de/xplan-wms-neu/services/wms', {
version: '1.3.0',
crs: rs31466,
layers: 'fp_plan',
format: 'image/png',
transparent: false,
// The `continuousWorld` property should be set to make sure Leaflet doesn't
// try to wrap or cut off the tiles on Spherical Mercator's bounds.
continuousWorld: true
});
// Define the map
var map = L.map('map', {
crs: rs31466,
center:[51.310, 13.393],
zoom: 1,
layers: [
wmsLayer
]
});
я бы ожидал увидеть что-то вроде этого:
Плитки запрашиваются но раздел не содержит информации ожидаемого уровня. Если я использую проекцию EPSG: 25833, то плитки извлекаются и отображаются точно в ожидании (fiddle).
BTW, я создал ошибку восходящего потока на https://github.com/Leaflet/Leaflet/issues/4253 – IvanSanchez