ImageTiler is a ProcessWire Module to split large images into tiles which can be used with interactive maps like Leaflet. It uses PHPs GD library for image processing.
This module's files should be placed in /site/modules/ImageTiler/ How to install or uninstall modules
Download and add Leaflet to your project. The data object is the object returned from the call to $image->tile()
var map = L.map('map', {
crs: L.CRS.Simple,
noWrap: true,
maxBoundsViscosity: 1,
attributionControl: false
});
var sw = map.unproject([0, data.imageHeight], data.maxZoom);
var ne = map.unproject([data.imageWidth, 0], data.maxZoom);
var bounds = new L.LatLngBounds(sw, ne);
var layer = L.tileLayer(data.url + '/{z}/{x}/{y}.jpg', {
tileSize: data.tileSize,
center: [0,0],
minZoom: data.minZoom,
maxZoom: data.maxZoom,
bounds: bounds,
noWrap: true
}).addTo(map);
map.setMaxBounds(bounds);