title: Using Custom Map Projection On Leaflet
body: <p>I have an application displaying a EPSG:3414 map running on <a href="http://jsfiddle.net/aaronjxz/aYKDP/" rel="nofollow">Openlayers - jsfiddle working sample</a> that works.</p>
  
  <p>I am trying to implement the same on <a href="http://jsfiddle.net/aaronjxz/GBLjS/" rel="nofollow">Leaflet - jsfiddle non-working</a>, it is not working as I may have left out something or may have gotten some concept wrong.</p>
  
  <p>Unfortunately, I am quite unfamiliar and am in the process of figuring out how to get this to work.</p>
  
  <p>Any help would be welcome. Thanks!</p>
  
  <p><strong>Updates:</strong></p>
  
  <ol>
  <li>map is ESRI type using ZYX and SVY21 projection):</li>
  <li>updated code here (JS fiddle not updated)</li>
  <li>the map X-Y does not start at 0/0, they are some other numbers, so it is getting more complicated, I have to do some magic number offset for each level, this works somewhat but is not ideal as the locations are not accurate, close but not accurate enough.</li>
  </ol>
  
  <p><strong>Leaflet Sample:</strong></p>
  
  <pre><code>var proj = new L.Proj.CRS.TMS('EPSG:3414', "+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs",
      [4257.9355, 11470.3186, 64359.3062, 49067.5413], 
      {
          resolutions:[76.4372195411057,38.2186097705529,19.1093048852764,9.55465244263822,4.77732622131911,2.38866311065955,1.19433155532978,0.597165777664889,0.298450596901194]
      }
  );
  
  var map = L.map('my_map', {
      crs: proj,
      continuousWorld: true,
      worldCopyJump: false
  });
  
  map.addLayer(new L.Proj.TileLayer.TMS('http://{s}.onemap.sg/ArcGIS/rest/services/basemap/MapServer/tile/{z}/{y}/{x}', proj, {
      subdomains: ['t1', 't2'],
      tms: true,
      continuousWorld: true
  }));
  </code></pre>