3 ms·
Ask HN: How Google Maps works?
I have an idea for a website that requires to implement a zoomable/pannable interactive map, similar to Google Maps but without all the bells and whistles. The map itself is for a fictitious place, so I really need to create it from scratch.
I don't have much experience in Javascript or in maps creation, so I would be grateful if you could point me to the right direction.
In particular:
1. How the maps are normally represented? I bet they are vector-based rather than raster images for different zoom levels. Is there a common format or any standards for storing the maps? I don't need anything complex, just a schematic representation of terrain.
2. Are there examples of how to implement panning/zooming with Javascript?
I will appreciate any tips, from links to Wikipedia and blog posts covering this, to search terms that will lead me to them.
Thank you!
- mixmax 18y agohere is a good walk-through: http://blog.grimpoteuthis.org/2005/02/mapping-google.html http://blog.grimpoteuthis.org/2005/02/mapping-google.html Good luck with it :-)
- alexkay 18y agoThanks! In the comments I found this site which looks very close to what I was looking for: http://www.maplib.net/ http://www.maplib.net/
- davi 18y agothis works, I use it, it's open source, maybe a good place to start: http://iipimage.sourceforge.net/demo.shtml http://iipimage.sourceforge.net/demo.shtml
- alexkay 18y agoLooks good, thanks!
- jaytee_clone 18y agoActually, it is a collection of images for different zoom level.For example, the lowest zoom level uses one image and the next one uses two, and then four (from what I remembered). You can find this out in the google map API. I imagine vector calculation is just unnecessarily complicated when simply storing the images works well enough. In that case, panning and zooming seems easier to implement, as you are probably just moving the images around and reloading different ones when you zoom. jquery comes to mind for these tasks. Maybe it will take some work to make it run as smoothly as Google does it, maybe not.
- deleted 18y ago[deleted]