Giter Club home page Giter Club logo

Comments (6)

sylvielamythepaut avatar sylvielamythepaut commented on August 21, 2024

I am not familiar with leaflet, then I had difficulty to try the projection .. Magics can understand projection coordinates .. I think I have just forgotten to set it in case of 3857 .. I will check that, not need for pyproj yet ! ( just trying to keep the dependancies minimum)

from skinnywms.

sylvielamythepaut avatar sylvielamythepaut commented on August 21, 2024

Can you show me how you set the projection in leaflet ? I am not sure I got it right !

from skinnywms.

edigiacomo avatar edigiacomo commented on August 21, 2024

In this patch you can see how to explicitly set the projection in leaflet:

diff --git a/skinnywms/templates/leaflet_demo.html b/skinnywms/templates/leaflet_demo.html
index 0c22de5..f6f02b8 100644
--- a/skinnywms/templates/leaflet_demo.html
+++ b/skinnywms/templates/leaflet_demo.html
@@ -29,7 +29,7 @@
       let mymap = L.map('mapid', {
         center: [0, 0],
         zoom: 2,
-        crs: L.CRS.EPSG4326,
+        crs: L.CRS.EPSG3857
       });
 
       let background = L.tileLayer.wms('/wms?', {
@@ -37,7 +37,8 @@
           format: 'image/png',
           transparent: 'TRUE',
           attribution: '',
-          version: '1.3.0'
+          crs: L.CRS.EPSG3857,
+          version: '1.1.1'
         }).addTo(mymap);
 
       let layers = {};
@@ -47,7 +48,8 @@
           format: 'image/png',
           transparent: 'TRUE',
           attribution: '',
-          version: '1.3.0'
+          crs: L.CRS.EPSG3857,
+          version: '1.1.1'
         });
       });

from skinnywms.

sylvielamythepaut avatar sylvielamythepaut commented on August 21, 2024

Great, Thanks..

I will try now ..
Hoping to fix it without to have to use pyproj .

I think I will also try to improve the leaflet demo then we can do more manual tests with projection, and version .

Sylvie

from skinnywms.

sylvielamythepaut avatar sylvielamythepaut commented on August 21, 2024

Should be OK now ..

from skinnywms.

edigiacomo avatar edigiacomo commented on August 21, 2024

Thank you, I tested it works fine now!

from skinnywms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.