I'm looking for a way to convert .PNGs (like this one: http://1drv.ms/1O9lrG5) to tiles that I can use with Google or Bing Maps. I'm thinking of a server side script that does this every 10 minutes (as the content of the .PNGs might change).
I know of tools like MapCruncher, but this is not what I'm looking for: I want a fully automated way that gets the relevant .PNGs, generates tiles (with the lat/long from all 4 corners) and let those be accessed by my client app.
Any ideas?
If what you want is this: MapTilerLayer (or overlay-simple), you can use a dynamic url to render the image and set it as the source image for the overlay.
Example from Google Maps Javascript API:
function initialize() {
var mapOptions = {
zoom: 11,
center: new google.maps.LatLng(62.323907, -150.109291),
mapTypeId: google.maps.MapTypeId.SATELLITE
};
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
var swBound = new google.maps.LatLng(62.281819, -150.287132);
var neBound = new google.maps.LatLng(62.400471, -150.005608);
var bounds = new google.maps.LatLngBounds(swBound, neBound);
// THE DYNAMIC IMAGE URL
var srcImage = 'http://your.url/image.ashx';
// The custom USGSOverlay object contains the USGS image,
// the bounds of the image, and a reference to the map.
overlay = new USGSOverlay(bounds, srcImage, map);
}
Unless you want to write the slicing code yourself, a possibility would be to use the older DeepZoomTools.dll.
You can get the .dll by downloading deep zoom composer and pulling it from it's bin.
Here's a link to a blog showing how to programmatically create the tiles.
I used it a few years ago for a project to good effect. If needed, I could try and find the code out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With