Get a region's map tile URLs

Earlier today I found myself in a position of needing to grab a handful of map tiles from the Second Life map API. There's an image that needs making that requires a number of map images so grabbing them from that API made sense.

To help do this job, and to help work out what the URLs are for a given region, I knocked up this script:

Just drop it into a prim and touch the prim to get all the URLs for all the map tiles, at all zoom levels, for the current region. Alternatively, say the name of a region on channel 1 to have it do the same for that region (the script is coded to only listen to the owner).

The output looks like this:

Using a variation on this script I was able to create the image I needed without too much effort (in my case I needed to get the tiles in a specific area, at a specific zoom level, so I could paste them together to make a bigger map).

I'm starting to wonder now if using something like this, in combination with media-on-a-prim, could be used to make an in-world interactive map (yes, I know, you could just browse maps.secondlife.com on a prim but where's the fun in that?).

Potential idle-time project at some point.

No comments:

Post a Comment