Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps api custom tiles for fictional video game world

I want to use the Google Maps v3 api to generate an interactive Google Map interface that uses custom tiles for a map from a video game. The app needs to be able to zoom-in out and display the proper tiles for each zoom level as well.

I'm looking for some resources or a tutorial on how to accomplish this. The Google Maps v3 API appears to only discuss using custom tiles that lay on top of the normal Google Maps tiles. That wouldn't make sense in my application since my map is for a fictional world and wouldn't line up with anything in the real world maps. Perhaps I'm just not seeing what I need in the API guide...

like image 412
Jake Wilson Avatar asked Sep 04 '12 22:09

Jake Wilson


2 Answers

Check out the ImageMapType class in the reference. There's a nifty example showing Moon tiles.

One of my favourite applications is The Internet map, the developer wrote a pretty sweet article on how it was developed.

like image 130
Chris Broadfoot Avatar answered Nov 03 '22 19:11

Chris Broadfoot


You need to either cut up your custom game map image into the appropriate file/directory structure that makes integration into Maps API easy (here's an example using Photoshop and some example HTML/JS code). Or use a more friendly tool like TileMill, but this expects data in a standard spatial data format and you probably don't have your game map stored in such a format. If you can go that route, they also provide a Node.js-based server called TileServe that makes integration a cinch.

If you are expecting a boatload of traffic, then maybe look at Google Maps Engine to host your custom game map image directly in Google's infrastructure.

like image 32
Dylan Avatar answered Nov 03 '22 17:11

Dylan