1 Replies - 629 Views - Last Post: 09 July 2010 - 05:56 AM

#1 ts230  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 225
  • Joined: 11-July 09

Google Maps-like thing

Posted 08 July 2010 - 10:52 PM

So I run a Sonic fansite, and I want to do a thing like Google Maps where the user can move and zoom into the level maps. What would be the way to go in implementing this? I do not know if it's easier in Flash or Javascript. My initial idea was to split the files up into 128x128 (or 32x32 pixel for the bigger maps of newer games) pixel chunks, get rid of the chunks that are the same, put them all into a table and that table into a div. Then I just need to add the right cursor and dragging, all powered by jQuery. The zooming feature confuses me a bit more - how would I implement that? I'm not aware of a CSS command that scales images. In Flex, I could probably just whack the entire image into a Scroll Pane (or whatever they're called) and then add a drag handler to it. I don't know which one would provide the best experience for the most users, and which one would load the fastest. In case anyone's wondering, I have 3 different games, and I want a little chooser at the top of the page that lets the user choose a zone and a game. The choosing would be all AJAX like, and I could probably have the 'map viewer' in an IFRAME below the controls. Also, one of the biggest images I have is 5888x1536 pixels in size. I'm worried these kinds of images split up into smaler chunks would still take forever to download and render, but I think getting rid of chunks used multiple times and some optimisation should fix that. Thanks for anyones help or pointers in the right direction.

Is This A Good Question/Topic? 0
  • +

Replies To: Google Maps-like thing

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1947
  • View blog
  • Posts: 3,488
  • Joined: 13-January 08

Re: Google Maps-like thing

Posted 09 July 2010 - 05:56 AM

View Postts230, on 08 July 2010 - 09:52 PM, said:

So I run a Sonic fansite, and I want to do a thing like Google Maps where the user can move and zoom into the level maps. What would be the way to go in implementing this?


Rather than do something "like Google Maps" why not simply use Google Maps? It's a powerful API and lots of folks have made it do all kinds of clever stuff. For instance, Google has a page of examples that show you how to make the API do different things. Outside of Google you can search the web for what other people have done with Google maps (not everything worth knowing is contained in Google Maps own documentation) and whatever you want to do has likely already been done somewhere else.

About the only thing you'll want to have is a strong command of Javascript and perhaps a little JQuery/Ajax.

Good luck!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1