Thanks for responding so quickly. I was finally able to get my tiles to load using a combination of the code at your demo and the examples over at the proj4leaflet page. I'm still unable to use coordinates from 2263 to create markers and other leaflet objects though. Any ideas on that?
<script>
var resolutions = [127.99999999999942, 63.99999999999971, 31.99999999999985, 15.99999999999993, 7.99999999999996, 3.99999999999998, 1.99999999999999, 1.00000000000000, 0.50000000000000, 0.25000000000000];
var crs = new L.Proj.CRS('EPSG:2263',
'+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 ' +
'+x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs ',
{
origin: [1030000, 182500], // origin of aerial, top left
resolutions: resolutions
}
);
var map = new L.Map('map', {
crs: crs,
continuousWorld: true,
worldCopyJump: false,
// setting max bounds makes it so you can not pan outside of the area you want to show
//maxBounds: new L.LatLngBounds([40.62685618771871, -73.83524318683413], [40.57719281838508, -73.74309481282909])
});
var tileUrl = 'Tiles/{z}/{x}/{y}.png',
tile = new L.TileLayer(tileUrl, {
maxZoom: 9,
minZoom: 2,
tms: true,
noWrap: true
});
map.setView(new L.LatLng(40.60224305197215, -73.7956045205781), 2).addLayer(tile);
// this isnt working correctly, creates a marker at the edge of the image
// that moves as zoom level changes
var latlng11 = L.latLng(1035546.12, 176231.75);
var mark11 = L.marker(latlng11).addTo(map);
// markers on the corners
var latlng1 = L.latLng(40.62685618771871, -73.83524318683413);
var mark1 = L.marker(latlng1).addTo(map);
var latlng2 = L.latLng(40.626686909535934, -73.74296193767485);
var mark2 = L.marker(latlng2).addTo(map);
var latlng3 = L.latLng(40.57719281838508, -73.74309481282909);
var mark3 = L.marker(latlng3).addTo(map);
var latlng4 = L.latLng(40.577405934958406, -73.83530757095961);
var mark4 = L.marker(latlng4).addTo(map);
map.on('click', function (e) {
console.log("map click: " + e.latlng.lat + "," + e.latlng.lng);
});
</script>