Your piece of code seems to be good in theory. As I used arcGIS/Leaflet in exactly the same way.
But the problem could come from missing spatial reference (or maybe incorrect format (image/png or image/jpeg).
For the spatial reference, here is how Leaflet works :
- Leaflet expects default spatial reference : EPSG:3857 / WGS84
- But you can change it by an other one with JS plugin like Proj4leaflet by Kartena.
It's really easy and helpful. Works like this (for EPSG:3006) :
You define your new crs
// SWEREF99 TM (EPSG:3006) with map's pixel origin at SWEREF99 TM coordinate (0, 0)
var crs = new L.Proj.CRS('EPSG:3006',
'+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
{
resolutions: [
8192, 4096, 2048, 1024, 512, 256, 128
],
origin: [0, 0]
})
And include it in your map :
var map = new L.Map('map', {
crs: crs
});
You can find Spatial References here.
This is how QGIS writes the proj-string and WKT with +towgs84-parameter:
+proj=longlat +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +no_defs
GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]]
But keep in mind that there is no overall value for converting any Bessel-1841-Data to WGS84.
For Germany, there were a lot of parametres published, until a NADgrid for the whole country was created. This applies the correct shift for every point inside Germany.
Other surveying authorities have done similar conversions, but with other values.
EDIT
There is a forum entry in Russian http://gis-lab.info/forum/viewtopic.php?t=9386
giving the following proj parameters:
+proj=tmerc +lat_0=55.6666666667 +lon_0=37.5 +x_0=0 +y_0=0 +k_0=1. +a=6377397 +rf=299.15 +towgs84=396,165,557.7,-0.05,0.04,0.01,0 +no_defs
Maybe you get lucky with those values.
Best Answer
As stated in the Esri Leaflet API Reference: