Comments (2)
Hi,
i've verified the behaviour, and the implementation is correct. It's the same implemetation as in L.TileLayer.WMS. However the result is not what you may expect:
- The default map projection/crs for Leaflet is "Google Mercator" (EPSG:3857, image 1). All WMS layers are queried with this crs then, the code reprojects the map-bounds to this crs, and the WMS must support EPSG:3857.
- You can set the map crs to EPSG.4326 with (image 2)
var map = L.map('map', { crs:L.CRS.EPSG4326 // test for Plate Carree projection });
This means the map uses the 'EPSG:4326-projection' then, wich means all layers also must support EPSG:4326. - You can set only the crs of the WMS-layer to EPSG:4326 and leave the map in Google Mecator (image 3). Then the bounds are not reprojected, it's effectively the same as in your code. But the result isn't really accurate. If the projection of the WMS image is different than the projection of the map, all individual pixels should be transformed, like here https://www.jasondavies.com/maps/raster/ . Leaflet just overlays the resulting image.
So the WMS layer works as expected, i've tested it with the meteosat WMS in the sample. But you should check if you can make your WMS "Google-Mercator" aware, because Leaflet cannot mash-up images from different projections accurately.
Google Mercator
Equirectangular
Google Mercator with Equirectangular Overlay
from leaflet.nontiledlayer.
Thank you so much for your quick reply!
from leaflet.nontiledlayer.
Related Issues (20)
- Error Handling
- Licence information HOT 2
- NoWrap option not available HOT 2
- bringToBack and bringToFront not working HOT 3
- Add your plugin to Leaflet plugins site
- Blinking in Mozilla Firefox 50.1.0 HOT 6
- Vaadin Plugin HOT 3
- WMS goes to upper left corner when zooming in HOT 7
- Replace L.Mixin.Events with L.Evented HOT 3
- Support the 'loading' event HOT 1
- Add TypeScript type definitions HOT 12
- Different width and height of map and NonTileyLayer HOT 1
- WMS Option detectRetina HOT 4
- GetFeatureInfo HOT 3
- Event handler for end of process HOT 3
- Pane option HOT 3
- Issue when using EPSG4326 Projection HOT 11
- Version control (npm) HOT 6
- Default pane invalid HOT 2
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 leaflet.nontiledlayer.