Leaflet setView with non lat/long CRS

المشرف العام

Administrator
طاقم الإدارة
Is it possible to use setView when using an alternative CRS?

var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([4970081,477018], 13); // Returns: Uncaught TypeError: Cannot call method 'latLngToPoint' of undefined I assume it's related to using a CRS that isn't lat/long.

Thanks!

To clarify in regards to the first comment...

var map = L.map('map'.setView([44.8846225,-93.2203424], 13); // Works fine var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([44.8846225,-93.2203424], 13); // Same error as above.

أكثر...
 
أعلى