View Full Version : Must i use OpenGL for map drawing ?

02-20-2011, 03:43 AM

Am new in the world of graphics and things but lately developped a new craze for it ;). I planned to build a web site and put a map in it. A map that can be zoomed in and out and that will hold information on the various places that happen to exist there. hmm i dnt want it 3D, 2D will do. As for the positioning of places on the map, i heard that OpenGL use vectors and algorism (am not too familiar with these terms , sorry).

My question is ...for the above purpose , Should i use OpenGL ??
Is it the best tool for this ?
Will OpenGL do the job for me ?
I would appreciate to have your point of view on this.

Sorry for my english and thanks for the help in advance.

02-27-2011, 01:53 AM
You can try webgl.


But I must admit we use OpenGL mainly for 3D.

OpenGL doesn't have vectors, you'll need to implement them by hand. For about algorithm, any programmer should know at least some algorithms. If you just start with programming, I'd advise you to learn more about programming first. If your intent is just to show a map and information on it, I think adobe flash will be more easy and suitable for you.

The thing I would do for what you want is (saying we keep GL to do so):

draw a quad
texture it with the image of your map

then scale it (for zoom in and out)
translate it (for moving in the map)
rotate it (for making rotation...)

For adding information, I'd draw little quads with texture (images of what you want to show, like hotels, hospitals and so on).